annotate spectra_plots.xml @ 13:c5aa9fca18c6 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
author galaxyp
date Sun, 29 Nov 2020 23:41:23 +0000
parents 10566783d718
children 1693b2126f30
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
1 <tool id="cardinal_spectra_plots" name="MSI plot spectra" version="@VERSION@.2">
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
2 <description>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
3 mass spectrometry imaging mass spectra plots
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
4 </description>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
5 <macros>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
6 <import>macros.xml</import>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
7 </macros>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
8 <expand macro="requirements">
9
0b7e00e5b9d2 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents: 7
diff changeset
9 <requirement type="package" version="3.3.2">r-ggplot2</requirement>
1
1d9931768896 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents: 0
diff changeset
10 <requirement type="package" version="2.3">r-gridextra</requirement>
9
0b7e00e5b9d2 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents: 7
diff changeset
11 <requirement type="package" version="1.1.1">r-scales</requirement>
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
12 </expand>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
13 <command detect_errors="exit_code">
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
14 <![CDATA[
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
15 @INPUT_LINKING@
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
16 cat '${MSI_mzplots}' &&
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
17 Rscript '${MSI_mzplots}'
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
18 ]]>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
19 </command>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
20 <configfiles>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
21 <configfile name="MSI_mzplots"><![CDATA[
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
22
9c03e7a617cd 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 #################
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
24
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
25 library(Cardinal)
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
26 library(gridExtra)
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
27 library(ggplot2)
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
28 library(scales)
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
29
2
3642ed221eb2 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents: 1
diff changeset
30
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
31 @READING_MSIDATA_FULLY_COMPATIBLE@
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
32
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
33 @DATA_PROPERTIES@
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
34
1
1d9931768896 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents: 0
diff changeset
35
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
36 ######################################## PDF ###################################
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
37 ################################################################################
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
38 ################################################################################
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
39
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
40
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
41 pdf("mzplots.pdf", fonts = "Times", pointsize = 12)
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
42 plot(0,type='n',axes=FALSE,ann=FALSE)
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
43 #if not $filename:
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
44 #set $filename = $infile.display_name
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
45 #end if
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
46 title(main=paste0("Mass spectra for file: \n\n","$filename"))
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
47
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
48
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
49 ############################# I) numbers ######################################
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
50 ###############################################################################
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
51
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
52 grid.table(property_df, rows= NULL)
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
53
2
3642ed221eb2 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents: 1
diff changeset
54 ## run only if mz and pixels are > 0
1
1d9931768896 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents: 0
diff changeset
55
2
3642ed221eb2 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents: 1
diff changeset
56 if (ncol(msidata)>0 & nrow(msidata) >0){
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
57
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
58 pixeldf = data.frame(matrix(ncol = 2, nrow=0))
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
59
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
60 ############################# single pixel ################################
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
61 ###########################################################################
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
62
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
63 #if str( $pixel_conditional.pixel_type) == 'tabular_pixel':
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
64 print("tabular_pixel")
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
65
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
66 ## read and extract x,y, optional annotation information
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
67 spectra_tabular = read.delim("$pixel_conditional.pixel_file", header = $pixel_conditional.tabular_pixel_header, stringsAsFactors = FALSE)
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
68
13
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
69 #if str($pixel_conditional.single_or_overlaid.plot_type) == 'overlaid_plots':
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
70
13
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
71 spectra_input = spectra_tabular[,c($pixel_conditional.column_pixel_x, $pixel_conditional.column_pixel_y, $pixel_conditional.single_or_overlaid.column_pixel_annotation)]
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
72 colnames(spectra_input) = c("x", "y", "annotation")
13
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
73 spectra_input\$annotation = as.character(spectra_input\$annotation)
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
74
13
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
75 msidata_coordinates = data.frame(coord(msidata)\$x, coord(msidata)\$y)
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
76 colnames(msidata_coordinates) = c("x", "y")
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
77 merged_annotation = merge(msidata_coordinates, spectra_input, by=c("x", "y"))
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
78 merged_annotation[is.na(merged_annotation)] = "NA"
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
79
13
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
80 merged_annotation = merged_annotation[order(merged_annotation\$annotation),]
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
81 msidata\$annotation = factor(merged_annotation\$annotation)
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
82
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
83
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
84 ## overview plot over annotated samples
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
85 number_combined = length(levels(msidata\$annotation))
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
86
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
87 ## the more annotation groups a file has the smaller will be the legend
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
88 if (number_combined<20){
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
89 legend_size = 10
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
90 }else if (number_combined>20 && number_combined<40){
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
91 legend_size = 9
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
92 }else if (number_combined>40 && number_combined<60){
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
93 legend_size = 8
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
94 }else if (number_combined>60 && number_combined<100){
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
95 legend_size = 7
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
96 }else{
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
97 legend_size = 6
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
98 }
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
99
13
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
100 ## colours selection:
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
101
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
102 #if str($pixel_conditional.single_or_overlaid.colour_conditional.colour_type) == "manual_colour"
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
103 #set $color_string = ','.join(['"%s"' % $color.annotation_color for $color in $pixel_conditional.single_or_overlaid.colour_conditional.colours])
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
104 colourvector = c($color_string)
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
105
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
106 #elif str($pixel_conditional.single_or_overlaid.colour_conditional.colour_type) == "colourpalette"
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
107
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
108 number_levels = (length(levels(msidata\$annotation)))
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
109
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
110 colourvector = noquote($pixel_conditional.single_or_overlaid.colour_conditional.palettes)(number_levels)
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
111
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
112 #end if
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
113
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
114 position_df = merged_annotation
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
115 colnames(position_df) = c("x", "y", "sample_name")
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
116
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
117 combine_plot = ggplot(position_df, aes(x=x, y=y, fill=sample_name))+
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
118 geom_tile(height = 1, width=1)+
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
119 coord_fixed()+
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
120 ggtitle("Spatial orientation of annotations")+
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
121 theme_bw()+
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
122 theme(plot.title = element_text(hjust = 0.5))+
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
123 theme(text=element_text(family="ArialMT", face="bold", size=12))+
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
124 theme(legend.position="bottom",legend.direction="vertical")+
13
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
125 theme(legend.key.size = unit(0.2, "line"), legend.text = element_text(size = 10))+
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
126 guides(fill=guide_legend(ncol=4,byrow=TRUE))+
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
127 scale_discrete_manual(aesthetics = c("colour", "fill"), values = colourvector)
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
128
13
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
129
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
130 coord_labels = aggregate(cbind(x,y)~sample_name, data=position_df, mean, na.rm=TRUE, na.action="na.pass")
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
131 coord_labels\$file_number = 1:length(unique(position_df\$sample_name))
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
132
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
133 for(file_count in 1:nrow(coord_labels))
13
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
134 {combine_plot = combine_plot + annotate("text",x=coord_labels[file_count,"x"],
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
135 y=coord_labels[file_count,"y"],label=toString(coord_labels[file_count,4]))
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
136 }
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
137
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
138 print(combine_plot)
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
139
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
140 ## print legend only for less than 10 samples
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
141 if (length(levels(msidata\$annotation)) < 10){
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
142 key_legend = TRUE
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
143 }else{key_legend = FALSE}
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
144
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
145 #if $fullmz:
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
146 ## plot single tabular mz, average per annotation
13
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
147 print(plot(msidata, run="infile", pixel.groups=msidata\$annotation, key=key_legend,superpose=TRUE, strip=FALSE, grid=$grid_variable, col = colourvector), main="Average spectrum per group")
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
148 #end if
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
149
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
150 pixeldf = data.frame(table(msidata\$annotation))
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
151 colnames(pixeldf) = c("sample name", "number of pixels")
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
152
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
153
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
154 ##################### II) Sample: plot zoom-in mass spectrum ##########
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
155
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
156 #if str($mz_range.mz_range_options) == "manual_mz":
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
157
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
158 #for $token in $mz_range.zoomed_sample:
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
159
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
160
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
161 minmasspixel = tryCatch(
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
162 {
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
163 features(msidata, mz=$token.xlimmin)
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
164 },
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
165 warning=function(cond) {
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
166 ## if xlimmin is outside mz range, use min mz value
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
167 return(features(msidata, mz=min(mz(msidata))))
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
168 }
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
169 )
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
170
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
171 maxmasspixel = tryCatch(
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
172 {
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
173 features(msidata, mz=$token.xlimmax)
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
174 },
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
175 warning=function(cond) {
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
176 ## if xlimax is outside mz range, use max mz value
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
177 return(features(msidata, mz=max(mz(msidata))))
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
178 }
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
179 )
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
180
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
181 ## plot single tabular mz, average per annotation, manual zoom
13
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
182
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
183 print(plot(msidata[minmasspixel:maxmasspixel,], run="infile", strip=FALSE, col = colourvector,
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
184 xlim= c($token.xlimmin,$token.xlimmax),pixel.groups=msidata\$annotation, grid = $grid_variable,
13
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
185 key=key_legend, superpose=TRUE, main="Average spectrum per group"))
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
186 #end for
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
187
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
188 #elif str($mz_range.mz_range_options) == "tabular_mz":
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
189
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
190 input_mz = read.delim("$mz_range.mz_file", header = $mz_range.tabular_header, stringsAsFactors = FALSE)
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
191 input_mz_features = input_mz[,c($mz_range.column_mz)]
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
192 for (feature_count in input_mz_features){
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
193
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
194 if (feature_count>min(mz(msidata))&feature_count<max(mz(msidata))){
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
195
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
196 xlimmin = feature_count-$mz_range.minus_mz_tab
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
197 xlimmax = feature_count+$mz_range.plus_mz_tab
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
198
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
199 minmasspixel = features(msidata, mz=xlimmin)
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
200 maxmasspixel = features(msidata, mz=xlimmax)
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
201
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
202 ## plot single tabular mz, average per annotation, tabular zoom
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
203 print(plot(msidata[minmasspixel:maxmasspixel,], run="infile", strip=FALSE, main="Average spectrum per group",
13
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
204 xlim= c(xlimmin,xlimmax),pixel.groups=msidata\$annotation, grid = $grid_variable, col = colourvector,
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
205 key=key_legend, superpose=TRUE))
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
206
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
207 }
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
208 }
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
209
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
210 #end if
13
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
211 #elif str($pixel_conditional.single_or_overlaid.plot_type) == 'separate_plots':
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
212
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
213
13
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
214 spectra_tabular = spectra_tabular[,c($pixel_conditional.column_pixel_x, $pixel_conditional.column_pixel_y)]
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
215 colnames(spectra_tabular) = c("x", "y")
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
216
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
217 dataset_pixels = data.frame(coord(msidata)\$x, coord(msidata)\$y)
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
218 colnames(dataset_pixels) = c("x", "y")
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
219 spectra_input = merge(dataset_pixels, spectra_tabular, by=c("x", "y"))
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
220 false_input = merge(spectra_tabular, spectra_input, by=c("x", "y"))
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
221
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
222 ## for loop for every valid spectrum (pixel)
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
223 for (pixel_count in 1:nrow(spectra_input)){
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
224
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
225 x_coord = spectra_input[pixel_count,1]
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
226 y_coord = spectra_input[pixel_count,2]
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
227
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
228
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
229 ##################### I) Sample: plot full mass spectrum ##############
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
230
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
231 #if $fullmz:
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
232 ## plot full mz for single tabular mz
12
10566783d718 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit e499c9124d3fd85a7fc47b95c206ce91a5e3678c-dirty"
galaxyp
parents: 9
diff changeset
233 print(plot(msidata, coord=list(x=x_coord, y=y_coord), key=TRUE, grid = $grid_variable, col="black"))
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
234 #end if
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
235
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
236 pixelname = paste0("x = ", x_coord,", ", "y = ", y_coord)
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
237
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
238 input_pixels = paste(x_coord, y_coord, sep="_")
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
239 dataset_pixels = paste(coord(msidata)\$x, coord(msidata)\$y, sep="_")
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
240 pixelisvalid = as.character(input_pixels %in% dataset_pixels)
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
241
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
242 pixeldf = rbind(pixeldf, cbind(pixelname, pixelisvalid))
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
243
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
244
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
245 ##################### II) Sample: plot zoom-in mass spectrum ##########
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
246
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
247 #if str($mz_range.mz_range_options) == "manual_mz":
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
248 #for $token in $mz_range.zoomed_sample:
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
249
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
250 minmasspixel = tryCatch(
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
251 {
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
252 features(msidata, mz=$token.xlimmin)
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
253 },
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
254 warning=function(cond) {
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
255 ## if xlimmin is outside mz range, use min mz value
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
256 return(features(msidata, mz=min(mz(msidata))))
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
257 }
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
258 )
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
259
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
260 maxmasspixel = tryCatch(
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
261 {
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
262 features(msidata, mz=$token.xlimmax)
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
263 },
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
264 warning=function(cond) {
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
265 ## if xlimax is outside mz range, use max mz value
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
266 return(features(msidata, mz=max(mz(msidata))))
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
267 }
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
268 )
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
269
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
270 ## same min and max not possible for plot
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
271 if (minmasspixel == maxmasspixel){
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
272 if (maxmasspixel == nrow(msidata)){
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
273 minmasspixel = minmasspixel-1
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
274 }else{
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
275 maxmasspixel = maxmasspixel+1
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
276 }
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
277 }
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
278
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
279 ## print single tabular mz; manual zoom
13
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
280
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
281 tryCatch(
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
282 {
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
283 print(plot(msidata[minmasspixel:maxmasspixel,], grid = $grid_variable, coord=list(x=x_coord, y=y_coord), key=TRUE, xlim= c($token.xlimmin,$token.xlimmax), col="black"))
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
284 }
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
285 ,
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
286 error=function(cond) {
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
287 ## if there are no intensities > 0 in the chosen plotting window, write a warning
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
288 text(0.5,0.5,labels = c(paste("No peaks in the spectrum with the coordinates x =", x_coord, ", y =", y_coord, sep=" ")))
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
289 }
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
290 )
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
291
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
292 #end for
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
293
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
294 #elif str($mz_range.mz_range_options) == "tabular_mz":
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
295
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
296 input_mz = read.delim("$mz_range.mz_file", header = $mz_range.tabular_header, stringsAsFactors = FALSE)
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
297 input_mz_features = input_mz[,c($mz_range.column_mz)]
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
298 for (feature_count in input_mz_features){
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
299
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
300 if (feature_count>min(mz(msidata))&feature_count<max(mz(msidata))){
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
301
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
302 xlimmin = feature_count-$mz_range.minus_mz_tab
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
303 xlimmax = feature_count+$mz_range.plus_mz_tab
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
304
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
305 minmasspixel = tryCatch(
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
306 {
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
307 features(msidata, mz=xlimmin)
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
308 },
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
309 warning=function(cond) {
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
310 ## if xlimmin is outside mz range, use min mz value
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
311 return(features(msidata, mz=min(mz(msidata))))
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
312 }
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
313 )
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
314
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
315 maxmasspixel = tryCatch(
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
316 {
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
317 maxmasspixel = features(msidata, mz=xlimmax)
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
318 },
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
319 warning=function(cond) {
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
320 ## if xlimax is outside mz range, use max mz value
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
321 return(features(msidata, mz=max(mz(msidata))))
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
322 }
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
323 )
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
324
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
325 ## same min and max not possible for plot
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
326 if (minmasspixel == maxmasspixel){
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
327 if (maxmasspixel == nrow(msidata)){
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
328 minmasspixel = minmasspixel-1
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
329 }else{
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
330 maxmasspixel = maxmasspixel+1
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
331 }
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
332 }
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
333
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
334 ## print single tabular mz; tabular zoom
12
10566783d718 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit e499c9124d3fd85a7fc47b95c206ce91a5e3678c-dirty"
galaxyp
parents: 9
diff changeset
335 print(plot(msidata[minmasspixel:maxmasspixel,], grid = $grid_variable, coord=list(x=x_coord, y=y_coord), key=TRUE, xlim= c(xlimmin,xlimmax), col="black"))
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
336 }
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
337 }
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
338
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
339 #end if
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
340
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
341 }
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
342
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
343 colnames(pixeldf) = c("pixel coordinates", "coordinates were found in this file")
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
344
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
345 #end if
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
346
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
347
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
348 ############################# all pixel ################################
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
349 ###########################################################################
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
350
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
351 #elif str( $pixel_conditional.pixel_type) == 'all_pixel':
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
352 print("all pixels")
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
353
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
354 ##################### I) Sample: plot full mass spectrum ##############
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
355
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
356 #if $fullmz:
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
357
12
10566783d718 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit e499c9124d3fd85a7fc47b95c206ce91a5e3678c-dirty"
galaxyp
parents: 9
diff changeset
358 print(plot(msidata, run="infile", key=TRUE, strip=FALSE, main="Average spectrum", grid = $grid_variable, col="black"))
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
359 #end if
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
360
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
361 ##################### II) Sample: plot zoom-in mass spectrum ##########
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
362
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
363 #if str($mz_range.mz_range_options) == "manual_mz":
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
364 #for $token in $mz_range.zoomed_sample:
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
365
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
366 minmasspixel = tryCatch(
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
367 {
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
368 features(msidata, mz=$token.xlimmin)
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
369 },
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
370 warning=function(cond) {
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
371 ## if xlimmin is outside mz range, use min mz value
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
372 return(features(msidata, mz=min(mz(msidata))))
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
373 }
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
374 )
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
375
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
376 maxmasspixel = tryCatch(
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
377 {
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
378 features(msidata, mz=$token.xlimmax)
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
379 },
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
380 warning=function(cond) {
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
381 ## if xlimax is outside mz range, use max mz value
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
382 return(features(msidata, mz=max(mz(msidata))))
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
383 }
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
384 )
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
385
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
386 ## same min and max not possible for plot
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
387 if (minmasspixel == maxmasspixel){
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
388 if (maxmasspixel == nrow(msidata)){
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
389 minmasspixel = minmasspixel-1
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
390 }else{
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
391 maxmasspixel = maxmasspixel+1
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
392 }
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
393 }
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
394
12
10566783d718 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit e499c9124d3fd85a7fc47b95c206ce91a5e3678c-dirty"
galaxyp
parents: 9
diff changeset
395 print(plot(msidata[minmasspixel:maxmasspixel,], grid = $grid_variable, main="Average spectrum", run = "infile", strip=FALSE, key=TRUE, xlim= c($token.xlimmin,$token.xlimmax), col="black"))
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
396
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
397 #end for
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
398
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
399 #elif str($mz_range.mz_range_options) == "tabular_mz":
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
400
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
401 input_mz = read.delim("$mz_range.mz_file", header = $mz_range.tabular_header, stringsAsFactors = FALSE)
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
402 input_mz_features = input_mz[,c($mz_range.column_mz)]
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
403 for (feature_count in input_mz_features){
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
404
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
405 if (feature_count>min(mz(msidata))&feature_count<max(mz(msidata))){
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
406
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
407 xlimmin = feature_count-$mz_range.minus_mz_tab
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
408 xlimmax = feature_count+$mz_range.plus_mz_tab
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
409
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
410 minmasspixel = tryCatch(
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
411 {
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
412 features(msidata, mz=xlimmin)
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
413 },
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
414 warning=function(cond) {
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
415 ## if xlimmin is outside mz range, use min mz value
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
416 return(features(msidata, mz=min(mz(msidata))))
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
417 }
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
418 )
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
419
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
420 maxmasspixel = tryCatch(
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
421 {
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
422 maxmasspixel = features(msidata, mz=xlimmax)
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
423 },
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
424 warning=function(cond) {
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
425 ## if xlimax is outside mz range, use max mz value
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
426 return(features(msidata, mz=max(mz(msidata))))
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
427 }
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
428 )
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
429
12
10566783d718 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit e499c9124d3fd85a7fc47b95c206ce91a5e3678c-dirty"
galaxyp
parents: 9
diff changeset
430 print(plot(msidata[minmasspixel:maxmasspixel,], grid = $grid_variable, run="infile", key=TRUE, strip=FALSE, main="Average spectrum", xlim= c(xlimmin,xlimmax), col="black"))
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
431 }
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
432 }
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
433
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
434
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
435 #end if
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
436
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
437 pixeldf = data.frame("$filename", ncol(msidata))
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
438 colnames(pixeldf) = c("sample name", "number of pixels")
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
439
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
440 #end if
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
441
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
442
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
443 ############################# pixel table ######################################
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
444 ###############################################################################
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
445
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
446
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
447 ### overview table of pixels or samples:
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
448 plot(0,type='n',axes=FALSE,ann=FALSE)
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
449 title(main="Overview of chosen pixel:")
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
450
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
451 ### for more than 20 annotation groups print only 20 samples per page:
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
452 if (is.null(levels(msidata\$annotation))){
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
453 grid.table(pixeldf, rows= NULL)
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
454 }else if (length(levels(msidata\$annotation)) <= 20){
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
455 grid.table(pixeldf, rows= NULL)
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
456 }else{
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
457 grid.table(pixeldf[1:20,], rows= NULL)
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
458 mincount = 21
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
459 maxcount = 40
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
460 for (count20 in 1:(ceiling(nrow(pixeldf)/20)-1)){
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
461 plot(0,type='n',axes=FALSE,ann=FALSE)
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
462 if (maxcount <= nrow(pixeldf)){
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
463 grid.table(pixeldf[mincount:maxcount,], rows= NULL)
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
464 mincount = mincount+20
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
465 maxcount = maxcount+20
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
466 }else{### stop last page with last sample otherwise NA in table
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
467 grid.table(pixeldf[mincount:nrow(pixeldf),], rows= NULL)}
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
468 }
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
469 }
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
470
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
471 dev.off()
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
472
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
473 }else{
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
474 print("Inputfile has no intensities > 0")
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
475 dev.off()
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
476 }
1
1d9931768896 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents: 0
diff changeset
477
1d9931768896 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents: 0
diff changeset
478
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
479 ]]></configfile>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
480 </configfiles>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
481 <inputs>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
482 <expand macro="reading_msidata"/>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
483 <expand macro="pdf_filename"/>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
484 <conditional name="pixel_conditional">
13
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
485 <param name="pixel_type" type="select" label="Choose spectra">
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
486 <option value="all_pixel" selected="True" >Plot mean spectra based on all spectra</option>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
487 <option value="tabular_pixel">Plot single spectra (separate or overlaid)</option>
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
488 </param>
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
489 <when value="tabular_pixel">
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
490 <param name="pixel_file" type="data" format="tabular" label="Load tabular file with pixel coordinates"
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
491 help="Two or three columns: x values, y values, optionally annotations"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
492 <param name="column_pixel_x" data_ref="pixel_file" label="Column with x values" type="data_column"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
493 <param name="column_pixel_y" data_ref="pixel_file" label="Column with y values" type="data_column"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
494 <param name="tabular_pixel_header" type="boolean" label="Tabular files contain a header line" truevalue="TRUE" falsevalue="FALSE"/>
13
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
495 <conditional name="single_or_overlaid">
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
496 <param name="plot_type" type="select" label="Separate plot per spectrum or overlaid plot with average spectra per annotation group">
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
497 <option value="separate_plots" selected="True" >Separate spectra plots</option>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
498 <option value="overlaid_plots">Overlaid spectra plots</option>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
499 </param>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
500 <when value="separate_plots"/>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
501 <when value="overlaid_plots">
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
502 <param name="column_pixel_annotation" data_ref="pixel_file" label="Select column with annotations" type="data_column"/>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
503 <conditional name="colour_conditional">
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
504 <param name="colour_type" type="select" label="Choose a colour scheme">
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
505 <option value="colourpalette" selected="True" >Colour palette</option>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
506 <option value="manual_colour">Manual selection</option>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
507 </param>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
508 <when value="manual_colour">
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
509 <repeat name="colours" title="Colours for the plots" min="1" max="50">
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
510 <param name="annotation_color" type="color" label="Colours" value="#ff00ff" help="Numbers of colours should be the same as number of components">
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
511 <sanitizer>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
512 <valid initial="string.letters,string.digits">
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
513 <add value="#" />
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
514 </valid>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
515 </sanitizer>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
516 </param>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
517 </repeat>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
518 </when>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
519 <when value="colourpalette">
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
520 <param name="palettes" type="select" display="radio" label="Select a colourpalette">
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
521 <option value="hue_pal()" selected="True">hue</option>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
522 <option value="rainbow">rainbow</option>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
523 <option value="heat.colors">heat colors</option>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
524 <option value="terrain.colors">terrain colors</option>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
525 <option value="topo.colors">topo colors</option>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
526 <option value="cm.colors">cm colors</option>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
527 </param>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
528 </when>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
529 </conditional>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
530 </when>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
531 </conditional>
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
532 </when>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
533 <when value="all_pixel">
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
534 </when>
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
535 </conditional>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
536 <param name="fullmz" type="boolean" label="Plot complete m/z range" checked="True" truevalue="TRUE" falsevalue="FALSE"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
537 <conditional name="mz_range">
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
538 <param name="mz_range_options" type="select" label="zoomed in m/z range">
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
539 <option value="none_mz" selected="True">no m/z range</option>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
540 <option value="manual_mz" >Manual input</option>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
541 <option value="tabular_mz">Tabular file</option>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
542 </param>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
543 <when value="none_mz"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
544 <when value="tabular_mz">
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
545 <param name="minus_mz_tab" type="float" value="" label="m/z value to subtract from m/z values in tabular file = lower m/z boundary"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
546 <param name="plus_mz_tab" type="float" value="" label="m/z value to add to m/z values in tabular file = upper m/z boundary"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
547 <param name="mz_file" type="data" format="tabular" label="Load tabular file with m/z values"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
548 <param name="column_mz" data_ref="mz_file" label="Column with mz values" type="data_column"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
549 <param name="tabular_header" type="boolean" label="Tabular files contain a header line" truevalue="TRUE" falsevalue="FALSE"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
550 </when>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
551 <when value="manual_mz">
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
552 <repeat name="zoomed_sample" title="Define min m/z and max m/z for the plotting window" min="1">
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
553 <param name="xlimmin" type="float" value="" label="lower m/z boundary for plotting window"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
554 <param name="xlimmax" type="float" value="" label="upper m/z boundary for plotting window"/>
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
555 </repeat>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
556 </when>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
557 </conditional>
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
558 <param name="grid_variable" type="boolean" label="Add grid to plot" truevalue="TRUE" falsevalue="FALSE"/>
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
559 </inputs>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
560 <outputs>
2
3642ed221eb2 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents: 1
diff changeset
561 <data format="pdf" name="plots" from_work_dir="mzplots.pdf" label="${tool.name} on ${on_string}:results"/>
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
562 </outputs>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
563 <tests>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
564 <test>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
565 <expand macro="infile_imzml"/>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
566 <conditional name="pixel_conditional">
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
567 <param name="pixel_type" value="tabular_pixel"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
568 <param name="pixel_file" value="spectra_1_pixel.tabular"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
569 <param name="column_pixel_x" value="1"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
570 <param name="column_pixel_y" value="2"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
571 <param name="tabular_pixel_header" value="FALSE"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
572 </conditional>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
573 <param name="fullmz" value="TRUE"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
574 <conditional name="mz_range">
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
575 <param name="mz_range_options" value="manual_mz"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
576 <repeat name="zoomed_sample">
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
577 <param name="xlimmin" value="310"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
578 <param name="xlimmax" value="320"/>
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
579 </repeat>
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
580 <repeat name="zoomed_sample">
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
581 <param name="xlimmin" value="350"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
582 <param name="xlimmax" value="400"/>
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
583 </repeat>
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
584 <repeat name="zoomed_sample">
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
585 <param name="xlimmin" value="360"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
586 <param name="xlimmax" value="360.8"/>
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
587 </repeat>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
588 </conditional>
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
589 <param name="grid_variable" value="TRUE"/>
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
590 <output name="plots" file="Plot_imzml.pdf" compare="sim_size"/>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
591 </test>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
592 <test>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
593 <expand macro="infile_analyze75"/>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
594 <conditional name="pixel_conditional">
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
595 <param name="pixel_type" value="tabular_pixel"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
596 <param name="pixel_file" value="spectra_1_pixel.tabular"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
597 <param name="column_pixel_x" value="1"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
598 <param name="column_pixel_y" value="2"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
599 <param name="tabular_pixel_header" value="TRUE"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
600 </conditional>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
601 <param name="fullmz" value="TRUE"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
602 <conditional name="mz_range">
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
603 <param name="mz_range_options" value="manual_mz"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
604 <repeat name="zoomed_sample">
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
605 <param name="xlimmin" value="840"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
606 <param name="xlimmax" value="850"/>
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
607 </repeat>
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
608 </conditional>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
609 <param name="grid_variable" value="FALSE"/>
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
610 <output name="plots" file="Plot_analyze75.pdf" compare="sim_size"/>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
611 </test>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
612 <test>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
613 <expand macro="infile_analyze75"/>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
614 <conditional name="pixel_conditional">
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
615 <param name="pixel_type" value="tabular_pixel"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
616 <param name="pixel_file" value="annotations.tabular"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
617 <param name="column_pixel_x" value="1"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
618 <param name="column_pixel_y" value="2"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
619 <param name="tabular_pixel_header" value="TRUE"/>
13
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
620
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
621 <conditional name="single_or_overlaid">
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
622 <param name="plot_type" value="overlaid_plots"/>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
623 <param name="column_pixel_annotation" value="4"/>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
624 <param name="colour_type" value="manual_colour"/>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
625 <repeat name="colours">
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
626 <param name="annotation_color" value="#0000FF"/>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
627 </repeat>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
628 <repeat name="colours">
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
629 <param name="annotation_color" value="#00C957"/>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
630 </repeat>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
631 <repeat name="colours">
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
632 <param name="annotation_color" value="#B0171F"/>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
633 </repeat>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
634 </conditional>
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
635 </conditional>
13
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
636 <param name="fullmz" value="FALSE"/>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
637 <conditional name="mz_range">
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
638 <param name="mz_range_options" value="manual_mz"/>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
639 <repeat name="zoomed_sample">
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
640 <param name="xlimmin" value="1250"/>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
641 <param name="xlimmax" value="1270"/>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
642 </repeat>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
643 </conditional>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
644 <param name="grid_variable" value="FALSE"/>
c5aa9fca18c6 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 39bd480e8813fa7a96b640150365577a69885d17-dirty"
galaxyp
parents: 12
diff changeset
645 <output name="plots" file="Plot_analyze75_allpixels.pdf" compare="sim_size"/>
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
646 </test>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
647 <test>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
648 <param name="infile" value="3_files_combined.RData" ftype="rdata"/>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
649 <conditional name="pixel_conditional">
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
650 <param name="pixel_type" value="all_pixel"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
651 </conditional>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
652 <param name="fullmz" value="TRUE"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
653 <conditional name="mz_range">
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
654 <param name="mz_range_options" value="manual_mz"/>
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
655 <repeat name="zoomed_sample">
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
656 <param name="xlimmin" value="350"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
657 <param name="xlimmax" value="360"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
658 </repeat>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
659 </conditional>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
660 <param name="grid_variable" value="FALSE"/>
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
661 <output name="plots" file="Plot_rdata.pdf" compare="sim_size"/>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
662 </test>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
663 <test>
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
664 <expand macro="processed_infile_imzml"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
665 <conditional name="processed_cond">
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
666 <param name="processed_file" value="processed"/>
9
0b7e00e5b9d2 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents: 7
diff changeset
667 <param name="accuracy" value="100"/>
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
668 <param name="units" value="ppm"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
669 </conditional>
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
670 <conditional name="pixel_conditional">
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
671 <param name="pixel_type" value="all_pixel"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
672 </conditional>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
673 <param name="fullmz" value="FALSE"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
674 <conditional name="mz_range">
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
675 <param name="mz_range_options" value="manual_mz"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
676 <repeat name="zoomed_sample">
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
677 <param name="xlimmin" value="350"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
678 <param name="xlimmax" value="350.5"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
679 </repeat>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
680 <repeat name="zoomed_sample">
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
681 <param name="xlimmin" value="600"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
682 <param name="xlimmax" value="650"/>
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
683 </repeat>
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
684 </conditional>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
685 <param name="grid_variable" value="TRUE"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
686 <output name="plots" file="Plot_processed.pdf" compare="sim_size"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
687 </test>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
688 <test>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
689 <param name="infile" value="" ftype="imzml">
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
690 <composite_data value="preprocessing_results1.imzml"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
691 <composite_data value="preprocessing_results1.ibd"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
692 </param>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
693 <param name="centroids" value="TRUE"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
694 <conditional name="pixel_conditional">
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
695 <param name="pixel_type" value="all_pixel"/>
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
696 </conditional>
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
697 <param name="fullmz" value="TRUE"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
698 <conditional name="mz_range">
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
699 <param name="mz_range_options" value="manual_mz"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
700 <repeat name="zoomed_sample">
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
701 <param name="xlimmin" value="328"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
702 <param name="xlimmax" value="330"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
703 </repeat>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
704 <repeat name="zoomed_sample">
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
705 <param name="xlimmin" value="335"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
706 <param name="xlimmax" value="340"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
707 </repeat>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
708 </conditional>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
709 <param name="grid_variable" value="TRUE"/>
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
710 <output name="plots" file="Plot_picked.pdf" compare="sim_size"/>
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
711 </test>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
712 </tests>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
713 <help><![CDATA[
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
714
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
715 @CARDINAL_DESCRIPTION@
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
716
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
717 -----
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
718
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
719 This tool uses the Cardinal plot function to generate (zoomed in) mass spectra plots of mass spectrometry imaging data.
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
720
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
721 @MSIDATA_INPUT_DESCRIPTION@
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
722
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
723 @SPECTRA_TABULAR_INPUT_DESCRIPTION@
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
724
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
725 @MZ_TABULAR_INPUT_DESCRIPTION@
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
726
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
727 **Options**
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
728
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
729 *Choosing spectra*
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
730
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
731 - "All spectra": Plots average mass spectra (mean of all spectra)
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
732
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
733 - "Single spectra": Returns a full mass spectrum plot for each input spectrum, which is defined by its x- and y-coordinates
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
734
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
735 - the annotation column is optional:
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
736 - without annotation column: plots a separate mass spectrum for every input spectrum
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
737 - with annotation column: plots average mass spectra for each annotation group in different colours
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
738
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
739
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
740 *Choosing m/z axis*
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
741
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
742 - "Plot complete m/z range": Full m/z range is plotted
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
743
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
744 - "zoomed in m/z range": Only a customized m/z range is plotted
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
745
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
746
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
747 - "Manual input": Provide the minimum and maximum m/z value to define the m/z axis of the plot
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
748
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
749 - "Tabular input": File with m/z values of interest. Needs manual choice of m/z values to subtract and add from the input m/z values to generate the m/z axis of the plot
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
750
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
751
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
752 **Output**
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
753
7
64ea4507e0bd "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 4
diff changeset
754 - Single Pdf with all mass spectra plots
0
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
755
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
756
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
757 ]]>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
758 </help>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
759 <expand macro="citations"/>
9c03e7a617cd planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
760 </tool>