Mercurial > repos > galaxyp > cardinal_classification
annotate classification.xml @ 14:ece627528a78 draft
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
author | galaxyp |
---|---|
date | Fri, 07 May 2021 10:10:35 +0000 |
parents | 24c000517173 |
children | f28ad96b76dc |
rev | line source |
---|---|
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
1 <tool id="cardinal_classification" name="MSI classification" version="@VERSION@.1"> |
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> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
6 <expand macro="requirements"> |
1
6a03b201bc12
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
7 <requirement type="package" version="2.3">r-gridextra</requirement> |
9
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
8 <requirement type="package" version="3.3.2">r-ggplot2</requirement> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
9 </expand> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
10 <command detect_errors="exit_code"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
11 <![CDATA[ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
12 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
13 @INPUT_LINKING@ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
14 cat '${MSI_segmentation}' && |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
15 Rscript '${MSI_segmentation}' |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
16 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
17 ]]> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
18 </command> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
19 <configfiles> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
20 <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
|
21 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
22 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
23 ################################# 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
|
24 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
25 library(Cardinal) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
26 library(gridExtra) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
27 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
|
28 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
|
29 |
6f4c34f8d5ba
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents:
4
diff
changeset
|
30 @READING_MSIDATA@ |
6f4c34f8d5ba
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents:
4
diff
changeset
|
31 |
6f4c34f8d5ba
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents:
4
diff
changeset
|
32 msidata = as(msidata, "MSImageSet") ##coercion to MSImageSet |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
33 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
34 |
3
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
35 ## 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
|
36 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
|
37 |
2
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
38 @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
|
39 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
40 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
41 ######################################## PDF ################################### |
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 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
45 Title = "Prediction" |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
46 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
47 #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
|
48 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
49 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
|
50 #end if |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
51 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
52 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
|
53 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
|
54 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
55 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
56 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
|
57 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
58 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
59 ##################### 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
|
60 ################################################################################ |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
61 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
62 ## table with values |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
63 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
|
64 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
65 |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
66 if (npeaks > 0 && sum(is.na(spectra(msidata)))==0){ |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
67 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
68 opar <- par() |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
69 |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
70 ######################## II) Training ####################################### |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
71 ############################################################################# |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
72 #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
|
73 print("training") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
74 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
75 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
76 ## 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
|
77 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
78 y_tabular = read.delim("$type_cond.annotation_file", header = $type_cond.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
|
79 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
80 #if str($type_cond.column_fold) == "None": |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
81 y_input = y_tabular[,c($type_cond.column_x, $type_cond.column_y, $type_cond.column_response)] |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
82 #else |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
83 y_input = y_tabular[,c($type_cond.column_x, $type_cond.column_y, $type_cond.column_response, $type_cond.column_fold)] |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
84 #end if |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
85 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
86 colnames(y_input)[1:2] = c("x", "y") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
87 ## 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
|
88 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
|
89 colnames(msidata_coordinates)[3] = "pixel_index" |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
90 merged_response = merge(msidata_coordinates, y_input, by=c("x", "y"), all.x=TRUE) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
91 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
|
92 merged_response = merged_response[order(merged_response\$pixel_index),] |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
93 conditions = as.factor(merged_response[,4]) |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
94 y_vector = conditions |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
95 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
96 ## plot of y vector |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
97 |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
98 position_df = cbind(coord(msidata)[,1:2], conditions) |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
99 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
|
100 geom_tile() + |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
101 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
|
102 ggtitle("Distribution of the conditions")+ |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
103 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
|
104 theme( |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
105 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
|
106 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
|
107 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
|
108 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
|
109 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
|
110 guides(fill=guide_legend(ncol=4,byrow=TRUE)) |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
111 coord_labels = aggregate(cbind(x,y)~conditions, data=position_df, mean, na.rm=TRUE, na.action="na.pass") |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
112 coord_labels\$file_number = gsub( "_.*$", "", coord_labels\$conditions) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
113 print(y_plot) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
114 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
115 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
116 ## plot of folds |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
117 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
118 #if str($type_cond.column_fold) != "None": |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
119 fold_vector = as.factor(merged_response[,5]) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
120 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
121 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
122 position_df = cbind(coord(msidata)[,1:2], fold_vector) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
123 fold_plot = ggplot(position_df, aes(x=x, y=y, fill=fold_vector))+ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
124 geom_tile() + |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
125 coord_fixed()+ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
126 ggtitle("Distribution of the fold variable")+ |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
127 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
|
128 theme( |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
129 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
|
130 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
|
131 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
|
132 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
|
133 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
|
134 guides(fill=guide_legend(ncol=4,byrow=TRUE)) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
135 coord_labels = aggregate(cbind(x,y)~fold_vector, data=position_df, mean, na.rm=TRUE, na.action="na.pass") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
136 coord_labels\$file_number = gsub( "_.*$", "", coord_labels\$fold_vector) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
137 print(fold_plot) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
138 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
139 #end if |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
140 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
141 ######################## PLS ############################# |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
142 #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
|
143 print("PLS") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
144 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
145 ######################## PLS - CV ############################# |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
146 #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
|
147 print("PLS cv") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
148 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
149 ## 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
|
150 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
|
151 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
|
152 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
153 ## PLS-cvApply: |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
154 msidata.cv.pls <- cvApply(msidata, .y = y_vector, .fold = fold_vector, .fun = "PLS", ncomp = components) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
155 |
2
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
156 ## 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
|
157 rm(msidata) |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
158 gc() |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
159 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
160 ## create table with summary |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
161 count = 1 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
162 summary_plscv = list() |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
163 accuracy_vector = numeric() |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
164 for (iteration in components){ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
165 summary_iteration = summary(msidata.cv.pls)\$accuracy[[paste0("ncomp = ", iteration)]] |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
166 ## change class of numbers into numeric to round and calculate mean |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
167 summary_iteration2 = round(as.numeric(summary_iteration), digits=2) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
168 summary_matrix = matrix(summary_iteration2, nrow=4, ncol=number_groups) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
169 accuracy_vector[count] = mean(summary_matrix[1,]) ## vector with accuracies to find later maximum for plot |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
170 summary_iteration3 = cbind(rownames(summary_iteration), summary_matrix) ## include rownames in table |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
171 summary_iteration4 = t(summary_iteration3) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
172 summary_iteration5 = cbind(c(paste0("ncomp = ", iteration), colnames(summary_iteration)), summary_iteration4) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
173 summary_plscv[[count]] = summary_iteration5 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
174 count = count+1} ## create list with summary table for each component |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
175 summary_plscv = do.call(rbind, summary_plscv) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
176 summary_df = as.data.frame(summary_plscv) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
177 colnames(summary_df) = NULL |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
178 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
179 ## plots |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
180 ## plot to find ncomp with highest accuracy |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
181 plot(components, accuracy_vector, ylab = "mean accuracy",type="o", main="Mean accuracy of PLS classification") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
182 ncomp_max = components[which.max(accuracy_vector)] ## find ncomp with max. accuracy |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
183 ## one image for each sample/fold, 4 images per page |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
184 minimumy = min(coord(msidata.cv.pls)[,2]) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
185 maximumy = max(coord(msidata.cv.pls)[,2]) |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
186 image(msidata.cv.pls, model = list(ncomp = ncomp_max),ylim= c(maximumy+0.2*maximumy,minimumy-0.2*minimumy),layout = c(1, 1)) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
187 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
188 ## 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
|
189 par(opar) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
190 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
|
191 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
|
192 ## 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
|
193 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
|
194 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
|
195 }else{ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
196 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
|
197 mincount = 21 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
198 maxcount = 40 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
199 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
|
200 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
|
201 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
|
202 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
|
203 mincount = mincount+20 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
204 maxcount = maxcount+20 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
205 }else{### stop last page with last sample otherwise NA in table |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
206 grid.table(summary_df[mincount:nrow(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
|
207 } |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
208 } |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
209 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
210 ## 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
|
211 #if $output_rdata: |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
212 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
|
213 #end if |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
214 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
215 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
216 ######################## PLS - analysis ########################### |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
217 #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
|
218 print("PLS analysis") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
219 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
220 ## 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
|
221 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
|
222 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
|
223 |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
224 ### 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
|
225 tryCatch( |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
226 { |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
227 |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
228 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
|
229 { |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
230 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
|
231 } |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
232 }, |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
233 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
|
234 ## 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
|
235 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
|
236 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
|
237 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
|
238 } |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
239 ) |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
240 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
241 ### 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
|
242 msidata.pls <- PLS(msidata, y = y_vector, ncomp = component, scale=$type_cond.method_cond.analysis_cond.pls_scale) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
243 plot(msidata.pls, main="PLS coefficients per m/z") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
244 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
245 ### summary table of PLS |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
246 summary_table = summary(msidata.pls)\$accuracy[[paste0("ncomp = ",component)]] |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
247 summary_table2 = round(as.numeric(summary_table), digits=2) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
248 summary_matrix = matrix(summary_table2, nrow=4, ncol=number_groups) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
249 summary_table3 = cbind(rownames(summary_table), summary_matrix) ## include rownames in table |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
250 summary_table4 = t(summary_table3) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
251 summary_table5 = cbind(c(paste0("ncomp = ", component), colnames(summary_table)), summary_table4) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
252 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
|
253 grid.table(summary_table5, rows= NULL) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
254 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
255 ### image of the best m/z |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
256 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
|
257 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
|
258 print(image(msidata, mz = topFeatures(msidata.pls)[1,1], normalize.image = "linear", contrast.enhance = "histogram",ylim= c(maximumy+0.2*maximumy,minimumy-0.2*minimumy), smooth.image="gaussian", 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
|
259 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
260 ### m/z and pixel information output |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
261 pls_classes = data.frame(msidata.pls\$classes[[1]]) |
3
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
262 ## pixel names and coordinates |
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
263 ## to remove potential sample names and z dimension, split at comma and take only x and y |
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
264 x_coords = unlist(lapply(strsplit(names(pixels(msidata)), ","), `[[`, 1)) |
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
265 y_coords = unlist(lapply(strsplit(names(pixels(msidata)), ","), `[[`, 2)) |
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
266 x_coordinates = gsub("x = ","",x_coords) |
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
267 y_coordinates = gsub(" y = ","",y_coords) |
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
268 pixel_names = paste0("xy_", x_coordinates, "_", y_coordinates) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
269 |
2
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
270 ## 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
|
271 rm(msidata) |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
272 gc() |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
273 pls_classes2 = data.frame(pixel_names, x_coordinates, y_coordinates, pls_classes) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
274 colnames(pls_classes2) = c("pixel names", "x", "y","predicted condition") |
7
6f4c34f8d5ba
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents:
4
diff
changeset
|
275 pls_toplabels = topFeatures(msidata.pls, n=Inf) |
2
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
276 pls_toplabels[,4:6] <-round(pls_toplabels[,4:6],6) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
277 write.table(pls_toplabels, file="$mzfeatures", 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
|
278 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
|
279 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
280 ## image with predicted classes |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
281 prediction_df = cbind(coord(msidata.pls)[,1:2], pls_classes) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
282 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
|
283 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
284 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
|
285 geom_tile() + |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
286 coord_fixed()+ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
287 ggtitle("Predicted condition for each pixel")+ |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
288 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
|
289 theme( |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
290 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
|
291 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
|
292 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
|
293 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
|
294 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
|
295 guides(fill=guide_legend(ncol=4,byrow=TRUE)) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
296 coord_labels = aggregate(cbind(x,y)~predicted_classes, data=prediction_df, mean, na.rm=TRUE, na.action="na.pass") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
297 coord_labels\$file_number = gsub( "_.*$", "", coord_labels\$predicted_classes) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
298 print(prediction_plot) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
299 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
300 ### 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
|
301 #if $output_rdata: |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
302 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
|
303 #end if |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
304 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
305 #end if |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
306 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
307 ######################## OPLS ############################# |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
308 #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
|
309 print("OPLS") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
310 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
311 ######################## OPLS -CV ############################# |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
312 #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
|
313 print("OPLS cv") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
314 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
315 ## 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
|
316 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
|
317 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
|
318 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
319 ## OPLS-cvApply: |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
320 msidata.cv.opls <- cvApply(msidata, .y = y_vector, .fold = fold_vector, .fun = "OPLS", ncomp = components) |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
321 ## for use to reduce msidata: keep.Xnew = $type_cond.method_cond.opls_analysis_cond.xnew_cv |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
322 |
2
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
323 ## 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
|
324 rm(msidata) |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
325 gc() |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
326 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
327 ## create table with summary |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
328 count = 1 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
329 summary_oplscv = list() |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
330 accuracy_vector = numeric() |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
331 for (iteration in components){ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
332 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
333 summary_iteration = summary(msidata.cv.opls)\$accuracy[[paste0("ncomp = ", iteration)]] |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
334 ## change class of numbers into numeric to round and calculate mean |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
335 summary_iteration2 = round(as.numeric(summary_iteration), digits=2) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
336 summary_matrix = matrix(summary_iteration2, nrow=4, ncol=number_groups) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
337 accuracy_vector[count] = mean(summary_matrix[1,]) ## vector with accuracies to find later maximum for plot |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
338 summary_iteration3 = cbind(rownames(summary_iteration), summary_matrix) ## include rownames in table |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
339 summary_iteration4 = t(summary_iteration3) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
340 summary_iteration5 = cbind(c(paste0("ncomp = ", iteration), colnames(summary_iteration)), summary_iteration4) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
341 summary_oplscv[[count]] = summary_iteration5 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
342 count = count+1} ## create list with summary table for each component |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
343 summary_oplscv = do.call(rbind, summary_oplscv) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
344 summary_df = as.data.frame(summary_oplscv) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
345 colnames(summary_df) = NULL |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
346 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
347 ## plots |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
348 ## plot to find ncomp with highest accuracy |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
349 plot(components, accuracy_vector, ylab = "mean accuracy", type="o", main="Mean accuracy of OPLS classification") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
350 ncomp_max = components[which.max(accuracy_vector)] ## find ncomp with max. accuracy |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
351 ## one image for each sample/fold, 4 images per page |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
352 minimumy = min(coord(msidata.cv.opls)[,2]) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
353 maximumy = max(coord(msidata.cv.opls)[,2]) |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
354 image(msidata.cv.opls, model = list(ncomp = ncomp_max),ylim= c(maximumy+0.2*maximumy,minimumy-0.2*minimumy),layout = c(1, 1)) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
355 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
356 ## 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
|
357 par(opar) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
358 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
|
359 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
|
360 ## 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
|
361 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
|
362 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
|
363 }else{ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
364 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
|
365 mincount = 21 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
366 maxcount = 40 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
367 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
|
368 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
|
369 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
|
370 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
|
371 mincount = mincount+20 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
372 maxcount = maxcount+20 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
373 }else{### stop last page with last sample otherwise NA in table |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
374 grid.table(summary_df[mincount:nrow(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
|
375 } |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
376 } |
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 ## 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
|
379 #if $output_rdata: |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
380 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
|
381 #end if |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
382 |
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 -analysis ########################### |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
385 #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
|
386 print("OPLS analysis") |
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 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
|
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 |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
392 ### 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
|
393 tryCatch( |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
394 { |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
395 |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
396 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
|
397 { |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
398 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
|
399 } |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
400 }, |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
401 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
|
402 ## 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
|
403 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
|
404 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
|
405 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
|
406 } |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
407 ) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
408 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
409 ### opls analysis and coefficients plot |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
410 msidata.opls <- PLS(msidata, y = y_vector, ncomp = component, scale=$type_cond.method_cond.opls_analysis_cond.opls_scale) |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
411 ## to reduce msidata: keep.Xnew = $type_cond.method_cond.opls_analysis_cond.xnew |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
412 plot(msidata.opls, main="OPLS coefficients per m/z") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
413 |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
414 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
415 ### summary table of OPLS |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
416 summary_table = summary(msidata.opls)\$accuracy[[paste0("ncomp = ",component)]] |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
417 summary_table2 = round(as.numeric(summary_table), digits=2) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
418 summary_matrix = matrix(summary_table2, nrow=4, ncol=number_groups) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
419 summary_table3 = cbind(rownames(summary_table), summary_matrix) ## include rownames in table |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
420 summary_table4 = t(summary_table3) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
421 summary_table5 = cbind(c(paste0("ncomp = ", component), colnames(summary_table)), summary_table4) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
422 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
|
423 grid.table(summary_table5, rows= NULL) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
424 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
425 ### image of the best m/z |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
426 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
|
427 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
|
428 print(image(msidata, mz = topFeatures(msidata.opls)[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
|
429 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
430 opls_classes = data.frame(msidata.opls\$classes[[1]]) |
3
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
431 ## pixel names and coordinates |
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
432 ## to remove potential sample names and z dimension, split at comma and take only x and y |
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
433 x_coords = unlist(lapply(strsplit(names(pixels(msidata)), ","), `[[`, 1)) |
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
434 y_coords = unlist(lapply(strsplit(names(pixels(msidata)), ","), `[[`, 2)) |
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
435 x_coordinates = gsub("x = ","",x_coords) |
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
436 y_coordinates = gsub(" y = ","",y_coords) |
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
437 pixel_names = paste0("xy_", x_coordinates, "_", y_coordinates) |
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
438 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
439 opls_classes2 = data.frame(pixel_names, x_coordinates, y_coordinates, opls_classes) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
440 colnames(opls_classes2) = c("pixel names", "x", "y","predicted condition") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
441 |
2
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
442 ## 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
|
443 rm(msidata) |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
444 gc() |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
445 |
7
6f4c34f8d5ba
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents:
4
diff
changeset
|
446 opls_toplabels = topFeatures(msidata.opls, n=Inf) |
2
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
447 opls_toplabels[,4:6] <-round(opls_toplabels[,4:6],6) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
448 write.table(opls_toplabels, file="$mzfeatures", 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
|
449 write.table(opls_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
|
450 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
451 ## image with predicted classes |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
452 prediction_df = cbind(coord(msidata.opls)[,1:2], opls_classes) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
453 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
|
454 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
455 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
|
456 geom_tile() + |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
457 coord_fixed()+ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
458 ggtitle("Predicted condition for each pixel")+ |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
459 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
|
460 theme( |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
461 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
|
462 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
|
463 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
|
464 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
|
465 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
|
466 guides(fill=guide_legend(ncol=4,byrow=TRUE)) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
467 coord_labels = aggregate(cbind(x,y)~predicted_classes, data=prediction_df, mean, na.rm=TRUE, na.action="na.pass") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
468 coord_labels\$file_number = gsub( "_.*$", "", coord_labels\$predicted_classes) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
469 print(prediction_plot) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
470 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
471 ## 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
|
472 #if $output_rdata: |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
473 save(msidata.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
|
474 #end if |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
475 #end if |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
476 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
477 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
478 ######################## SSC ############################# |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
479 #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
|
480 print("SSC") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
481 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
482 ######################## SSC - CV ############################# |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
483 #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
|
484 print("SSC cv") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
485 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
486 ## 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
|
487 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
|
488 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
489 ## SSC-cvApply: |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
490 msidata.cv.ssc <- cvApply(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") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
491 |
2
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
492 ## 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
|
493 rm(msidata) |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
494 gc() |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
495 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
496 ## create table with summary |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
497 count = 1 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
498 summary_ssccv = list() |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
499 accuracy_vector = numeric() |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
500 iteration_vector = character() |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
501 for (iteration in names(msidata.cv.ssc@resultData[[1]][,1])){ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
502 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
503 summary_iteration = summary(msidata.cv.ssc)\$accuracy[[iteration]] |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
504 ## change class of numbers into numeric to round and calculate mean |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
505 summary_iteration2 = round(as.numeric(summary_iteration), digits=2) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
506 summary_matrix = matrix(summary_iteration2, nrow=4, ncol=number_groups) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
507 accuracy_vector[count] = mean(summary_matrix[1,]) ## vector with accuracies to find later maximum for plot |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
508 summary_iteration3 = cbind(rownames(summary_iteration), summary_matrix) ## include rownames in table |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
509 summary_iteration4 = t(summary_iteration3) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
510 summary_iteration5 = cbind(c(iteration, colnames(summary_iteration)), summary_iteration4) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
511 summary_ssccv[[count]] = summary_iteration5 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
512 iteration_vector[count] = unlist(strsplit(iteration, "[,]"))[3] |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
513 count = count+1} ## create list with summary table for each component |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
514 summary_ssccv = do.call(rbind, summary_ssccv) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
515 summary_df = as.data.frame(summary_ssccv) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
516 colnames(summary_df) = NULL |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
517 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
518 ## plot to find parameters with highest accuracy |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
519 plot(c($type_cond.method_cond.ssc_s),accuracy_vector[!duplicated(iteration_vector)], type="o",ylab="Mean accuracy", xlab = "Shrinkage parameter (s)", main="Mean accuracy of SSC classification") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
520 best_params = names(msidata.cv.ssc@resultData[[1]][,1])[which.max(accuracy_vector)] ## find parameters with max. accuracy |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
521 r_value = as.numeric(substring(unlist(strsplit(best_params, ","))[1], 4)) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
522 s_value = as.numeric(substring(unlist(strsplit(best_params, ","))[3], 5)) ## remove space |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
523 minimumy = min(coord(msidata.cv.ssc)[,2]) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
524 maximumy = max(coord(msidata.cv.ssc)[,2]) |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
525 image(msidata.cv.ssc, model = list( r = r_value, s = s_value ), ylim= c(maximumy+0.2*maximumy,minimumy-0.2*minimumy),layout=c(1,1)) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
526 |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
527 #if $type_cond.method_cond.ssc_analysis_cond.write_best_params: |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
528 write.table(r_value, file="$best_r", quote = FALSE, row.names = FALSE, col.names=FALSE, sep = "\t") |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
529 write.table(s_value, file="$best_s", quote = FALSE, row.names = FALSE, col.names=FALSE, sep = "\t") |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
530 #end if |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
531 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
532 ## 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
|
533 par(opar) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
534 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
|
535 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
|
536 ## 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
|
537 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
|
538 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
|
539 }else{ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
540 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
|
541 mincount = 21 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
542 maxcount = 40 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
543 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
|
544 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
|
545 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
|
546 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
|
547 mincount = mincount+20 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
548 maxcount = maxcount+20 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
549 }else{### stop last page with last sample otherwise NA in table |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
550 grid.table(summary_df[mincount:nrow(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
|
551 } |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
552 } |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
553 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
554 ## 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
|
555 #if $output_rdata: |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
556 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
|
557 #end if |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
558 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
559 ######################## SSC -analysis ########################### |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
560 #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
|
561 print("SSC analysis") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
562 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
563 ## 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
|
564 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
|
565 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
566 ## SSC analysis and plot |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
567 msidata.ssc <- spatialShrunkenCentroids(msidata, y = y_vector, |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
568 r = c($type_cond.method_cond.ssc_r), s = c($type_cond.method_cond.ssc_s), method = "$type_cond.method_cond.ssc_kernel_method") |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
569 plot(msidata.ssc, mode = "tstatistics", model = list("r" = c($type_cond.method_cond.ssc_r), "s" = c($type_cond.method_cond.ssc_s)), |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
570 col=hue_pal()(length(levels(msidata.ssc\$classes[[1]]))), lwd=2) |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
571 |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
572 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
573 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
574 ### summary table SSC |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
575 ##############summary_table = summary(msidata.ssc) |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
576 |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
577 ### 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
|
578 tryCatch( |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
579 { |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
580 |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
581 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
|
582 { |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
583 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
|
584 } |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
585 }, |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
586 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
|
587 ## 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
|
588 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
|
589 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
|
590 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
|
591 } |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
592 ) |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
593 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
594 summary_table = summary(msidata.ssc)\$accuracy[[names(msidata.ssc@resultData)]] |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
595 summary_table2 = round(as.numeric(summary_table), digits=2) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
596 summary_matrix = matrix(summary_table2, nrow=4, ncol=number_groups) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
597 summary_table3 = cbind(rownames(summary_table), summary_matrix) ## include rownames in table |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
598 summary_table4 = t(summary_table3) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
599 summary_table5 = cbind(c(names(msidata.ssc@resultData),colnames(summary_table)), summary_table4) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
600 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
|
601 grid.table(summary_table5, rows= NULL) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
602 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
603 ### image of the best m/z |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
604 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
|
605 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
|
606 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
|
607 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
608 ## m/z and pixel information output |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
609 ssc_classes = data.frame(msidata.ssc\$classes[[1]]) |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
610 ssc_probabilities = data.frame(msidata.ssc\$probabilities[[1]]) |
3
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
611 |
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
612 ## pixel names and coordinates |
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
613 ## to remove potential sample names and z dimension, split at comma and take only x and y |
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
614 x_coords = unlist(lapply(strsplit(names(pixels(msidata)), ","), `[[`, 1)) |
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
615 y_coords = unlist(lapply(strsplit(names(pixels(msidata)), ","), `[[`, 2)) |
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
616 x_coordinates = gsub("x = ","",x_coords) |
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
617 y_coordinates = gsub(" y = ","",y_coords) |
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
618 pixel_names = paste0("xy_", x_coordinates, "_", y_coordinates) |
585ef27873c9
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
galaxyp
parents:
2
diff
changeset
|
619 |
2
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
620 |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
621 ## 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
|
622 rm(msidata) |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
623 gc() |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
624 |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
625 ssc_classes2 = data.frame(pixel_names, x_coordinates, y_coordinates, ssc_classes, ssc_probabilities) |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
626 colnames(ssc_classes2) = c("pixel names", "x", "y","predicted condition", levels(msidata.ssc\$classes[[1]])) |
7
6f4c34f8d5ba
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents:
4
diff
changeset
|
627 ssc_toplabels = topFeatures(msidata.ssc, n=Inf) |
2
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
628 ssc_toplabels[,6:9] <-round(ssc_toplabels[,6:9],6) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
629 write.table(ssc_toplabels, file="$mzfeatures", 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
|
630 write.table(ssc_classes2, file="$pixeloutput", quote = FALSE, row.names = FALSE, col.names=TRUE, sep = "\t") |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
631 |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
632 image(msidata.ssc, model=list(r = c($type_cond.method_cond.ssc_r), s = c($type_cond.method_cond.ssc_s)), |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
633 col=hue_pal()(length(levels(msidata.ssc\$classes[[1]]))), mode="classes", layout=c(1,1), main="Class Prediction") |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
634 image(msidata.ssc, model=list(r = c($type_cond.method_cond.ssc_r), s = c($type_cond.method_cond.ssc_s)), |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
635 col=hue_pal()(length(levels(msidata.ssc\$classes[[1]]))), mode="probabilities", layout=c(1,1), main="Class probabilities") |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
636 |
9
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
637 |
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
638 ## image with right and wrong 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
|
639 prediction_df = cbind(coord(msidata.ssc)[,1:2], ssc_classes) |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
640 colnames(prediction_df) = c("x", "y", "predicted_classes") |
9
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
641 comparison_df = cbind(prediction_df, y_vector) |
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
642 comparison_df\$correct<- ifelse(comparison_df\$predicted_classes==comparison_df\$y_vector, T, F) |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
643 correctness = round(sum(comparison_df\$correct)/length(comparison_df\$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
|
644 |
9
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
645 correctness_plot = ggplot(comparison_df, aes(x=x, y=y, fill=correct))+ |
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
646 geom_tile() + |
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
647 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
|
648 ggtitle(paste0("Correctness of classification: ",correctness, "%"))+ |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
649 scale_fill_manual(values = c("TRUE" = "orange","FALSE" = "darkblue"))+ |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
650 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
|
651 theme( |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
652 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
|
653 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
|
654 panel.grid.minor = element_blank())+ |
9
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
655 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
|
656 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
|
657 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
|
658 ## coord_labels = aggregate(cbind(x,y)~correct, data=comparison_df, mean, na.rm=TRUE, na.action="na.pass") |
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
659 ##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
|
660 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
|
661 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
662 ## 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
|
663 #if $output_rdata: |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
664 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
|
665 #end if |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
666 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
667 #end if |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
668 #end if |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
669 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
670 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
671 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
672 ######################## II) Prediction ############################# |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
673 ############################################################################# |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
674 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
675 #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
|
676 print("prediction") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
677 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
678 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
|
679 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
680 #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
|
681 print("new response") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
682 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
683 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
|
684 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
|
685 colnames(new_y_input)[1:2] = c("x", "y") |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
686 ## 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
|
687 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
|
688 colnames(msidata_coordinates)[3] = "pixel_index" |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
689 merged_response = merge(msidata_coordinates, new_y_input, by=c("x", "y"), all.x=TRUE) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
690 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
|
691 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
|
692 new_y_vector = as.factor(merged_response[,4]) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
693 prediction = predict(training_data,msidata, newy = new_y_vector) |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
694 |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
695 ## Summary table prediction |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
696 summary_table = summary(prediction)\$accuracy[[names(prediction@resultData)]] |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
697 summary_table2 = round(as.numeric(summary_table), digits=2) |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
698 summary_matrix = matrix(summary_table2, nrow=4, ncol=ncol(summary_table)) |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
699 summary_table3 = cbind(rownames(summary_table), summary_matrix) ## include rownames in table |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
700 summary_table4 = t(summary_table3) |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
701 summary_table5 = cbind(c(names(prediction@resultData),colnames(summary_table)), summary_table4) |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
702 plot(0,type='n',axes=FALSE,ann=FALSE) |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
703 grid.table(summary_table5, rows= NULL) |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
704 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
705 #else |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
706 prediction = predict(training_data,msidata) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
707 #end if |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
708 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
709 ## m/z and pixel information output |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
710 predicted_classes = data.frame(prediction\$classes[[1]]) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
711 pixel_names = gsub(", y = ", "_", names(pixels(msidata))) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
712 pixel_names = gsub(" = ", "y_", pixel_names) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
713 x_coordinates = matrix(unlist(strsplit(pixel_names, "_")), ncol=3, byrow=TRUE)[,2] |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
714 y_coordinates = matrix(unlist(strsplit(pixel_names, "_")), ncol=3, byrow=TRUE)[,3] |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
715 predicted_classes2 = data.frame(pixel_names, x_coordinates, y_coordinates, predicted_classes) |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
716 colnames(predicted_classes2) = c("pixel names", "x", "y","predicted condition") |
7
6f4c34f8d5ba
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents:
4
diff
changeset
|
717 predicted_toplabels = topFeatures(prediction, n=Inf) |
2
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
718 if (colnames(predicted_toplabels)[4] == "coefficients"){ |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
719 predicted_toplabels[,4:6] <-round(predicted_toplabels[,4:6],5) |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
720 }else{ |
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
721 predicted_toplabels[,6:9] <-round(predicted_toplabels[,6:9],5)} |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
722 |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
723 ##predicted classes |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
724 prediction_df = cbind(coord(prediction)[,1:2], predicted_classes) |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
725 colnames(prediction_df) = c("x", "y", "predicted_classes") |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
726 |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
727 #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
|
728 ## this seems to work only for SSC, therefore overwrite tables |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
729 predicted_probabilities = data.frame(prediction\$probabilities[[1]]) |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
730 predicted_classes2 = data.frame(pixel_names, x_coordinates, y_coordinates, predicted_classes, predicted_probabilities) |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
731 colnames(predicted_classes2) = c("pixel names", "x", "y","predicted condition", levels(prediction\$classes[[1]])) |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
732 ## also image modes are specific to SSC |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
733 image(prediction, mode="classes", layout=c(1,1), main="Class", col=hue_pal()(length(unique(prediction\$classes[[1]])))) |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
734 image(prediction, mode="probabilities", layout=c(1,1), main="Class probabilities", col=hue_pal()(length(unique(prediction\$classes[[1]])))) |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
735 |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
736 #else |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
737 |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
738 prediction_plot = ggplot(prediction_df, aes(x=x, y=y, fill=predicted_classes))+ |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
739 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
|
740 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
|
741 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
|
742 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
|
743 theme( |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
744 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
|
745 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
|
746 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
|
747 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
|
748 theme(legend.position="bottom", legend.direction="vertical")+ |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
749 guides(fill=guide_legend(ncol=4, byrow=TRUE)) |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
750 coord_labels = aggregate(cbind(x,y)~predicted_classes, data=prediction_df, mean, na.rm=TRUE, na.action="na.pass") |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
751 coord_labels\$file_number = gsub( "_.*§", "", coord_labels\$predicted_classes) |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
752 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
|
753 #end if |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
754 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
755 write.table(predicted_toplabels, file="$mzfeatures", 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
|
756 write.table(predicted_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
|
757 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
758 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
759 |
9
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
760 |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
761 #if str($type_cond.new_y_values_cond.new_y_values) == "new_response": |
9
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
762 ## image with right and wrong classes: |
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
763 |
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
764 comparison_df = cbind(prediction_df, new_y_vector) |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
765 comparison_df\$correct<- ifelse(comparison_df\$predicted_classes==comparison_df\$new_y_vector, T, F) |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
766 correctness = round(sum(comparison_df\$correct)/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
|
767 |
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
768 correctness_plot = ggplot(comparison_df, aes(x=x, y=y, fill=correct))+ |
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
769 geom_tile()+ |
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
770 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
|
771 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
|
772 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
|
773 theme_bw()+ |
24c000517173
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents:
8
diff
changeset
|
774 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
|
775 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
|
776 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
|
777 print(correctness_plot) |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
778 #end if |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
779 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
780 ## 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
|
781 #if $output_rdata: |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
782 msidata = prediction |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
783 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
|
784 #end if |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
785 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
786 #end if |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
787 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
788 dev.off() |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
789 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
790 }else{ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
791 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
|
792 dev.off() |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
793 } |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
794 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
795 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
796 ]]></configfile> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
797 </configfiles> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
798 <inputs> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
799 <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
|
800 <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
|
801 <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
|
802 <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
|
803 <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
|
804 </param> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
805 <when value="training"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
806 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
807 <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
|
808 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
|
809 <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
|
810 <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
|
811 <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
|
812 <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
|
813 <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
|
814 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
815 <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
|
816 <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
|
817 <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
|
818 <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
|
819 <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
|
820 </param> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
821 <when value="PLS"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
822 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
823 <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
|
824 <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
|
825 <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
|
826 <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
|
827 </param> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
828 <when value="cvapply"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
829 <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
|
830 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
|
831 <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
|
832 </param> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
833 </when> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
834 <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
|
835 <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
|
836 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
|
837 <param name="pls_scale" type="boolean" label="Data scaling" 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
|
838 <param name="pls_toplabels" type="integer" value="100" |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
839 label="Number of toplabels (m/z features) which should be written in tabular output"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
840 </when> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
841 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
842 </when> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
843 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
844 <when value="OPLS"> |
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 <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
|
847 <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
|
848 <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
|
849 <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
|
850 </param> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
851 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
852 <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
|
853 <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
|
854 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
|
855 <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
|
856 </param> |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
857 <!--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
|
858 </when> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
859 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
860 <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
|
861 <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
|
862 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
|
863 <!--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
|
864 <param name="opls_scale" type="boolean" truevalue="TRUE" falsevalue="FALSE" label="Data scaling"/> |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
865 <!--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
|
866 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
|
867 </when> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
868 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
869 </when> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
870 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
871 <when value="spatialShrunkenCentroids"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
872 <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
|
873 <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
|
874 <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
|
875 <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
|
876 </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
|
877 <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
|
878 <param name="write_best_params" type="boolean" label="Write out best r and s values" help="Can be used to generate automatic classification workflow"/> |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
879 </when> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
880 <when value="ssc_analysis"> |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
881 <!--param name="ssc_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
|
882 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
|
883 </when> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
884 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
885 <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
|
886 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
|
887 <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
|
888 </param> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
889 <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
|
890 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
|
891 <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
|
892 </param> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
893 <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
|
894 <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
|
895 <option value="adaptive" selected="True">adaptive</option> |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
896 </param> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
897 </when> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
898 </conditional> |
8
277dc652246e
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d008f6ea0f5c8435fb975a34cb99ea4d42c5ebd2"
galaxyp
parents:
7
diff
changeset
|
899 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
900 </when> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
901 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
902 <when value="prediction"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
903 <param name="training_result" type="data" format="rdata" label="Result from previous classification training"/> |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
904 <!--param name="predicted_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
|
905 label="Number of toplabels (m/z features) which should be written in tabular output"/--> |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
906 <param name="classification_type" type="select" display="radio" optional="False" label="Which classification method was used"> |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
907 <option value="PLS_classifier" selected="True" >PLS classifier</option> |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
908 <option value="OPLS_classifier">OPLS classifier</option> |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
909 <option value="SSC_classifier">SSC_classifier</option> |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
910 </param> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
911 <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
|
912 <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
|
913 <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
|
914 <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
|
915 </param> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
916 <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
|
917 <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
|
918 <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
|
919 <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
|
920 <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
|
921 <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
|
922 <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
|
923 </when> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
924 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
925 </when> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
926 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
927 <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
|
928 </inputs> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
929 <outputs> |
2
cbc7e53518ce
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents:
1
diff
changeset
|
930 <data format="pdf" name="classification_images" from_work_dir="classificationpdf.pdf" label = "${tool.name} on ${on_string}: results"/> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
931 <data format="tabular" name="mzfeatures" label="${tool.name} on ${on_string}: features"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
932 <data format="tabular" name="pixeloutput" label="${tool.name} on ${on_string}: pixels"/> |
14
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
933 <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
|
934 <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
|
935 </data> |
ece627528a78
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 888b3e991d0752b694bf480531ce0e5318c2f337-dirty"
galaxyp
parents:
9
diff
changeset
|
936 <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
|
937 <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
|
938 </data> |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
939 <data format="rdata" name="classification_rdata" label="${tool.name} on ${on_string}: results.RData"> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
940 <filter>output_rdata</filter> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
941 </data> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
942 </outputs> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
943 <tests> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
944 <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
|
945 <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
|
946 <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
|
947 <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
|
948 <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
|
949 <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
|
950 <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
|
951 <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
|
952 <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
|
953 <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
|
954 <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
|
955 <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
|
956 <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
|
957 <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
|
958 <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
|
959 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
960 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
961 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
962 <output name="mzfeatures" file="features_test1.tabular"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
963 <output name="pixeloutput" file="pixels_test1.tabular"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
964 <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
|
965 </test> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
966 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
967 <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
|
968 <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
|
969 <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
|
970 <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
|
971 <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
|
972 <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
|
973 <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
|
974 <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
|
975 <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
|
976 <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
|
977 <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
|
978 <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
|
979 <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
|
980 <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
|
981 <param name="pls_scale" 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
|
982 <!--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
|
983 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
984 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
985 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
986 <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
|
987 <output name="mzfeatures" file="features_test2.tabular"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
988 <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
|
989 <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
|
990 <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
|
991 </test> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
992 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
993 <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
|
994 <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
|
995 <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
|
996 <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
|
997 <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
|
998 <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
|
999 <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
|
1000 <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
|
1001 <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
|
1002 <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
|
1003 <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
|
1004 <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
|
1005 <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
|
1006 <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
|
1007 <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
|
1008 <param name="xnew_cv" value="FALSE"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1009 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1010 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1011 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1012 <output name="mzfeatures" file="features_test3.tabular"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1013 <output name="pixeloutput" file="pixels_test3.tabular"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1014 <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
|
1015 </test> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1016 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1017 <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
|
1018 <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
|
1019 <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
|
1020 <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
|
1021 <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
|
1022 <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
|
1023 <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
|
1024 <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
|
1025 <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
|
1026 <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
|
1027 <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
|
1028 <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
|
1029 <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
|
1030 <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
|
1031 <param name="xnew" value="FALSE"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1032 <param name="opls_scale" value="FALSE"/> |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1033 <!--param name="opls_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
|
1034 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1035 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1036 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1037 <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
|
1038 <output name="mzfeatures" file="features_test4.tabular"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1039 <output name="pixeloutput" file="pixels_test4.tabular"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1040 <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
|
1041 <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
|
1042 </test> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1043 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1044 <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
|
1045 <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
|
1046 <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
|
1047 <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
|
1048 <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
|
1049 <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
|
1050 <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
|
1051 <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
|
1052 <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
|
1053 <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
|
1054 <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
|
1055 <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
|
1056 <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
|
1057 <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
|
1058 <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
|
1059 <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
|
1060 <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
|
1061 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1062 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1063 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1064 <output name="mzfeatures" file="features_test5.tabular"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1065 <output name="pixeloutput" file="pixels_test5.tabular"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1066 <output name="classification_images" file="test5.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
|
1067 </test> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1068 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1069 <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
|
1070 <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
|
1071 <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
|
1072 <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
|
1073 <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
|
1074 <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
|
1075 <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
|
1076 <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
|
1077 <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
|
1078 <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
|
1079 <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
|
1080 <param name="ssc_method" value="ssc_analysis"/> |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1081 <!--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
|
1082 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1083 <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
|
1084 <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
|
1085 <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
|
1086 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1087 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1088 <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
|
1089 <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
|
1090 <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
|
1091 <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
|
1092 <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
|
1093 </test> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1094 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1095 <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
|
1096 <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
|
1097 <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
|
1098 <param name="type_method" value="prediction"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1099 <param name="training_result" value="test2.rdata" ftype="rdata"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1100 <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
|
1101 <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
|
1102 <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
|
1103 <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
|
1104 <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
|
1105 <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
|
1106 <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
|
1107 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1108 </conditional> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1109 <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
|
1110 <output name="mzfeatures" file="features_test7.tabular"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1111 <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
|
1112 <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
|
1113 <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
|
1114 </test> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1115 </tests> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1116 <help> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1117 <![CDATA[ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1118 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1119 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1120 @CARDINAL_DESCRIPTION@ |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1121 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1122 ----- |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1123 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1124 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
|
1125 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1126 @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
|
1127 - 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
|
1128 - 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
|
1129 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1130 - 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
|
1131 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1132 :: |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1133 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1134 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
|
1135 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
|
1136 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
|
1137 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
|
1138 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
|
1139 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
|
1140 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
|
1141 ... |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1142 ... |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1143 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1144 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1145 - 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
|
1146 |
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 **Options** |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1149 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1150 - 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
|
1151 - 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
|
1152 - 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
|
1153 - 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
|
1154 |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1155 - 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
|
1156 - 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
|
1157 - 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
|
1158 - 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
|
1159 |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1160 |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1161 .. 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
|
1162 :width: 1000 |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1163 :height: 465 |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1164 |
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1165 |
0
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1166 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1167 **Tips** |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1168 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1169 - The classification function will only run on files with valid intensity values (NA are not allowed) |
4
47fc5b518ffc
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents:
3
diff
changeset
|
1170 - 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
|
1171 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1172 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1173 **Output** |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1174 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1175 - 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
|
1176 - 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
|
1177 - 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
|
1178 |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1179 ]]> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1180 </help> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1181 <expand macro="citations"/> |
2fdbbb1be2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
1182 </tool> |
7
6f4c34f8d5ba
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents:
4
diff
changeset
|
1183 |