Mercurial > repos > galaxyp > cardinal_classification
annotate classification.xml @ 19:4c177985028a draft default tip
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
author | galaxyp |
---|---|
date | Thu, 04 Jul 2024 13:45:03 +0000 |
parents | eddc2ae2db80 |
children |
rev | line source |
---|---|
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1 <tool id="cardinal_classification" name="MSI classification" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="22.05"> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
2 <description>spatial classification of mass spectrometry imaging data</description> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
3 <macros> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
4 <import>macros.xml</import> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
5 </macros> |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
6 <expand macro="requirements"/> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
7 <command detect_errors="exit_code"> |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
8 <![CDATA[ |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
9 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
10 @INPUT_LINKING@ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
11 cat '${MSI_segmentation}' && |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
12 Rscript '${MSI_segmentation}' |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
13 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
14 ]]> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
15 </command> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
16 <configfiles> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
17 <configfile name="MSI_segmentation"><![CDATA[ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
18 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
19 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
20 ################################# load libraries and read file ######################### |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
21 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
22 library(Cardinal) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
23 library(gridExtra) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
24 library(ggplot2) |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
25 library(scales) |
7
6f4c34f8d5ba
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents:
4
diff
changeset
|
26 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
27 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
28 |
7
6f4c34f8d5ba
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents:
4
diff
changeset
|
29 @READING_MSIDATA@ |
6f4c34f8d5ba
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents:
4
diff
changeset
|
30 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
31 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
32 msidata = as(msidata, "MSImagingExperiment") |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
33 |
3
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
34 ## remove duplicated coordinates |
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
35 msidata <- msidata[,!duplicated(coord(msidata))] |
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
36 |
2
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
37 @DATA_PROPERTIES_INRAM@ |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
38 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
39 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
40 ######################################## PDF ################################### |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
41 ################################################################################ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
42 ################################################################################ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
43 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
44 Title = "Prediction" |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
45 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
46 #if str( $type_cond.type_method) == "training": |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
47 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
48 Title = "$type_cond.method_cond.class_method" |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
49 #end if |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
50 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
51 pdf("classificationpdf.pdf", fonts = "Times", pointsize = 12) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
52 plot(0,type='n',axes=FALSE,ann=FALSE) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
53 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
54 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
55 title(main=paste0(Title," for file: \n\n", "$infile.display_name")) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
56 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
57 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
58 ##################### I) numbers and control plots ############################# |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
59 ################################################################################ |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
60 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
61 ## table with values |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
62 grid.table(property_df, rows= NULL) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
63 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
64 int_matrix = as.matrix(spectra(msidata)) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
65 NAcount = sum(is.na(int_matrix)) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
66 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
67 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
68 if (npeaks > 0 && NAcount==0){ |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
69 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
70 opar <- par() |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
71 |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
72 ######################## II) Training ####################################### |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
73 ############################################################################# |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
74 #if str( $type_cond.type_method) == "training": |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
75 print("training") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
76 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
77 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
78 ## load y response (will be needed in every training scenario) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
79 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
80 y_tabular = read.delim("$type_cond.annotation_file", header = $type_cond.tabular_header, stringsAsFactors = FALSE) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
81 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
82 #if str($type_cond.column_fold) == "None": |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
83 y_input = y_tabular[,c($type_cond.column_x, $type_cond.column_y, $type_cond.column_response)] |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
84 #else |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
85 y_input = y_tabular[,c($type_cond.column_x, $type_cond.column_y, $type_cond.column_response, $type_cond.column_fold)] |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
86 #end if |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
87 colnames(y_input)[1:2] = c("x", "y") |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
88 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
89 ## merge with coordinate information of msidata |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
90 msidata_coordinates = cbind(coord(msidata)[,1:2], c(1:ncol(msidata))) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
91 colnames(msidata_coordinates)[3] = "pixel_index" |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
92 merged_response = as.data.frame(merge(msidata_coordinates, y_input, by=c("x", "y"), all.x=TRUE)) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
93 merged_response[is.na(merged_response)] = "NA" |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
94 merged_response = merged_response[order(merged_response\$pixel_index),] |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
95 conditions = as.factor(merged_response[,4]) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
96 y_vector = conditions |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
97 |
15
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
98 ## colours selection: |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
99 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
100 #if str($colour_conditional.colour_type) == "manual_colour" |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
101 #set $color_string = ','.join(['"%s"' % $color.annotation_color for $color in $colour_conditional.colours]) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
102 colourvector = c($color_string) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
103 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
104 #elif str($colour_conditional.colour_type) == "colourpalette" |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
105 number_levels = (length(levels(conditions))) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
106 colourvector = noquote($colour_conditional.palettes)(number_levels) |
15
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
107 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
108 #end if |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
109 |
15
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
110 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
111 ## plot of y vector |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
112 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
113 position_df = as.data.frame(cbind(coord(msidata)[,1:2], conditions)) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
114 y_plot = ggplot(position_df, aes(x=x, y=y, fill=conditions))+ |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
115 geom_tile() + |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
116 coord_fixed()+ |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
117 ggtitle("Distribution of the conditions")+ |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
118 theme_bw()+ |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
119 theme( |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
120 plot.background = element_blank(), |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
121 panel.grid.major = element_blank(), |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
122 panel.grid.minor = element_blank())+ |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
123 theme(text=element_text(family="ArialMT", face="bold", size=15))+ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
124 theme(legend.position="bottom",legend.direction="vertical")+ |
15
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
125 guides(fill=guide_legend(ncol=4,byrow=TRUE))+ |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
126 scale_discrete_manual(aesthetics = c("colour", "fill"), values = colourvector) |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
127 coord_labels = aggregate(cbind(x,y)~conditions, data=position_df, mean, na.rm=TRUE, na.action="na.pass") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
128 ##coord_labels\$file_number = gsub( "_.*$", "", coord_labels\$conditions) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
129 print(y_plot) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
130 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
131 ## plot of folds |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
132 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
133 #if str($type_cond.column_fold) != "None": |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
134 fold_vector = as.factor(merged_response[,5]) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
135 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
136 position_df = as.data.frame(cbind(coord(msidata)[,1:2], fold_vector)) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
137 fold_plot = ggplot(position_df, aes(x=x, y=y, fill=fold_vector))+ |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
138 geom_tile() + |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
139 coord_fixed()+ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
140 ggtitle("Distribution of the fold variable")+ |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
141 theme_bw()+ |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
142 theme( |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
143 plot.background = element_blank(), |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
144 panel.grid.major = element_blank(), |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
145 panel.grid.minor = element_blank())+ |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
146 theme(text=element_text(family="ArialMT", face="bold", size=15))+ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
147 theme(legend.position="bottom",legend.direction="vertical")+ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
148 guides(fill=guide_legend(ncol=4,byrow=TRUE)) |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
149 coord_labels = aggregate(cbind(x,y)~fold_vector, data=position_df, mean, na.rm=TRUE, na.action="na.pass") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
150 ##coord_labels\$file_number = gsub( "_.*$", "", coord_labels\$fold_vector) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
151 print(fold_plot) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
152 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
153 #end if |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
154 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
155 ######################## PLS ############################# |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
156 #if str( $type_cond.method_cond.class_method) == "PLS": |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
157 print("PLS") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
158 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
159 ######################## PLS - CV ############################# |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
160 #if str( $type_cond.method_cond.analysis_cond.PLS_method) == "cvapply": |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
161 print("PLS cv") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
162 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
163 ## set variables for components and number of response groups |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
164 components = c($type_cond.method_cond.analysis_cond.plscv_comp) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
165 number_groups = length(levels(y_vector)) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
166 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
167 ## PLS-cvApply: |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
168 msidata.cv.pls <- crossValidate(msidata, .y = y_vector, .fold = fold_vector, .fun = "PLS", ncomp = components) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
169 |
2
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
170 ## remove msidata to clean up RAM space |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
171 rm(msidata) |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
172 gc() |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
173 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
174 ## create new summary table with cv results |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
175 results_list <- NULL |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
176 for (i in seq_along(components)) { |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
177 ## extract accuracy, sensitivity, and specificity for the current i |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
178 accuracy <- round(as.data.frame(msidata.cv.pls@resultData@listData[[i]][["accuracy"]]), digits=2) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
179 sensitivity <- round(as.data.frame(msidata.cv.pls@resultData@listData[[i]][["sensitivity"]]), digits=2) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
180 specificity <- round(as.data.frame(msidata.cv.pls@resultData@listData[[i]][["specificity"]]), digits=2) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
181 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
182 ## combine accuracy, sensitivity, and specificity into one data frame |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
183 result_df <- cbind(folds = rownames(accuracy), ncomp = i, accuracy, sensitivity, specificity) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
184 colnames(result_df) <- c("folds", "ncomp", "accuracy", "sensitivity", "specificity") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
185 rownames(result_df) <- NULL |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
186 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
187 ## add column names with ncomp as first row to each dataframe |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
188 col_names_row <- data.frame(folds = "folds", ncomp = paste0("ncomp", i), accuracy = "accuracy", sensitivity = "sensitivity", specificity = "specificity") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
189 result_df <- rbind(col_names_row, result_df) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
190 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
191 results_list[[i]] <- result_df |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
192 } |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
193 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
194 ## combine all data frames in the list into one data frame |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
195 results_df <- do.call(rbind, results_list) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
196 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
197 summary_df <- results_df |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
198 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
199 ## new table and plot of accuracies over all components |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
200 summary.cv.pls = as.data.frame(summary(msidata.cv.pls)) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
201 plot(0,type='n',axes=FALSE,ann=FALSE) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
202 summary.cv.pls.round <- round(summary.cv.pls, digits=2) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
203 grid.table(summary.cv.pls.round, rows=NULL) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
204 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
205 accuracy_plot = ggplot(summary.cv.pls, aes(x = ncomp, y = Accuracy)) + |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
206 geom_point(color = "blue", size = 3) + # Add points |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
207 geom_line() + |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
208 theme_bw() |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
209 print(accuracy_plot) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
210 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
211 ## print table with summary in pdf |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
212 par(opar) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
213 plot(0,type='n',axes=FALSE,ann=FALSE) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
214 title(main="Summary for the different components\n", adj=0.5) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
215 ## 20 rows fits in one page: |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
216 if (nrow(summary_df)<=20){ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
217 grid.table(summary_df, rows= NULL) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
218 }else{ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
219 grid.table(summary_df[1:20,], rows= NULL) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
220 mincount = 21 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
221 maxcount = 40 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
222 for (count20 in 1:(ceiling(nrow(summary_df)/20)-1)){ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
223 plot(0,type='n',axes=FALSE,ann=FALSE) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
224 if (maxcount <= nrow(summary_df)){ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
225 grid.table(summary_df[mincount:maxcount,], rows= NULL) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
226 mincount = mincount+20 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
227 maxcount = maxcount+20 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
228 }else{### stop last page with last sample otherwise NA in table |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
229 grid.table(summary_df[mincount:nrow(summary_df),], rows= NULL)} |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
230 } |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
231 } |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
232 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
233 ## optional output as .RData |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
234 #if $output_rdata: |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
235 save(msidata.cv.pls, file="$classification_rdata") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
236 #end if |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
237 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
238 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
239 ######################## PLS - analysis ########################### |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
240 #elif str( $type_cond.method_cond.analysis_cond.PLS_method) == "PLS_analysis": |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
241 print("PLS analysis") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
242 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
243 ## set variables for components and number of response groups |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
244 component = c($type_cond.method_cond.analysis_cond.pls_comp) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
245 number_groups = length(levels(y_vector)) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
246 |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
247 ### stop if multiple values for PLS components are selected what sets component to 0 |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
248 tryCatch( |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
249 { |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
250 |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
251 if (component==0) |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
252 { |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
253 stop(call.=FALSE) |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
254 } |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
255 }, |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
256 error=function(cond) { |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
257 ## in case user used multiple inputs for component - this is only possible in cv apply |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
258 message("Error during PLS training") |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
259 message("Possible problems: Multiple values for component were selected - this is only possible in cvapply but not for PLS analysis or component was set to 0 but minimum for component is 1)") |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
260 stop(call.=FALSE) |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
261 } |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
262 ) |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
263 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
264 ### pls analysis and coefficients plot |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
265 msidata.pls <- PLS(msidata, y = y_vector, ncomp = component, scale=$type_cond.method_cond.analysis_cond.pls_scale) |
15
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
266 plot(msidata.pls, main="PLS coefficients per m/z", col=colourvector) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
267 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
268 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
269 ## create new summary table |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
270 summary_df = as.data.frame(summary(msidata.pls)) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
271 colnames(summary_df) = c("Number of Components", "Accuracy", "Sensitivity", "Specificity") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
272 summary_df = round(summary_df, digits = 2) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
273 plot(0,type='n',axes=FALSE,ann=FALSE) |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
274 grid.table(summary_df, rows= NULL) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
275 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
276 ## Yweights plot: represent the importance of each response variable in predicting each component |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
277 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
278 #if $type_cond.method_cond.analysis_cond.PLS_Yweights == "TRUE": |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
279 Yweights = as.data.frame(msidata.pls@resultData@listData[[1]][["Yweights"]]) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
280 Yweights = round(Yweights, digits = 4) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
281 Yweights.class <- cbind("class" = rownames(Yweights), Yweights) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
282 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
283 plot(0,type='n',axes=FALSE,ann=FALSE) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
284 text(x = 0.95, y = 1, "Yweights", cex = 2, font = 2) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
285 grid.table(Yweights.class, rows= NULL) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
286 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
287 #end if |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
288 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
289 coefficient_plot = plot(msidata.pls, values="coefficients", lwd=2, main = "PLS coefficients per m/z") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
290 print(coefficient_plot) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
291 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
292 ## m/z and pixel information output |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
293 pls_classes = data.frame(msidata.pls@resultData@listData[[1]][["class"]]) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
294 |
3
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
295 ## pixel names and coordinates |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
296 x_coords = msidata_coordinates@listData[["x"]] |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
297 y_coords = msidata_coordinates@listData[["y"]] |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
298 pixel_names = paste0("xy_", x_coords, "_", y_coords) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
299 |
2
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
300 ## remove msidata to clean up RAM space |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
301 rm(msidata) |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
302 gc() |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
303 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
304 pls_classes2 = data.frame(pixel_names, x_coords, y_coords, pls_classes, y_vector) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
305 colnames(pls_classes2) = c("pixel_name", "x", "y","predicted_class", "annotated_class") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
306 pls_classes2\$correct <- ifelse(pls_classes2\$predicted_class==pls_classes2\$annotated_class, T, F) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
307 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
308 write.table(pls_classes2, file="$pixeloutput", quote = FALSE, row.names = FALSE, col.names=TRUE, sep = "\t") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
309 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
310 correctness = round(sum(pls_classes2\$correct)/length(pls_classes2\$correct)*100,2) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
311 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
312 ## replace topFeatures table with coefficients table |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
313 coefficients.df = as.data.frame(msidata.pls@resultData@listData[[1]][["coefficients"]]) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
314 row_names <- msidata.pls@featureData@mz |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
315 coefficients.df.rownames <- cbind("mz" = row_names, coefficients.df) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
316 write.table(coefficients.df.rownames, file = "$coefficients", quote = FALSE, sep = "\t", row.names = FALSE) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
317 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
318 ## add loadings and weights table |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
319 loadings.df = as.data.frame(msidata.pls@resultData@listData[[1]][["loadings"]]) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
320 loadings.df <- cbind("mz" = row_names, loadings.df) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
321 new_names <- paste0("loadings_", names(loadings.df)[-1]) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
322 names(loadings.df)[-1] <- new_names |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
323 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
324 weights.df = as.data.frame(msidata.pls@resultData@listData[[1]][["weights"]]) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
325 weights.df <- cbind("mz" = row_names, weights.df) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
326 new_names <- paste0("weights_", names(weights.df)[-1]) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
327 names(weights.df)[-1] <- new_names |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
328 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
329 ## combine loading and weights table |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
330 merged.load.wei = merge(loadings.df, weights.df, by = "mz") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
331 write.table(merged.load.wei, file = "$loadings_weights", quote = FALSE, sep = "\t", row.names = FALSE) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
332 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
333 ## image with predicted classes |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
334 prediction_df = as.data.frame(cbind(coord(msidata.pls)[,1:2], pls_classes)) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
335 colnames(prediction_df) = c("x", "y", "predicted_classes") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
336 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
337 prediction_plot = ggplot(prediction_df, aes(x=x, y=y, fill=predicted_classes))+ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
338 geom_tile() + |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
339 coord_fixed()+ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
340 ggtitle("Predicted condition for each pixel")+ |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
341 theme_bw()+ |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
342 theme( |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
343 plot.background = element_blank(), |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
344 panel.grid.major = element_blank(), |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
345 panel.grid.minor = element_blank())+ |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
346 theme(text=element_text(family="ArialMT", face="bold", size=15))+ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
347 theme(legend.position="bottom",legend.direction="vertical")+ |
15
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
348 guides(fill=guide_legend(ncol=4,byrow=TRUE))+ |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
349 scale_discrete_manual(aesthetics = c("colour", "fill"), values = colourvector) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
350 coord_labels = aggregate(cbind(x,y)~predicted_classes, data=prediction_df, mean, na.rm=TRUE, na.action="na.pass") |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
351 ##coord_labels\$file_number = gsub( "_.*$", "", coord_labels\$predicted_classes) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
352 print(prediction_plot) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
353 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
354 ## correctness plot |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
355 correctness_plot = ggplot(pls_classes2, aes(x=x, y=y, fill=correct))+ |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
356 geom_tile() + |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
357 coord_fixed()+ |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
358 ggtitle(paste0("Correctness of classification: ", correctness, " %"))+ |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
359 scale_fill_manual(values = c("TRUE" = "orange","FALSE" = "darkblue"))+ |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
360 theme_bw()+ |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
361 theme( |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
362 plot.background = element_blank(), |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
363 panel.grid.major = element_blank(), |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
364 panel.grid.minor = element_blank())+ |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
365 theme(text=element_text(family="ArialMT", face="bold", size=15))+ |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
366 theme(legend.position="bottom",legend.direction="vertical")+ |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
367 guides(fill=guide_legend(ncol=2,byrow=TRUE)) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
368 coord_labels = aggregate(cbind(x,y)~correct, data=pls_classes2, mean, na.rm=TRUE, na.action="na.pass") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
369 ##coord_labels\$file_number = gsub( "_.*$", "", coord_labels\$predicted_classes) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
370 print(correctness_plot) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
371 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
372 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
373 ### optional output as .RData |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
374 #if $output_rdata: |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
375 save(msidata.pls, file="$classification_rdata") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
376 #end if |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
377 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
378 #end if |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
379 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
380 ######################## OPLS ############################# |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
381 #elif str( $type_cond.method_cond.class_method) == "OPLS": |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
382 print("OPLS") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
383 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
384 ######################## OPLS -CV ############################# |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
385 #if str( $type_cond.method_cond.opls_analysis_cond.opls_method) == "opls_cvapply": |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
386 print("OPLS cv") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
387 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
388 ## set variables for components and number of response groups |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
389 components = c($type_cond.method_cond.opls_analysis_cond.opls_cvcomp) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
390 number_groups = length(levels(y_vector)) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
391 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
392 ## OPLS-cvApply: |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
393 msidata.cv.opls <- crossValidate(msidata, .y = y_vector, .fold = fold_vector, .fun = "OPLS", ncomp = components) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
394 |
2
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
395 ## remove msidata to clean up RAM space |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
396 rm(msidata) |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
397 gc() |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
398 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
399 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
400 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
401 ## new table with cv results to replace the old summary table |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
402 results_list <- NULL |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
403 for (i in seq_along(components)) { |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
404 ## extract accuracy, sensitivity, and specificity for the current i |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
405 accuracy <- round(as.data.frame(msidata.cv.opls@resultData@listData[[i]][["accuracy"]]), digits=2) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
406 sensitivity <- round(as.data.frame(msidata.cv.opls@resultData@listData[[i]][["sensitivity"]]), digits=2) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
407 specificity <- round(as.data.frame(msidata.cv.opls@resultData@listData[[i]][["specificity"]]), digits=2) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
408 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
409 ## combine accuracy, sensitivity, and specificity into one data frame |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
410 result_df <- cbind(folds = rownames(accuracy), ncomp = i, accuracy, sensitivity, specificity) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
411 colnames(result_df) <- c("folds", "ncomp", "accuracy", "sensitivity", "specificity") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
412 rownames(result_df) <- NULL |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
413 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
414 ## add column names with ncomp as first row to each dataframe |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
415 col_names_row <- data.frame(folds = "folds", ncomp = paste0("ncomp", i), accuracy = "accuracy", sensitivity = "sensitivity", specificity = "specificity") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
416 result_df <- rbind(col_names_row, result_df) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
417 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
418 results_list[[i]] <- result_df |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
419 } |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
420 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
421 ## combine all data frames in the list into one data frame |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
422 results_df <- do.call(rbind, results_list) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
423 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
424 summary_df <- results_df |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
425 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
426 ## new table and plot of accuracies over all components |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
427 summary.cv.opls = as.data.frame(summary(msidata.cv.opls)) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
428 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
429 ## table with values |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
430 plot(0,type='n',axes=FALSE,ann=FALSE) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
431 summary.cv.opls.round <- round(summary.cv.opls, digits=2) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
432 grid.table(summary.cv.opls.round, rows=NULL) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
433 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
434 accuracy_plot = ggplot(summary.cv.opls, aes(x = ncomp, y = Accuracy)) + |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
435 geom_point(color = "blue", size = 3) + # Add points |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
436 geom_line() + |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
437 theme_bw() |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
438 print(accuracy_plot) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
439 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
440 ## print table with summary in pdf |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
441 par(opar) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
442 plot(0,type='n',axes=FALSE,ann=FALSE) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
443 title(main="Summary for the different components\n", adj=0.5) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
444 ## 20 rows fits in one page: |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
445 if (nrow(summary_df)<=20){ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
446 grid.table(summary_df, rows= NULL) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
447 }else{ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
448 grid.table(summary_df[1:20,], rows= NULL) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
449 mincount = 21 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
450 maxcount = 40 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
451 for (count20 in 1:(ceiling(nrow(summary_df)/20)-1)){ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
452 plot(0,type='n',axes=FALSE,ann=FALSE) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
453 if (maxcount <= nrow(summary_df)){ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
454 grid.table(summary_df[mincount:maxcount,], rows= NULL) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
455 mincount = mincount+20 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
456 maxcount = maxcount+20 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
457 }else{### stop last page with last sample otherwise NA in table |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
458 grid.table(summary_df[mincount:nrow(summary_df),], rows= NULL)} |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
459 } |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
460 } |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
461 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
462 ## optional output as .RData |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
463 #if $output_rdata: |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
464 save(msidata.cv.opls, file="$classification_rdata") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
465 #end if |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
466 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
467 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
468 ######################## OPLS -analysis ########################### |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
469 #elif str( $type_cond.method_cond.opls_analysis_cond.opls_method) == "opls_analysis": |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
470 print("OPLS analysis") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
471 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
472 ## set variables for components and number of response groups |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
473 component = c($type_cond.method_cond.opls_analysis_cond.opls_comp) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
474 number_groups = length(levels(y_vector)) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
475 |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
476 ### stop if multiple values for OPLS components are selected what sets component to 0 |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
477 tryCatch( |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
478 { |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
479 |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
480 if (component==0) |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
481 { |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
482 stop(call.=FALSE) |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
483 } |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
484 }, |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
485 error=function(cond) { |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
486 ## in case user used multiple inputs for component - this is only possible in cv apply |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
487 message("Error during OPLS training") |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
488 message("Possible problems: Multiple values for component were selected - this is only possible in cvapply but not for OPLS analysis or component was set to 0 but minimum for component is 1)") |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
489 stop(call.=FALSE) |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
490 } |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
491 ) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
492 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
493 ### opls analysis and coefficients plot |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
494 msidata.opls <- OPLS(msidata, y = y_vector, ncomp = component, scale=$type_cond.method_cond.opls_analysis_cond.opls_scale) |
15
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
495 plot(msidata.opls, main="OPLS coefficients per m/z", col=colourvector) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
496 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
497 ## create new summary table |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
498 summary_df = as.data.frame(summary(msidata.opls)) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
499 colnames(summary_df) = c("Number of Components", "Accuracy", "Sensitivity", "Specificity") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
500 summary_df = round(summary_df, digits = 2) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
501 plot(0,type='n',axes=FALSE,ann=FALSE) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
502 grid.table(summary_df, rows= NULL) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
503 |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
504 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
505 #if $type_cond.method_cond.opls_analysis_cond.OPLS_Yweights == "TRUE": |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
506 ## Yweights plot: represent the importance of each response variable in predicting each component |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
507 Yweights = as.data.frame(msidata.opls@resultData@listData[[1]][["Yweights"]]) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
508 Yweights = round(Yweights, digits = 4) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
509 Yweights.class <- cbind("class" = rownames(Yweights), Yweights) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
510 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
511 plot(0,type='n',axes=FALSE,ann=FALSE) |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
512 text(x = 0.95, y = 1, "Yweights", cex = 2, font = 2) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
513 grid.table(Yweights.class, rows= NULL) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
514 #end if |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
515 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
516 coefficient_plot = plot(msidata.opls, values="coefficients", lwd=2, main = "OPLS coefficients per m/z") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
517 print(coefficient_plot) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
518 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
519 ## m/z and pixel information output |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
520 opls_classes = data.frame(msidata.opls@resultData@listData[[1]][["class"]]) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
521 |
3
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
522 ## pixel names and coordinates |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
523 x_coords = msidata_coordinates@listData[["x"]] |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
524 y_coords = msidata_coordinates@listData[["y"]] |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
525 pixel_names = paste0("xy_", x_coords, "_", y_coords) |
3
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
526 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
527 opls_classes2 = data.frame(pixel_names, x_coords, y_coords, opls_classes, y_vector) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
528 colnames(opls_classes2) = c("pixel names", "x", "y","predicted_class", "annotated_class") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
529 opls_classes2\$correct <- ifelse(opls_classes2\$predicted_class == opls_classes2\$annotated_class, T, F) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
530 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
531 write.table(opls_classes2, file="$pixeloutput", quote = FALSE, row.names = FALSE, col.names=TRUE, sep = "\t") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
532 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
533 correctness = round(sum(opls_classes2\$correct)/length(opls_classes2\$correct)*100,2) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
534 |
2
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
535 ## remove msidata to clean up RAM space |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
536 rm(msidata) |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
537 gc() |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
538 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
539 ## replace topFeatures table with coefficients table |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
540 coefficients.df = as.data.frame(msidata.opls@resultData@listData[[1]][["coefficients"]]) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
541 row_names <- msidata.opls@featureData@mz |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
542 coefficients.df.rownames <- cbind("mz" = row_names, coefficients.df) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
543 write.table(coefficients.df.rownames, file = "$coefficients", quote = FALSE, sep = "\t", row.names = FALSE) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
544 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
545 ## add loadings and weights table |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
546 loadings.df = as.data.frame(msidata.opls@resultData@listData[[1]][["loadings"]]) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
547 loadings.df <- cbind("mz" = row_names, loadings.df) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
548 new_names <- paste0("loadings_", names(loadings.df)[-1]) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
549 names(loadings.df)[-1] <- new_names |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
550 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
551 weights.df = as.data.frame(msidata.opls@resultData@listData[[1]][["weights"]]) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
552 weights.df <- cbind("mz" = row_names, weights.df) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
553 new_names <- paste0("weights_", names(weights.df)[-1]) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
554 names(weights.df)[-1] <- new_names |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
555 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
556 ## combine loading and weights table |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
557 merged.load.wei = merge(loadings.df, weights.df, by = "mz") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
558 write.table(merged.load.wei, file = "$loadings_weights", quote = FALSE, sep = "\t", row.names = FALSE) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
559 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
560 ## image with predicted classes |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
561 prediction_df = as.data.frame(cbind(coord(msidata.opls)[,1:2], opls_classes)) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
562 colnames(prediction_df) = c("x", "y", "predicted_classes") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
563 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
564 prediction_plot = ggplot(prediction_df, aes(x=x, y=y, fill=predicted_classes))+ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
565 geom_tile() + |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
566 coord_fixed()+ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
567 ggtitle("Predicted condition for each pixel")+ |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
568 theme_bw()+ |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
569 theme( |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
570 plot.background = element_blank(), |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
571 panel.grid.major = element_blank(), |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
572 panel.grid.minor = element_blank())+ |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
573 theme(text=element_text(family="ArialMT", face="bold", size=15))+ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
574 theme(legend.position="bottom",legend.direction="vertical")+ |
15
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
575 guides(fill=guide_legend(ncol=4,byrow=TRUE))+ |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
576 scale_discrete_manual(aesthetics = c("colour", "fill"), values = colourvector) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
577 coord_labels = aggregate(cbind(x,y)~predicted_classes, data=prediction_df, mean, na.rm=TRUE, na.action="na.pass") |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
578 ##coord_labels\$file_number = gsub( "_.*$", "", coord_labels\$predicted_classes) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
579 print(prediction_plot) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
580 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
581 ## correctness plot |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
582 correctness_plot = ggplot(opls_classes2, aes(x=x, y=y, fill=correct))+ |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
583 geom_tile() + |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
584 coord_fixed()+ |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
585 ggtitle(paste0("Correctness of classification: ", correctness, " %"))+ |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
586 scale_fill_manual(values = c("TRUE" = "orange","FALSE" = "darkblue"))+ |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
587 theme_bw()+ |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
588 theme( |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
589 plot.background = element_blank(), |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
590 panel.grid.major = element_blank(), |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
591 panel.grid.minor = element_blank())+ |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
592 theme(text=element_text(family="ArialMT", face="bold", size=15))+ |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
593 theme(legend.position="bottom",legend.direction="vertical")+ |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
594 guides(fill=guide_legend(ncol=2,byrow=TRUE)) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
595 coord_labels = aggregate(cbind(x,y)~correct, data=opls_classes2, mean, na.rm=TRUE, na.action="na.pass") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
596 ##coord_labels\$file_number = gsub( "_.*$", "", coord_labels\$predicted_classes) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
597 print(correctness_plot) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
598 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
599 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
600 ## optional output as .RData |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
601 #if $output_rdata: |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
602 save(msidata.opls, file="$classification_rdata") |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
603 #end if |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
604 #end if |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
605 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
606 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
607 ######################## SSC ############################# |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
608 #elif str( $type_cond.method_cond.class_method) == "spatialShrunkenCentroids": |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
609 print("SSC") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
610 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
611 ######################## SSC - CV ############################# |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
612 #if str( $type_cond.method_cond.ssc_analysis_cond.ssc_method) == "ssc_cvapply": |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
613 print("SSC cv") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
614 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
615 ## set variables for components and number of response groups |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
616 number_groups = length(levels(y_vector)) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
617 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
618 ## SSC-cvApply: |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
619 msidata.cv.ssc <- crossValidate(msidata, .y = y_vector,.fold = fold_vector,.fun = "spatialShrunkenCentroids", r = c($type_cond.method_cond.ssc_r), s = c($type_cond.method_cond.ssc_s), method = "$type_cond.method_cond.ssc_kernel_method") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
620 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
621 |
2
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
622 ## remove msidata to clean up RAM space |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
623 rm(msidata) |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
624 gc() |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
625 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
626 ## new table and plot of accuracies over all components |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
627 summary.cv.ssc = as.data.frame(summary(msidata.cv.ssc)) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
628 summary.cv.ssc.round <- round(summary.cv.ssc, digits=2) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
629 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
630 par(opar) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
631 plot(0,type='n',axes=FALSE,ann=FALSE) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
632 title(main="Summary for the different parameters\n", adj=0.5) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
633 ## 20 rows fits in one page: |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
634 if (nrow(summary.cv.ssc.round)<=20){ |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
635 grid.table(summary.cv.ssc.round, rows= NULL) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
636 }else{ |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
637 grid.table(summary.cv.ssc.round[1:20,], rows= NULL) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
638 mincount = 21 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
639 maxcount = 40 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
640 for (count20 in 1:(ceiling(nrow(summary.cv.ssc.round)/20)-1)){ |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
641 plot(0,type='n',axes=FALSE,ann=FALSE) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
642 if (maxcount <= nrow(summary.cv.ssc.round)){ |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
643 grid.table(summary.cv.ssc.round[mincount:maxcount,], rows= NULL) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
644 mincount = mincount+20 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
645 maxcount = maxcount+20 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
646 }else{### stop last page with last sample otherwise NA in table |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
647 grid.table(summary.cv.ssc.round[mincount:nrow(summary.cv.ssc.round),], rows= NULL)} |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
648 } |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
649 } |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
650 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
651 ## new accuracy plots |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
652 #if $type_cond.method_cond.ssc_analysis_cond.ssc_cv_accuracy_plot == "TRUE": |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
653 accuracy_plot = ggplot(summary.cv.ssc, aes(x = s, y = Accuracy)) + |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
654 geom_point(color = "blue", size = 3) + # Add points |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
655 geom_line() + |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
656 theme_bw() + |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
657 facet_wrap(~ r) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
658 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
659 print(accuracy_plot) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
660 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
661 ## or as alternative accuracy plot for each r value on own page: |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
662 #elif $type_cond.method_cond.ssc_analysis_cond.ssc_cv_accuracy_plot == "FALSE": |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
663 unique_r_values <- unique(summary.cv.ssc\$r) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
664 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
665 for (r_value in unique_r_values) { |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
666 ## Create a subset for the current value of r |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
667 plot_data <- subset(summary.cv.ssc, r == r_value) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
668 ## Create the accuracy plot for the current value of r |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
669 accuracy_plot <- ggplot(plot_data, aes(x = s, y = Accuracy)) + |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
670 geom_point(color = "blue", size = 3) + # Add points |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
671 geom_line() + |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
672 theme_bw() + |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
673 ggtitle(paste("Plot for r =", r_value)) + # Add a title |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
674 theme(plot.title = element_text(hjust = 0.5)) # Center the title |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
675 print(accuracy_plot) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
676 } |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
677 #end if |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
678 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
679 ## table with cv values per fold group for each combination of r and s |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
680 r_s_df = as.data.frame(msidata.cv.ssc@modelData@listData) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
681 r_s_df\$parameter = paste0("r=", r_s_df\$r, " and s=", r_s_df\$s) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
682 iteration = seq_along(r_s_df\$parameter) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
683 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
684 results_list <- NULL |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
685 for (i in iteration) { |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
686 ## extract accuracy, sensitivity, and specificity for the current i |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
687 accuracy <- round(as.data.frame(msidata.cv.ssc@resultData@listData[[i]][["accuracy"]]), digits=2) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
688 sensitivity <- round(as.data.frame(msidata.cv.ssc@resultData@listData[[i]][["sensitivity"]]), digits=2) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
689 specificity <- round(as.data.frame(msidata.cv.ssc@resultData@listData[[i]][["specificity"]]), digits=2) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
690 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
691 ## combine accuracy, sensitivity, and specificity into one data frame |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
692 result_df <- cbind(folds = rownames(accuracy), parameter = r_s_df\$parameter[i], accuracy, sensitivity, specificity) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
693 colnames(result_df) <- c("folds", "parameter", "accuracy", "sensitivity", "specificity") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
694 rownames(result_df) <- NULL |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
695 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
696 ## add column names as first row to each dataframe |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
697 col_names_row <- data.frame(folds = "folds", parameter = "parameter", accuracy = "accuracy", sensitivity = "sensitivity", specificity = "specificity") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
698 result_df <- rbind(col_names_row, result_df) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
699 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
700 results_list[[i]] <- result_df |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
701 } |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
702 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
703 ## combine all data frames in the list into one data frame |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
704 results_df <- do.call(rbind, results_list) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
705 summary_df <- results_df |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
706 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
707 par(opar) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
708 plot(0,type='n',axes=FALSE,ann=FALSE) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
709 title(main="More advanced folds output table: \n Summary for each fold\n", adj=0.5) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
710 ## 20 rows fits in one page: |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
711 if (nrow(summary_df)<=20){ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
712 grid.table(summary_df, rows= NULL) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
713 }else{ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
714 grid.table(summary_df[1:20,], rows= NULL) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
715 mincount = 21 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
716 maxcount = 40 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
717 for (count20 in 1:(ceiling(nrow(summary_df)/20)-1)){ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
718 plot(0,type='n',axes=FALSE,ann=FALSE) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
719 if (maxcount <= nrow(summary_df)){ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
720 grid.table(summary_df[mincount:maxcount,], rows= NULL) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
721 mincount = mincount+20 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
722 maxcount = maxcount+20 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
723 }else{### stop last page with last sample otherwise NA in table |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
724 grid.table(summary_df[mincount:nrow(summary_df),], rows= NULL)} |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
725 } |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
726 } |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
727 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
728 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
729 ## new code to extract best r and s values |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
730 max_accuracy_index <- which.max(summary.cv.ssc\$Accuracy) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
731 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
732 ## extract the corresponding values of "r" and "s" |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
733 highest_accuracy_r <- summary.cv.ssc\$r[max_accuracy_index] |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
734 highest_accuracy_s <- summary.cv.ssc\$s[max_accuracy_index] |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
735 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
736 #if $type_cond.method_cond.ssc_analysis_cond.write_best_params: |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
737 write.table(highest_accuracy_r, file="$best_r", quote = FALSE, row.names = FALSE, col.names=FALSE, sep = "\t") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
738 write.table(highest_accuracy_s, file="$best_s", quote = FALSE, row.names = FALSE, col.names=FALSE, sep = "\t") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
739 #end if |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
740 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
741 ## optional output as .RData |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
742 #if $output_rdata: |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
743 save(msidata.cv.ssc, file="$classification_rdata") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
744 #end if |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
745 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
746 ######################## SSC -analysis ########################### |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
747 #elif str( $type_cond.method_cond.ssc_analysis_cond.ssc_method) == "ssc_analysis": |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
748 print("SSC analysis") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
749 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
750 ## set variables for components and number of response groups |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
751 number_groups = length(levels(y_vector)) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
752 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
753 ## SSC analysis and plot |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
754 msidata.ssc <- spatialShrunkenCentroids(msidata, y = y_vector, r = c($type_cond.method_cond.ssc_r), s = c($type_cond.method_cond.ssc_s), method = "$type_cond.method_cond.ssc_kernel_method") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
755 print(plot(msidata.ssc, values = "statistic", model = list(r = c($type_cond.method_cond.ssc_r), s = c($type_cond.method_cond.ssc_s)), col=colourvector, lwd=2)) |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
756 |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
757 ### stop if multiple values for r and s were used as input |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
758 tryCatch( |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
759 { |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
760 |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
761 if (length(names(msidata.ssc@resultData))>1) |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
762 { |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
763 stop(call.=FALSE) |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
764 } |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
765 }, |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
766 error=function(cond) { |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
767 ## in case user used multiple inputs for r or s stop - this is only possible in cv apply |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
768 message("Error during SSC training") |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
769 message("Possible problem: multiple values for r or s selected - this is only possible in cvapply but not for spatial shrunken centroid analysis)") |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
770 stop(call.=FALSE) |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
771 } |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
772 ) |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
773 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
774 summary_df = as.data.frame(summary(msidata.ssc)) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
775 summary_df = round(summary_df, digits=3) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
776 colnames(summary_df) = c("Radius r", "Shrinkage s", "Features/Class", "Accuracy", "Sensitivity", "Specificity") |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
777 plot(0,type='n',axes=FALSE,ann=FALSE) |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
778 grid.table(summary_df, rows= NULL) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
779 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
780 ## image of the best m/z |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
781 minimumy = min(coord(msidata)[,2]) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
782 maximumy = max(coord(msidata)[,2]) |
7
6f4c34f8d5ba
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents:
4
diff
changeset
|
783 print(image(msidata, mz = topFeatures(msidata.ssc)[1,1], normalize.image = "linear", contrast.enhance = "histogram",smooth.image="gaussian", ylim= c(maximumy+0.2*maximumy,minimumy-0.2*minimumy), main="best m/z heatmap")) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
784 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
785 ## m/z and pixel information output |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
786 x_coords = msidata_coordinates@listData[["x"]] |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
787 y_coords = msidata_coordinates@listData[["y"]] |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
788 pixel_names = paste0("xy_", x_coords, "_", y_coords) |
3
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
789 |
2
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
790 |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
791 ## remove msidata to clean up RAM space |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
792 rm(msidata) |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
793 gc() |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
794 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
795 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
796 ## toplabel (m/z features output) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
797 ssc_toplabels = topFeatures(msidata.ssc, n=$type_cond.method_cond.ssc_toplabels) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
798 ssc_toplabels@listData[["centers"]] = round (ssc_toplabels@listData[["centers"]], digits = 6) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
799 ssc_toplabels@listData[["statistic"]] = round (ssc_toplabels@listData[["statistic"]], digits = 6) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
800 write.table(ssc_toplabels, file="$mzfeatures", quote = FALSE, row.names = FALSE, col.names=TRUE, sep = "\t") |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
801 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
802 print(image(msidata.ssc, model=list(r = c($type_cond.method_cond.ssc_r), s = c($type_cond.method_cond.ssc_s)), ylim= c(maximumy+0.2*maximumy,minimumy-0.2*minimumy), col=colourvector, values="class", layout=c(1,1), main="Class Prediction")) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
803 print(image(msidata.ssc, model=list(r = c($type_cond.method_cond.ssc_r), s = c($type_cond.method_cond.ssc_s)), ylim= c(maximumy+0.2*maximumy,minimumy-0.2*minimumy), col=colourvector, values="probability", layout=c(1,1), main="Class Probabilities")) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
804 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
805 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
806 ## pixel output with correctness |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
807 ssc_classes = data.frame(msidata.ssc@resultData@listData[[1]][["class"]]) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
808 colnames(ssc_classes) = "predicted_class" |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
809 ssc_classes\$predicted_class = ifelse(is.na(ssc_classes\$predicted_class), "NA", as.character(ssc_classes\$predicted_class)) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
810 ssc_probabilities = data.frame(msidata.ssc@resultData@listData[[1]][["probability"]]) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
811 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
812 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
813 ssc_classes2 = data.frame(pixel_names, x_coords, y_coords, ssc_classes, ssc_probabilities, y_vector) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
814 colnames(ssc_classes2) = c("pixel_names", "x", "y","predicted_classes", levels(msidata.ssc@resultData@listData[[1]][["class"]]), "annotated_class") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
815 ssc_classes2\$correct<- ifelse(ssc_classes2\$predicted_classes==ssc_classes2\$annotated_class, T, F) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
816 correctness = round(sum(ssc_classes2\$correct, na.rm = TRUE)/length(ssc_classes2\$correct)*100,2) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
817 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
818 write.table(ssc_classes2, file="$pixeloutput", quote = FALSE, row.names = FALSE, col.names=TRUE, sep = "\t") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
819 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
820 correctness_plot = ggplot(ssc_classes2, aes(x=x, y=y, fill=correct))+ |
9
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
821 geom_tile() + |
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
822 coord_fixed()+ |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
823 ggtitle(paste0("Correctness of classification: ", correctness, " %"))+ |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
824 scale_fill_manual(values = c("TRUE" = "orange","FALSE" = "darkblue"))+ |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
825 theme_bw()+ |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
826 theme( |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
827 plot.background = element_blank(), |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
828 panel.grid.major = element_blank(), |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
829 panel.grid.minor = element_blank())+ |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
830 theme(text=element_text(family="ArialMT", face="bold", size=15))+ |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
831 theme(legend.position="bottom",legend.direction="vertical")+ |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
832 guides(fill=guide_legend(ncol=2,byrow=TRUE)) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
833 coord_labels = aggregate(cbind(x,y)~correct, data=ssc_classes2, mean, na.rm=TRUE, na.action="na.pass") |
9
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
834 ##coord_labels\$file_number = gsub( "_.*$", "", coord_labels\$predicted_classes) |
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
835 print(correctness_plot) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
836 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
837 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
838 ## optional output as .RData |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
839 #if $output_rdata: |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
840 save(msidata.ssc, file="$classification_rdata") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
841 #end if |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
842 #end if |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
843 #end if |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
844 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
845 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
846 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
847 ######################## II) Prediction ############################# |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
848 ############################################################################# |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
849 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
850 #elif str($type_cond.type_method) == "prediction": |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
851 print("prediction") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
852 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
853 training_data = loadRData("$type_cond.training_result") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
854 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
855 #if str($type_cond.new_y_values_cond.new_y_values) == "new_response": |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
856 print("new response") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
857 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
858 new_y_tabular = read.delim("$type_cond.new_y_values_cond.new_response_file", header = $type_cond.new_y_values_cond.new_tabular_header, stringsAsFactors = FALSE) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
859 new_y_input = new_y_tabular[,c($type_cond.new_y_values_cond.column_new_x, $type_cond.new_y_values_cond.column_new_y, $type_cond.new_y_values_cond.column_new_response)] |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
860 colnames(new_y_input)[1:2] = c("x", "y") |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
861 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
862 ## merge with coordinate information of msidata |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
863 msidata_coordinates = cbind(coord(msidata)[,1:2], c(1:ncol(msidata))) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
864 colnames(msidata_coordinates)[3] = "pixel_index" |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
865 merged_response = as.data.frame(merge(msidata_coordinates, new_y_input, by=c("x", "y"), all.x=TRUE)) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
866 merged_response[is.na(merged_response)] = "NA" |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
867 merged_response = merged_response[order(merged_response\$pixel_index),] |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
868 new_y_vector = as.factor(merged_response[,4]) |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
869 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
870 prediction = predict(training_data, msidata, newy = new_y_vector) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
871 |
15
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
872 ##numbers of levels for colour selection |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
873 number_levels = length(levels(new_y_vector)) |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
874 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
875 ##new summary table |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
876 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
877 ##if SSC classification, summary table has more results: |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
878 #if str($type_cond.classification_type) == "SSC_classifier": |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
879 print("SSC classification summary") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
880 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
881 summary_df = as.data.frame(summary(prediction)) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
882 summary_df = round(summary_df, digits=3) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
883 colnames(summary_df) = c("Radius r", "Shrinkage s", "Features/Class", "Accuracy", "Sensitivity", "Specificity") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
884 plot(0,type='n',axes=FALSE,ann=FALSE) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
885 grid.table(summary_df, rows= NULL) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
886 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
887 ## else PLS or OPLS classifier: |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
888 #else |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
889 print("PLS/OPLS classifier") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
890 summary_df = as.data.frame(summary(prediction)) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
891 colnames(summary_df) = c("Component", "Accuracy", "Sensitivity", "Specificity") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
892 summary_df = round(summary_df, digits = 2) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
893 plot(0,type='n',axes=FALSE,ann=FALSE) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
894 grid.table(summary_df, rows= NULL) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
895 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
896 #end if |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
897 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
898 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
899 ##else for prediction without a new annotation (no calculation of accuracy): |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
900 #else |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
901 prediction = predict(training_data, msidata) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
902 number_levels = length(levels(training_data@resultData@listData[[1]][["class"]])) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
903 #end if |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
904 |
15
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
905 ## colours selection: |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
906 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
907 #if str($colour_conditional.colour_type) == "manual_colour" |
15
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
908 #set $color_string = ','.join(['"%s"' % $color.annotation_color for $color in $colour_conditional.colours]) |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
909 colourvector = c($color_string) |
15
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
910 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
911 #elif str($colour_conditional.colour_type) == "colourpalette" |
15
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
912 colourvector = noquote($colour_conditional.palettes)(number_levels) |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
913 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
914 #end if |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
915 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
916 ## m/z and pixel information output |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
917 predicted_classes = data.frame(prediction@resultData@listData[[1]][["class"]]) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
918 msidata_coordinates = cbind(coord(msidata)[,1:2], c(1:ncol(msidata))) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
919 colnames(msidata_coordinates)[3] = "pixel_index" |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
920 x_coords = msidata_coordinates@listData[["x"]] |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
921 y_coords = msidata_coordinates@listData[["y"]] |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
922 pixel_names = paste0("xy_", x_coords, "_", y_coords) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
923 predicted_classes2 = data.frame(pixel_names, x_coords, y_coords, predicted_classes) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
924 colnames(predicted_classes2) = c("pixel names", "x", "y","predicted condition") |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
925 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
926 ##topFeatures only available for SSC; for PLS and OPLS coefficients loading and weights are provided |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
927 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
928 #if str($type_cond.classification_type) == "SSC_classifier": |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
929 predicted_toplabels = topFeatures(prediction, n=$type_cond.classification_type_cond.predicted_toplabels) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
930 predicted_toplabels <- as.data.frame(predicted_toplabels) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
931 predicted_toplabels[,6:7] <-round(predicted_toplabels[,6:7], digits = 5) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
932 write.table(predicted_toplabels, file="$mzfeatures", quote = FALSE, row.names = FALSE, col.names=TRUE, sep = "\t") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
933 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
934 #else |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
935 ## if PLS or OPLS classifier, coefficients, loadings, and weights instead of topFeatures |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
936 coefficients.df = as.data.frame(prediction@resultData@listData[[1]][["coefficients"]]) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
937 row_names <- prediction@featureData@mz |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
938 coefficients.df <- cbind("mz" = row_names, coefficients.df) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
939 write.table(coefficients.df, file = "$coefficients", quote = FALSE, sep = "\t", row.names = FALSE) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
940 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
941 ## add loadings and weights table |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
942 loadings.df = as.data.frame(prediction@resultData@listData[[1]][["loadings"]]) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
943 loadings.df <- cbind("mz" = row_names, loadings.df) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
944 new_names <- paste0("loadings_", names(loadings.df)[-1]) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
945 names(loadings.df)[-1] <- new_names |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
946 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
947 weights.df = as.data.frame(prediction@resultData@listData[[1]][["weights"]]) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
948 weights.df <- cbind("mz" = row_names, weights.df) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
949 new_names <- paste0("weights_", names(weights.df)[-1]) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
950 names(weights.df)[-1] <- new_names |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
951 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
952 ## combine loading and weights table |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
953 merged.load.wei = merge(loadings.df, weights.df, by = "mz") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
954 write.table(merged.load.wei, file = "$loadings_weights", quote = FALSE, sep = "\t", row.names = FALSE) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
955 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
956 #end if |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
957 |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
958 ##predicted classes |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
959 prediction_df = as.data.frame(cbind(coord(prediction)[,1:2], predicted_classes)) |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
960 colnames(prediction_df) = c("x", "y", "predicted_classes") |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
961 |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
962 #if str($type_cond.classification_type) == "SSC_classifier": |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
963 ## this seems to work only for SSC, therefore overwrite tables |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
964 predicted_probabilities = data.frame(prediction@resultData@listData[[1]][["probability"]]) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
965 predicted_classes2 = data.frame(pixel_names, x_coords, y_coords, predicted_classes, predicted_probabilities) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
966 colnames(predicted_classes2) = c("pixel names", "x", "y","predicted condition", levels(prediction@resultData@listData[[1]][["class"]])) |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
967 ## also image modes are specific to SSC |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
968 print(predicted_classes2[1:5,]) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
969 print(image(prediction, values="class", layout=c(1,1), main="Class Prediction", ylim= c(maximumy+0.2*maximumy,minimumy-0.2*minimumy), col=colourvector)) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
970 print(image(prediction, values="probability", layout=c(1,1), main="Class Probabilities",ylim= c(maximumy+0.2*maximumy,minimumy-0.2*minimumy), col=colourvector)) |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
971 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
972 #else |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
973 prediction_plot = ggplot(prediction_df, aes(x=x, y=y, fill=predicted_classes))+ |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
974 geom_tile()+ |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
975 coord_fixed()+ |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
976 ggtitle("Predicted condition for each spectrum")+ |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
977 theme_bw()+ |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
978 theme( |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
979 plot.background = element_blank(), |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
980 panel.grid.major = element_blank(), |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
981 panel.grid.minor = element_blank())+ |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
982 theme(text=element_text(family="ArialMT", face="bold", size=15))+ |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
983 theme(legend.position="bottom", legend.direction="vertical")+ |
15
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
984 guides(fill=guide_legend(ncol=4, byrow=TRUE))+ |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
985 scale_discrete_manual(aesthetics = c("colour", "fill"), values = colourvector) |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
986 coord_labels = aggregate(cbind(x,y)~predicted_classes, data=prediction_df, mean, na.rm=TRUE, na.action="na.pass") |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
987 ##coord_labels\$file_number = gsub( "_.*§", "", coord_labels\$predicted_classes) |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
988 print(prediction_plot) |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
989 #end if |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
990 |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
991 #if str($type_cond.new_y_values_cond.new_y_values) == "new_response": |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
992 ## image with right and wrong classes: |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
993 comparison_df = as.data.frame(cbind(prediction_df, new_y_vector)) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
994 colnames(comparison_df) = c("x", "y", "predicted_class", "annotated_class") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
995 comparison_df\$predicted_class = ifelse(is.na(comparison_df\$predicted_class), "NA", as.character(comparison_df\$predicted_class)) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
996 comparison_df\$correct <- ifelse(comparison_df\$predicted_class==comparison_df\$annotated_class, T, F) |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
997 correctness = round(sum(comparison_df\$correct, na.rm = TRUE)/length(comparison_df\$correct)*100,2) |
9
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
998 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
999 correctness_plot = ggplot(comparison_df, aes(x=x, y=y, fill=correct))+ |
9
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
1000 geom_tile()+ |
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
1001 scale_fill_manual(values = c("TRUE" = "orange","FALSE" = "darkblue"))+ |
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
1002 coord_fixed()+ |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1003 ggtitle(paste0("Correctness of classification: ", correctness, " %"))+ |
9
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
1004 theme_bw()+ |
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
1005 theme(text=element_text(family="ArialMT", face="bold", size=15))+ |
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
1006 theme(legend.position="bottom",legend.direction="vertical")+ |
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
1007 guides(fill=guide_legend(ncol=2,byrow=TRUE)) |
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
1008 print(correctness_plot) |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1009 #end if |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1010 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1011 ## pixel output |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1012 #if str($type_cond.new_y_values_cond.new_y_values) == "new_response": |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1013 print("new response output") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1014 write.table(comparison_df, file="$pixeloutput", quote = FALSE, row.names = FALSE, col.names=TRUE, sep = "\t") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1015 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1016 #else |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1017 write.table(predicted_classes2, file="$pixeloutput", quote = FALSE, row.names = FALSE, col.names=TRUE, sep = "\t") |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1018 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1019 #end if |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1020 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1021 ## optional output as .RData |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1022 #if $output_rdata: |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1023 msidata = prediction |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1024 save(msidata, file="$classification_rdata") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1025 #end if |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1026 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1027 #end if |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1028 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1029 dev.off() |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1030 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1031 }else{ |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1032 plot.new() |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1033 text(0.5, 0.5, "Inputfile has no intensities > 0 \n or contains NA values.", cex = 1.5) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1034 print("Inputfile has no intensities > 0 or contains NA values") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1035 dev.off() |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1036 } |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1037 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1038 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1039 ]]></configfile> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1040 </configfiles> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1041 <inputs> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1042 <expand macro="reading_msidata"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1043 <conditional name="type_cond"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1044 <param name="type_method" type="select" label="Analysis step to perform"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1045 <option value="training" selected="True">training</option> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1046 <option value="prediction">prediction</option> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1047 </param> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1048 <when value="training"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1049 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1050 <param name="annotation_file" type="data" format="tabular" label="Load tabular file with pixel coordinates and their classes" |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1051 help="Three or four columns: x values, y values, response values, optionally fold values"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1052 <param name="column_x" data_ref="annotation_file" label="Column with x values" type="data_column"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1053 <param name="column_y" data_ref="annotation_file" label="Column with y values" type="data_column"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1054 <param name="column_response" data_ref="annotation_file" label="Column with response (condition) values" type="data_column" help="This is the condition (pixel group) which will be classified"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1055 <param name="column_fold" data_ref="annotation_file" optional="True" label="Column with fold values - only neccessary for cvapply" type="data_column" help="Each fold must contain pixels of all response groups and is used for cross validation"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1056 <param name="tabular_header" type="boolean" label="Tabular files contain a header line" truevalue="TRUE" falsevalue="FALSE"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1057 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1058 <conditional name="method_cond"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1059 <param name="class_method" type="select" label="Select the method for classification"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1060 <option value="PLS" selected="True">PLS-DA</option> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1061 <option value="OPLS">OPLS-DA</option> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1062 <option value="spatialShrunkenCentroids">spatial shrunken centroids</option> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1063 </param> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1064 <when value="PLS"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1065 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1066 <conditional name="analysis_cond"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1067 <param name="PLS_method" type="select" label="Crossvalidation or analysis"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1068 <option value="cvapply" selected="True">cvApply</option> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1069 <option value="PLS_analysis">PLS-DA analysis</option> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1070 </param> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1071 <when value="cvapply"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1072 <param name="plscv_comp" type="text" value="1:2" |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1073 label="The number of PLS-DA components" help="For cvapply multiple values are allowed (e.g. 1,2,3 or 2:5). Mininum is 1."> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1074 <expand macro="sanitizer_multiple_digits"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1075 </param> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1076 </when> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1077 <when value="PLS_analysis"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1078 <param name="pls_comp" type="integer" value="5" |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1079 label="The optimal number of PLS-DA components as indicated by cross-validations (minimum is 1)" help="Run cvApply first to optain optimal number of PLS-DA components"/> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1080 <param name="pls_scale" type="boolean" label="Data scaling" truevalue="TRUE" falsevalue="FALSE"/> |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1081 <param name="PLS_Yweights" type="boolean" label="Y weights" help="Y weights represent the coefficients associated with the response variables and are used to model the relationship between predictors and responses in the context of classification. They represent the importance of each response variable in predicting each component. They can be useful if you have multiple response variables."/> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1082 <!--param name="pls_toplabels" type="integer" value="100 |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1083 label="Number of toplabels (m/z features) which should be written in tabular output"/--> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1084 </when> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1085 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1086 </when> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1087 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1088 <when value="OPLS"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1089 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1090 <conditional name="opls_analysis_cond"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1091 <param name="opls_method" type="select" label="Analysis step to perform"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1092 <option value="opls_cvapply" selected="True">cvApply</option> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1093 <option value="opls_analysis">OPLS-DA analysis</option> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1094 </param> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1095 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1096 <when value="opls_cvapply"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1097 <param name="opls_cvcomp" type="text" value="1:2" |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1098 label="The number of OPLS-DA components" help="For cvapply multiple values are allowed (e.g. 1,2,3 or 2:5). Minimum is 1."> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1099 <expand macro="sanitizer_multiple_digits"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1100 </param> |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1101 <!--param name="xnew_cv" type="boolean" truevalue="TRUE" falsevalue="FALSE" label="Keep new matrix"/--> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1102 </when> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1103 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1104 <when value="opls_analysis"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1105 <param name="opls_comp" type="integer" value="5" |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1106 label="The optimal number of OPLS-DA components as indicated by cross-validations (minimum is 1)" help="Run cvApply first to optain optimal number of OPLS-DA components"/> |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1107 <!--param name="xnew" type="boolean" truevalue="TRUE" falsevalue="FALSE" label="Keep new matrix"/--> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1108 <param name="opls_scale" type="boolean" truevalue="TRUE" falsevalue="FALSE" label="Data scaling"/> |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1109 <param name="OPLS_Yweights" type="boolean" label="Y weights" help="Y weights represent the coefficients associated with the response variables and are used to model the relationship between predictors and responses in the context of classification. They represent the importance of each response variable in predicting each component. They can be useful if you have multiple response variables."/> |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1110 <!--param name="opls_toplabels" type="integer" value="100" |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1111 label="Number of toplabels (m/z features) which should be written in tabular output"/--> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1112 </when> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1113 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1114 </when> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1115 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1116 <when value="spatialShrunkenCentroids"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1117 <conditional name="ssc_analysis_cond"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1118 <param name="ssc_method" type="select" label="Analysis step to perform"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1119 <option value="ssc_cvapply" selected="True">cvApply</option> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1120 <option value="ssc_analysis">spatial shrunken centroids analysis</option> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1121 </param> |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
1122 <when value="ssc_cvapply"> |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
1123 <param name="write_best_params" type="boolean" label="Write out best r and s values" help="Can be used to generate automatic classification workflow"/> |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1124 <param name="ssc_cv_accuracy_plot" type="boolean" label="Plot CV accuracy plots on one page (=Yes) or individual pages (=No)"/> |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
1125 </when> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1126 <when value="ssc_analysis"> |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1127 <param name="ssc_toplabels" type="integer" value="100" |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1128 label="Number of toplabels (m/z features) which should be written in tabular output"/> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1129 </when> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1130 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1131 <param name="ssc_r" type="text" value="2" |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1132 label="The spatial neighborhood radius of nearby pixels to consider (r)" help="For cvapply multiple values are allowed (e.g. 0,1,2,3 or 2:5)"> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1133 <expand macro="sanitizer_multiple_digits"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1134 </param> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1135 <param name="ssc_s" type="text" value="2" |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1136 label="The sparsity thresholding parameter by which to shrink the t-statistics (s)." help="For cvapply multiple values are allowed (e.g. 0,1,2 or 2:5)"> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1137 <expand macro="sanitizer_multiple_digits"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1138 </param> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1139 <param name="ssc_kernel_method" type="select" display="radio" label = "The method to use to calculate the spatial smoothing kernels for the embedding. The 'gaussian' method refers to spatially-aware (SA) weights, and 'adaptive' refers to spatially-aware structurally-adaptive (SASA) weights"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1140 <option value="gaussian">gaussian</option> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1141 <option value="adaptive" selected="True">adaptive</option> |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1142 </param> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1143 </when> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1144 </conditional> |
8
277dc652246e
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d008f6ea0f5c8435fb975a34cb99ea4d42c5ebd2"
galaxyp
parents:
7
diff
changeset
|
1145 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1146 </when> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1147 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1148 <when value="prediction"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1149 <param name="training_result" type="data" format="rdata" label="Result from previous classification training"/> |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1150 <conditional name="classification_type_cond"> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1151 <param name="classification_type" type="select" label="Which classification method was used"> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1152 <option value="PLS_classifier" selected="True" >PLS classifier</option> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1153 <option value="OPLS_classifier">OPLS classifier</option> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1154 <option value="SSC_classifier">SSC classifier</option> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1155 </param> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1156 <when value="PLS_classifier"/> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1157 <when value="OPLS_classifier"/> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1158 <when value="SSC_classifier"> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1159 <param name="predicted_toplabels" type="integer" value="100" |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1160 label="Number of toplabels (m/z features) which should be written in tabular output"/> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1161 </when> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1162 </conditional> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1163 <conditional name="new_y_values_cond"> |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
1164 <param name="new_y_values" type="select" label="Load annotations (optional, but allows accuracy calculations)"> |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
1165 <option value="no_new_response" selected="True">no</option> |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
1166 <option value="new_response">use annotations</option> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1167 </param> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1168 <when value="no_new_response"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1169 <when value="new_response"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1170 <param name="new_response_file" type="data" format="tabular" label="Load tabular file with pixel coordinates and the new response"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1171 <param name="column_new_x" data_ref="new_response_file" label="Column with x values" type="data_column"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1172 <param name="column_new_y" data_ref="new_response_file" label="Column with y values" type="data_column"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1173 <param name="column_new_response" data_ref="new_response_file" label="Column with new response values" type="data_column"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1174 <param name="new_tabular_header" type="boolean" label="Tabular files contain a header line" truevalue="TRUE" falsevalue="FALSE"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1175 </when> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1176 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1177 </when> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1178 </conditional> |
15
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
1179 <conditional name="colour_conditional"> |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
1180 <param name="colour_type" type="select" label="Choose a colour scheme"> |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
1181 <option value="colourpalette" selected="True" >Colour palette</option> |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
1182 <option value="manual_colour">Manual selection</option> |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
1183 </param> |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
1184 <when value="manual_colour"> |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
1185 <repeat name="colours" title="Colours for the plots" min="1" max="50"> |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
1186 <param name="annotation_color" type="color" label="Colours" value="#ff00ff" help="Numbers of colours should be the same as number of components"> |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
1187 <sanitizer> |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
1188 <valid initial="string.letters,string.digits"> |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
1189 <add value="#" /> |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
1190 </valid> |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
1191 </sanitizer> |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
1192 </param> |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
1193 </repeat> |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
1194 </when> |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
1195 <when value="colourpalette"> |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
1196 <param name="palettes" type="select" display="radio" label="Select a colourpalette"> |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
1197 <option value="hue_pal()" selected="True">hue</option> |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
1198 <option value="rainbow">rainbow</option> |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
1199 <option value="heat.colors">heat colors</option> |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
1200 <option value="terrain.colors">terrain colors</option> |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
1201 <option value="topo.colors">topo colors</option> |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
1202 <option value="cm.colors">cm colors</option> |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
1203 </param> |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
1204 </when> |
f28ad96b76dc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d0dc9303d449c63a6ffe8fbfe195951d5db9cb89-dirty"
galaxyp
parents:
14
diff
changeset
|
1205 </conditional> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1206 <param name="output_rdata" type="boolean" label="Results as .RData output" help="Can be used to generate a classification prediction on new data"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1207 </inputs> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1208 <outputs> |
2
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
1209 <data format="pdf" name="classification_images" from_work_dir="classificationpdf.pdf" label = "${tool.name} on ${on_string}: results"/> |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1210 <data format="tabular" name="mzfeatures" label="${tool.name} on ${on_string}: features"> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1211 <filter>type_cond['type_method'] == 'training' and type_cond['method_cond']['class_method'] == 'spatialShrunkenCentroids' and type_cond['method_cond']['ssc_analysis_cond']['ssc_method'] == 'ssc_analysis' or type_cond['type_method'] == 'prediction' and type_cond['classification_type_cond']['classification_type'] == 'SSC_classifier'</filter> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1212 </data> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1213 <data format="tabular" name="pixeloutput" label="${tool.name} on ${on_string}: pixels"> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1214 <filter>type_cond['type_method'] == 'training' and type_cond['method_cond']['class_method'] == 'PLS' and type_cond['method_cond']['analysis_cond']['PLS_method'] == 'PLS_analysis' or type_cond['type_method'] == 'training' and type_cond['method_cond']['class_method'] == 'OPLS' and type_cond['method_cond']['opls_analysis_cond']['opls_method'] == 'opls_analysis' or type_cond['type_method'] == 'training' and type_cond['method_cond']['class_method'] == 'spatialShrunkenCentroids' and type_cond['method_cond']['ssc_analysis_cond']['ssc_method'] == 'ssc_analysis' or type_cond['type_method'] == 'prediction'</filter> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1215 </data> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1216 <data format="tabular" name="coefficients" label="${tool.name} on ${on_string}: coefficients"> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1217 <filter>type_cond['type_method'] == 'training' and type_cond['method_cond']['class_method'] == 'PLS' and type_cond['method_cond']['analysis_cond']['PLS_method'] == 'PLS_analysis' or type_cond['type_method'] == 'training' and type_cond['method_cond']['class_method'] == 'OPLS' and type_cond['method_cond']['opls_analysis_cond']['opls_method'] == 'opls_analysis' or type_cond['type_method'] == 'prediction' and type_cond['classification_type_cond']['classification_type'] == 'PLS_classifier' or type_cond['type_method'] == 'prediction' and type_cond['classification_type_cond']['classification_type'] == 'OPLS_classifier'</filter> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1218 </data> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1219 <data format="tabular" name="loadings_weights" label="${tool.name} on ${on_string}: loadings and weights"> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1220 <filter>type_cond['type_method'] == 'training' and type_cond['method_cond']['class_method'] == 'PLS' and type_cond['method_cond']['analysis_cond']['PLS_method'] == 'PLS_analysis' or type_cond['type_method'] == 'training' and type_cond['method_cond']['class_method'] == 'OPLS' and type_cond['method_cond']['opls_analysis_cond']['opls_method'] == 'opls_analysis' or type_cond['type_method'] == 'prediction' and type_cond['classification_type_cond']['classification_type'] == 'PLS_classifier' or type_cond['type_method'] == 'prediction' and type_cond['classification_type_cond']['classification_type'] == 'OPLS_classifier'</filter> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1221 </data> |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
1222 <data format="txt" name="best_r" label="${tool.name} on ${on_string}:best r"> |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
1223 <filter>type_cond['type_method'] == 'training' and type_cond['method_cond']['class_method'] == 'spatialShrunkenCentroids' and type_cond['method_cond']['ssc_analysis_cond']['ssc_method'] == 'ssc_cvapply' and type_cond['method_cond']['ssc_analysis_cond']['write_best_params']</filter> |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
1224 </data> |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
1225 <data format="txt" name="best_s" label="${tool.name} on ${on_string}:best s"> |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
1226 <filter>type_cond['type_method'] == 'training' and type_cond['method_cond']['class_method'] == 'spatialShrunkenCentroids' and type_cond['method_cond']['ssc_analysis_cond']['ssc_method'] == 'ssc_cvapply' and type_cond['method_cond']['ssc_analysis_cond']['write_best_params']</filter> |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1227 </data> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1228 <data format="rdata" name="classification_rdata" label="${tool.name} on ${on_string}: results.RData"> |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1229 <filter>output_rdata</filter> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1230 </data> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1231 </outputs> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1232 <tests> |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1233 <test expect_num_outputs="1"> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1234 <param name="infile" value="testfile_squares.rdata" ftype="rdata"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1235 <conditional name="type_cond"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1236 <param name="type_method" value="training"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1237 <param name="annotation_file" value= "pixel_annotation_file1.tabular" ftype="tabular"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1238 <param name="column_x" value="1"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1239 <param name="column_y" value="2"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1240 <param name="column_response" value="4"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1241 <param name="column_fold" value="3"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1242 <param name="tabular_header" value="False"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1243 <conditional name="method_cond"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1244 <param name="class_method" value="PLS"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1245 <conditional name="analysis_cond"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1246 <param name="PLS_method" value="cvapply"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1247 <param name="plscv_comp" value="2:4"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1248 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1249 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1250 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1251 <output name="classification_images" file="test1.pdf" compare="sim_size" delta="2000"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1252 </test> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1253 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1254 <test expect_num_outputs="5"> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1255 <param name="infile" value="testfile_squares.rdata" ftype="rdata"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1256 <conditional name="type_cond"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1257 <param name="type_method" value="training"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1258 <param name="annotation_file" value= "pixel_annotation_file1.tabular" ftype="tabular"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1259 <param name="column_x" value="1"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1260 <param name="column_y" value="2"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1261 <param name="column_response" value="4"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1262 <param name="tabular_header" value="False"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1263 <conditional name="method_cond"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1264 <param name="class_method" value="PLS"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1265 <conditional name="analysis_cond"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1266 <param name="PLS_method" value="PLS_analysis"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1267 <param name="pls_comp" value="2"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1268 <param name="pls_scale" value="TRUE"/> |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1269 <param name="PLS_Yweights" value="TRUE"/> |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1270 <!--param name="pls_toplabels" value="100"/--> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1271 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1272 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1273 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1274 <param name="output_rdata" value="True"/> |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1275 <output name="coefficients"> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1276 <assert_contents> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1277 <has_text text="900.004699707031"/> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1278 <has_text text="962.870727539062"/> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1279 <has_text text="999.606872558594"/> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1280 </assert_contents> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1281 </output> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1282 <output name="loadings_weights"> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1283 <assert_contents> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1284 <has_text text="900.076354980469"/> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1285 <has_text text="950.495910644531"/> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1286 <has_text text="989.024536132812"/> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1287 </assert_contents> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1288 </output> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1289 <output name="pixeloutput" file="pixels_test2.tabular"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1290 <output name="classification_images" file="test2.pdf" compare="sim_size"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1291 <output name="classification_rdata" file="test2.rdata" compare="sim_size"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1292 </test> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1293 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1294 <test expect_num_outputs="1"> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1295 <param name="infile" value="testfile_squares.rdata" ftype="rdata"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1296 <conditional name="type_cond"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1297 <param name="type_method" value="training"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1298 <param name="annotation_file" value= "random_factors.tabular" ftype="tabular"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1299 <param name="column_x" value="1"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1300 <param name="column_y" value="2"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1301 <param name="column_response" value="4"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1302 <param name="column_fold" value="3"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1303 <param name="tabular_header" value="False"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1304 <conditional name="method_cond"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1305 <param name="class_method" value="OPLS"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1306 <conditional name="opls_analysis_cond"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1307 <param name="opls_method" value="opls_cvapply"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1308 <param name="opls_cvcomp" value="1:2"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1309 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1310 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1311 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1312 <output name="classification_images" file="test3.pdf" compare="sim_size"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1313 </test> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1314 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1315 <test expect_num_outputs="5"> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1316 <param name="infile" value="testfile_squares.rdata" ftype="rdata"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1317 <conditional name="type_cond"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1318 <param name="type_method" value="training"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1319 <param name="annotation_file" value= "random_factors.tabular" ftype="tabular"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1320 <param name="column_x" value="1"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1321 <param name="column_y" value="2"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1322 <param name="column_response" value="4"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1323 <param name="tabular_header" value="False"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1324 <conditional name="method_cond"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1325 <param name="class_method" value="OPLS"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1326 <conditional name="opls_analysis_cond"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1327 <param name="opls_method" value="opls_analysis"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1328 <param name="opls_comp" value="3"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1329 <param name="opls_scale" value="FALSE"/> |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1330 <param name="PLS_Yweights" value="FALSE"/> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1331 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1332 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1333 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1334 <param name="output_rdata" value="True"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1335 <output name="pixeloutput" file="pixels_test4.tabular"/> |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1336 <output name="coefficients"> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1337 <assert_contents> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1338 <has_text text="900.148010253906"/> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1339 <has_text text="974.132446289062"/> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1340 <has_text text="999.908935546875"/> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1341 </assert_contents> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1342 </output> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1343 <output name="loadings_weights"> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1344 <assert_contents> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1345 <has_text text="901.581848144531"/> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1346 <has_text text="939.189086914062"/> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1347 <has_text text="984.185363769531"/> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1348 </assert_contents> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1349 </output> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1350 <output name="classification_images" file="test4.pdf" compare="sim_size"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1351 <output name="classification_rdata" file="test4.rdata" compare="sim_size"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1352 </test> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1353 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1354 <test expect_num_outputs="3"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1355 <param name="infile" value="testfile_squares.rdata" ftype="rdata"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1356 <conditional name="type_cond"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1357 <param name="type_method" value="training"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1358 <param name="annotation_file" value= "pixel_annotation_file1.tabular" ftype="tabular"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1359 <param name="column_x" value="1"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1360 <param name="column_y" value="2"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1361 <param name="column_response" value="3"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1362 <param name="column_fold" value="4"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1363 <param name="tabular_header" value="False"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1364 <conditional name="method_cond"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1365 <param name="class_method" value="spatialShrunkenCentroids"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1366 <conditional name="ssc_analysis_cond"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1367 <param name="ssc_method" value="ssc_cvapply"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1368 <param name="ssc_r" value="1:2"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1369 <param name="ssc_s" value="2:3"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1370 <param name="ssc_kernel_method" value="adaptive"/> |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1371 <param name="write_best_params" value="TRUE"/> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1372 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1373 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1374 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1375 <output name="classification_images" file="test5.pdf" compare="sim_size"/> |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1376 <output name="best_r" file="best_r_test5.txt"/> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1377 <output name="best_s" file="best_s_test5.txt"/> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1378 </test> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1379 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1380 <test expect_num_outputs="4"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1381 <param name="infile" value="testfile_squares.rdata" ftype="rdata"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1382 <conditional name="type_cond"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1383 <param name="type_method" value="training"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1384 <param name="annotation_file" value= "random_factors.tabular" ftype="tabular"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1385 <param name="column_x" value="1"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1386 <param name="column_y" value="2"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1387 <param name="column_response" value="4"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1388 <conditional name="method_cond"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1389 <param name="class_method" value="spatialShrunkenCentroids"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1390 <conditional name="ssc_analysis_cond"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1391 <param name="ssc_method" value="ssc_analysis"/> |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1392 <param name="ssc_toplabels" value="20"/> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1393 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1394 <param name="ssc_r" value="2"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1395 <param name="ssc_s" value="2"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1396 <param name="ssc_kernel_method" value="adaptive"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1397 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1398 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1399 <param name="output_rdata" value="True"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1400 <output name="mzfeatures" file="features_test6.tabular"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1401 <output name="pixeloutput" file="pixels_test6.tabular"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1402 <output name="classification_images" file="test6.pdf" compare="sim_size"/> |
7
6f4c34f8d5ba
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents:
4
diff
changeset
|
1403 <output name="classification_rdata" file="test6.rdata" compare="sim_size" delta="15000"/> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1404 </test> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1405 |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1406 <test expect_num_outputs="5"> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1407 <param name="infile" value="testfile_squares.rdata" ftype="rdata"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1408 <conditional name="type_cond"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1409 <param name="type_method" value="prediction"/> |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1410 <param name="type_method" value="prediction"/> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1411 <param name="training_result" value="test2.rdata" ftype="rdata"/> |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1412 <param name="classification_type" value="PLS_classifier"/> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1413 <conditional name="new_y_values_cond"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1414 <param name="new_y_values" value="new_response"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1415 <param name="new_response_file" value="pixel_annotation_file1.tabular" ftype="tabular"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1416 <param name="column_new_x" value="1"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1417 <param name="column_new_y" value="2"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1418 <param name="column_new_response" value="4"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1419 <param name="new_tabular_header" value="False"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1420 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1421 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1422 <param name="output_rdata" value="True"/> |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1423 <output name="coefficients" file="coefficients_test7.tabular"/> |
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1424 <output name="loadings_weights" file="loadings_and_weights_test7.tabular"/> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1425 <output name="pixeloutput" file="pixels_test7.tabular"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1426 <output name="classification_images" file="test7.pdf" compare="sim_size"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1427 <output name="classification_rdata" file="test7.rdata" compare="sim_size" /> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1428 </test> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1429 </tests> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1430 <help> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1431 <![CDATA[ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1432 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1433 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1434 @CARDINAL_DESCRIPTION@ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1435 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1436 ----- |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1437 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1438 This tool provides three different Cardinal functions for supervised classification of mass-spectrometry imaging data. |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1439 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1440 @MSIDATA_INPUT_DESCRIPTION@ |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1441 - NA intensities are not allowed |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1442 - duplicated coordinates will be removed |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1443 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1444 - For training: tabular file with condition and fold for each pixel: Two columns for pixel coordinates (x and y values); one column with the condition for the pixel, which will be used for classification; for the cross validation (cvapply) another column with a fold is necessary, each fold must contain pixels of all response groups and is used for cross validation. Condition and fold columns are treated as factor to perform discriminant analysis (also when numeric values are provided). |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1445 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1446 :: |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1447 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1448 x_coord y_coord condition fold |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1449 1 1 A f1 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1450 2 1 A f2 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1451 3 1 A f3 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1452 1 2 B f1 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1453 2 2 B f2 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1454 3 2 B f3 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1455 ... |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1456 ... |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1457 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1458 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1459 - For prediction: RData output from previous classification run is needed as input, optionally new response values can be loaded with a tabular file containing x values, y values and the response |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1460 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1461 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1462 **Options** |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1463 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1464 - PLS-DA: partial least square discriminant analysis |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1465 - O-PLS-DA: Orthogonal partial least squares discriminant analysis |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1466 - Spatial shrunken centroids (more details in `Bemis et al. <https://doi.org/10.1074/mcp.O115.053918>`_) |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1467 - training and prediction |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1468 |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1469 - training can be done with cvapply that uses cross validation to find the best value for s, this requires not only a condition for each spectrum but also a fold (each fold should contain spectra of all conditions) |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
1470 - training with the best value for r and s gives the top m/z features for each condition and the predicted classification group for each spectrum |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1471 - training result can be saved as RData file that can be reused for prediction of further samples |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
1472 - prediction can calculate accuracies when the annotations are known and provided |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1473 |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1474 |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1475 .. image:: $PATH_TO_IMAGES/classification_overview.png |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1476 :width: 1000 |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1477 :height: 465 |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1478 |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1479 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1480 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1481 **Tips** |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1482 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1483 - The classification function will only run on files with valid intensity values (NA are not allowed) |
19
4c177985028a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents:
16
diff
changeset
|
1484 - Only a single input file is accepted, several files have to be combined previously, for example with the MSI combine tool. |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1485 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1486 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1487 **Output** |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1488 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1489 - Pdf with the heatmaps and plots for the classification |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1490 - Tabular file with information on m/z features and pixels: toplabels/classes |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1491 - Optional: RData output that can be used to predict new data or to explore the results more deeply with the Cardinal package in R |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1492 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1493 ]]> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1494 </help> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1495 <expand macro="citations"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1496 </tool> |
7
6f4c34f8d5ba
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents:
4
diff
changeset
|
1497 |