annotate combine.xml @ 8:525f201b86c1 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d008f6ea0f5c8435fb975a34cb99ea4d42c5ebd2"
author galaxyp
date Wed, 13 May 2020 14:08:25 -0400
parents 392b2dfd261d
children 7e18fcb92a6a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8
525f201b86c1 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d008f6ea0f5c8435fb975a34cb99ea4d42c5ebd2"
galaxyp
parents: 7
diff changeset
1 <tool id="cardinal_combine" name="MSI combine" version="@VERSION@.1">
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
2 <description>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
3 combine several mass spectrometry imaging datasets into one
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
4 </description>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
5 <macros>
93be1d20b5c3 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>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
7 </macros>
7
392b2dfd261d "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 6
diff changeset
8 <expand macro="requirements">
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
9 <requirement type="package" version="3.2.1">r-ggplot2</requirement>
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
10 <requirement type="package" version="0.12">r-maldiquantforeign</requirement>
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
11 <requirement type="package" version="1.19.3">r-maldiquant</requirement>
7
392b2dfd261d "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 6
diff changeset
12 </expand>
0
93be1d20b5c3 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">
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
14 <![CDATA[
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
15 #for $i, $infile in enumerate($infiles):
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
16 #if $infile.ext == 'imzml'
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
17 ln -s '${infile.extra_files_path}/imzml' infile_${i}.imzML &&
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
18 ln -s '${infile.extra_files_path}/ibd' infile_${i}.ibd &&
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
19 #elif $infile.ext == 'analyze75'
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
20 ln -s '${infile.extra_files_path}/hdr' infile_${i}.hdr &&
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
21 ln -s '${infile.extra_files_path}/img' infile_${i}.img &&
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
22 ln -s '${infile.extra_files_path}/t2m' infile_${i}.t2m &&
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
23 #else
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
24 ln -s '$infile' infile_${i}.RData &&
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
25 #end if
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
26 #end for
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
27 #if $annotation_cond.annotation_tabular == 'annotation'
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
28 #for $i, $annotation_file in enumerate($annotation_cond.annotation_files):
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
29 ln -s '$annotation_file' annotation_file_${i}.tabular &&
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
30 #end for
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
31 #end if
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
32
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
33 cat '${msi_combine}' &&
1
65245dc812c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents: 0
diff changeset
34 Rscript '${msi_combine}' &&
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
35 mkdir $outfile_imzml.files_path &&
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
36 mv ./out.imzML "${os.path.join($outfile_imzml.files_path, 'imzml')}" | true &&
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
37 mv ./out.ibd "${os.path.join($outfile_imzml.files_path, 'ibd')}" | true &&
1
65245dc812c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents: 0
diff changeset
38 echo "imzML file:" > $outfile_imzml &&
65245dc812c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents: 0
diff changeset
39 ls -l "$outfile_imzml.files_path" >> $outfile_imzml
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
40
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
41 ]]>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
42 </command>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
43 <configfiles>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
44 <configfile name="msi_combine"><![CDATA[
6
bb1ac6b47a6c "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 15e24b1f0143679647906bc427654f66b417a45c"
galaxyp
parents: 5
diff changeset
45
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
46 #import re
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
47
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
48 ################ 1) load libraries and do preparations #################
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
49
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
50 library(Cardinal)
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
51 library(ggplot2)
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
52 library(MALDIquantForeign)
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
53 library(MALDIquant)
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
54
7
392b2dfd261d "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 6
diff changeset
55
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
56 ## read tabular file for xy_shift option
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
57 #if str( $combine_conditional.combine_method ) == 'xy_shifts':
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
58 input_list = read.delim("$combine_conditional.coordinates_file", header = $combine_conditional.xy_header,
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
59 stringsAsFactors = FALSE)
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
60 #end if
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
61
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
62 ## function to load RData and store with new variable name
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
63 loadRData <- function(fileName){
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
64 load(fileName)
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
65 get(ls()[ls() != "fileName"])
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
66 }
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
67
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
68 ## preparations for reading files one by one with for loop
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
69 sample_names = numeric()
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
70 x_shifts = 0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
71 y_shifts = 0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
72 max_y = numeric()
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
73 valid_dataset = logical()
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
74 coordinates_combined = data.frame(matrix(,ncol=2, nrow=0))
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
75 msidata_combined = list()
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
76 #set $msidata = []
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
77 #set $pixelcoords = []
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
78 #set $num_infiles = len($infiles)
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
79 all_files = $num_infiles
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
80
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
81 ###################### 2) reading MSI files ####################################
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
82
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
83 #for $i, $infile in enumerate($infiles):
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
84
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
85 ## read and manipulate MSI data
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
86
7
392b2dfd261d "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 6
diff changeset
87 #if $infile.ext == 'imzml'
392b2dfd261d "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 6
diff changeset
88 #if str($processed_cond.processed_file) == "processed":
8
525f201b86c1 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d008f6ea0f5c8435fb975a34cb99ea4d42c5ebd2"
galaxyp
parents: 7
diff changeset
89 msidata_$i <- readImzML('infile_${i}', resolution=$processed_cond.accuracy, units = "$processed_cond.units", attach.only=TRUE)
525f201b86c1 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d008f6ea0f5c8435fb975a34cb99ea4d42c5ebd2"
galaxyp
parents: 7
diff changeset
90 msidata_$i = collect(msidata_$i, as.matrix=TRUE) ##coercion to continuous
7
392b2dfd261d "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 6
diff changeset
91 centroided(msidata_$i) = $centroids
392b2dfd261d "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 6
diff changeset
92 #else
8
525f201b86c1 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d008f6ea0f5c8435fb975a34cb99ea4d42c5ebd2"
galaxyp
parents: 7
diff changeset
93 msidata_$i <- readImzML('infile_${i}', attach.only=TRUE)
7
392b2dfd261d "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 6
diff changeset
94 centroided(msidata_$i) = $centroids
392b2dfd261d "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 6
diff changeset
95 #end if
392b2dfd261d "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 6
diff changeset
96 #elif $infile.ext == 'analyze75'
8
525f201b86c1 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d008f6ea0f5c8435fb975a34cb99ea4d42c5ebd2"
galaxyp
parents: 7
diff changeset
97 msidata_$i = readAnalyze('infile_${i}', attach.only=TRUE)
1
65245dc812c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents: 0
diff changeset
98 centroided(msidata_$i) = $centroids
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
99 #else
7
392b2dfd261d "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 6
diff changeset
100 ## function to read RData files independent of filename
392b2dfd261d "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 6
diff changeset
101 loadRData <- function(fileName){
392b2dfd261d "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 6
diff changeset
102 load(fileName)
392b2dfd261d "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 6
diff changeset
103 get(ls()[ls() != "fileName"])
392b2dfd261d "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 6
diff changeset
104 }
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
105 msidata_$i = loadRData('infile_${i}.RData')
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
106 ## keep compatibility with old .RData files:
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
107 msidata_$i\$column1 = NULL
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
108 msidata_$i\$column2 = NULL
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
109 msidata_$i\$column3 = NULL
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
110 msidata_$i\$column4 = NULL
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
111 msidata_$i\$column5 = NULL
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
112 msidata_$i\$combined_sample = NULL
7
392b2dfd261d "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 6
diff changeset
113 #end if
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
114
8
525f201b86c1 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d008f6ea0f5c8435fb975a34cb99ea4d42c5ebd2"
galaxyp
parents: 7
diff changeset
115 ## coercion into MSImageSet
525f201b86c1 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d008f6ea0f5c8435fb975a34cb99ea4d42c5ebd2"
galaxyp
parents: 7
diff changeset
116 msidata_$i = as(msidata_$i, "MSImageSet")
525f201b86c1 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d008f6ea0f5c8435fb975a34cb99ea4d42c5ebd2"
galaxyp
parents: 7
diff changeset
117
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
118 ## remove duplicated coordinates, otherwise combine will fail
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
119 print(paste0(sum(duplicated(coord(msidata_$i))), " duplicated coordinates were removed from input file"))
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
120 msidata_${i} <- msidata_${i}[,!duplicated(coord(msidata_${i}))]
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
121
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
122 ## same name for MSI data files necessary to combine data into one single coordinate system
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
123 sampleNames(msidata_$i) = "msidata"
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
124
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
125 ############ 3) Read and process annotation tabular files ######################
1
65245dc812c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents: 0
diff changeset
126
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
127 #if str($annotation_cond.annotation_tabular) == 'annotation'
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
128 print("annotations")
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
129
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
130 ## read annotation tabular, set first two columns as x and y, merge with coordinates dataframe and order according to pixelorder in msidata
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
131 input_annotation = read.delim("annotation_file_${i}.tabular", header = $annotation_cond.tabular_header, stringsAsFactors = FALSE)
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
132 colnames(input_annotation)[1:2] = c("x", "y")
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
133
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
134 msidata_coordinates = cbind(coord(msidata_$i)[,1:2], 1:ncol(msidata_$i))
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
135 colnames(msidata_coordinates)[3] = "pixel_index"
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
136
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
137 annotation_df = merge(msidata_coordinates, input_annotation, by=c("x", "y"), all.x=TRUE)
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
138 annotation_df_sorted = annotation_df[order(annotation_df\$pixel_index),]## orders pixel according to msidata
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
139 annotation_df_sorted\$pixel_index = NULL
1
65245dc812c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents: 0
diff changeset
140
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
141 ## extract columnnames from (last) annotation tabular (for QC plot names)
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
142 annotation_colnames = colnames(input_annotation)
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
143
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
144 #end if
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
145
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
146 ############### 4) shift coordinates with xy shifts ############################
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
147
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
148 #if str( $combine_conditional.combine_method ) == 'xy_shifts':
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
149
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
150 ## optional: set all files to 1/1 and then add shift
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
151 #if $combine_conditional.xy_origin:
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
152 coord(msidata_$i)\$x = as.integer(coord(msidata_$i)\$x - min(coord(msidata_$i)\$x-1))
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
153 coord(msidata_$i)\$y = as.integer(coord(msidata_$i)\$y - min(coord(msidata_$i)\$y-1))
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
154 #end if
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
155
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
156 ## shift coordinates according to input tabular file and store file names
1
65245dc812c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents: 0
diff changeset
157 coord(msidata_$i)\$x = as.integer(coord(msidata_$i)\$x + input_list[$i+1,$combine_conditional.column_x]) ## shifts x coordinates according to tabular file
65245dc812c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents: 0
diff changeset
158 coord(msidata_$i)\$y = as.integer(coord(msidata_$i)\$y + input_list[$i+1,$combine_conditional.column_y]) ## shifts y coordinates according to tabular file
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
159 sample_name = rep(paste(input_list[$i+1,$combine_conditional.column_names]),times=ncol(msidata_$i)) ## stores file name for each pixel
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
160 sample_names = append(sample_names, sample_name)
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
161
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
162 ## store number of file to use later when removing duplicate coordinates
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
163 pixelcoords_$i = cbind(coord(msidata_$i)[,1:2], rep($i+1,ncol(msidata_$i)))
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
164 #silent $pixelcoords.append('pixelcoords_'+str($i))
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
165 colnames(pixelcoords_$i)[3] = "file_number"
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
166
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
167 ##################### 5) shift coordinates automatically #######################
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
168
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
169 #elif str( $combine_conditional.combine_method ) == 'automatic_combine':
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
170
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
171 ## use name of Galaxy inputfile as sample annotation
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
172 sample_name = character()
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
173 #set escaped_element_identifier = re.sub('[^\w\-\s\[/]]', '_', str($infile.element_identifier))
2
129cddd02600 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents: 1
diff changeset
174
129cddd02600 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents: 1
diff changeset
175 if (ncol(msidata_$i)>0 & nrow(msidata_$i) >0)
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
176 {
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
177 sample_name = append(sample_name, rep(paste("$escaped_element_identifier"),ncol(msidata_$i)))
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
178 }
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
179
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
180 ## Number of input files define grid which is row-wise filled with files
1
65245dc812c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents: 0
diff changeset
181 coord(msidata_$i)\$x = as.integer(coord(msidata_$i)\$x - (min(coord(msidata_$i)\$x-1)) + x_shifts)
65245dc812c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents: 0
diff changeset
182 coord(msidata_$i)\$y = as.integer(coord(msidata_$i)\$y - (min(coord(msidata_$i)\$y-1)) + y_shifts)
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
183
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
184 x_shifts = max(coord(msidata_$i)\$x) + $combine_conditional.shift_value
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
185 max_y = append(max_y, max(coord(msidata_$i)\$y))
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
186 all_files = $num_infiles
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
187 new_row = ($i+1)/ceiling(sqrt(all_files))
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
188 new_row%%1==0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
189 if (new_row%%1==0)
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
190 {x_shifts = 0 ### when row is filled: x values start again at zero
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
191 y_shifts = max(max_y) + $combine_conditional.shift_value ### when row is filled: y value increases to start a new row
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
192 max_y = numeric()}
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
193
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
194 #end if
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
195
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
196 ############################# 6) combination of files ##########################
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
197
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
198 ## combine shifted coordinates with sample name and annotations from input file
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
199
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
200 #if str($annotation_cond.annotation_tabular) == 'annotation'
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
201 cardinal_coordinates_$i = data.frame(as.matrix(Cardinal::coord(msidata_$i)[,1:2]), sample_name, annotation_df_sorted[,-c(1,2)])
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
202 #else
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
203 cardinal_coordinates_$i = data.frame(as.matrix(Cardinal::coord(msidata_$i)[,1:2]), sample_name)
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
204 #end if
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
205
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
206 ## store files to combine them later and for each file check if it is valid
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
207 #silent $msidata.append('msidata_'+str($i))
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
208 valid_dataset = append(valid_dataset, ncol(msidata_$i)>0 & nrow(msidata_$i)>0)
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
209
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
210
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
211 ######################### 6a) combination different mz axis ####################
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
212
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
213 ## combination for files with different mz axis via MALDIquant during for loop
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
214
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
215 #if $processed_true:
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
216 print("mz axis differ")
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
217
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
218 cardinal_mzs_$i = Cardinal::mz(msidata_$i)
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
219
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
220 for(number_spectra in 1:ncol(msidata_${i})){
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
221
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
222 if (centroided(msidata_$i) == FALSE){
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
223 ## create mass spectrum object
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
224 maldi_data_${i} = list()
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
225 for(number_spectra in 1:ncol(msidata_$i)){
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
226 maldi_data_${i}[[number_spectra]] = MALDIquant::createMassSpectrum(mass = cardinal_mzs_$i, intensity = Cardinal::iData(msidata_$i)[,number_spectra])}
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
227 }else{
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
228 maldi_data_${i} = list()
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
229 for (spectra in 1:ncol(msidata_$i))
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
230 {
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
231 single_peaks_${i} = createMassPeaks(cardinal_mzs_$i, Cardinal::spectra(msidata_$i)[,spectra], snr=as.numeric(rep("NA", nrow(msidata_$i))))
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
232 maldi_data_${i}[[spectra]] = single_peaks_${i}
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
233 }
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
234 }
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
235 }
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
236
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
237 msidata_combined = append(msidata_combined, maldi_data_$i)
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
238
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
239 #end if
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
240
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
241 coordinates_combined = rbind(coordinates_combined, cardinal_coordinates_$i)
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
242
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
243 #end for
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
244
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
245
6
bb1ac6b47a6c "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 15e24b1f0143679647906bc427654f66b417a45c"
galaxyp
parents: 5
diff changeset
246 ######################### 6b) combination same mz axis ###################
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
247
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
248 #if str( $combine_conditional.combine_method ) == 'automatic_combine':
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
249 print("automatic combine")
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
250
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
251 #if not $processed_true:
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
252 ## combine only valid datasets
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
253
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
254 valid_data = list(#echo ','.join($msidata)#)[valid_dataset]
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
255 msidata = do.call(combine, valid_data)
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
256 print("Valid datasets in order of input bottom to top:")
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
257 print(valid_dataset)
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
258 writeImzML(msidata, "out")
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
259
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
260 #else
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
261
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
262 ## save msidata as imzML file MALDIquant
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
263 MALDIquantForeign::exportImzMl(msidata_combined, file="out.imzML", processed=TRUE, coordinates=as.matrix(coordinates_combined[,1:2]))
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
264
1
65245dc812c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents: 0
diff changeset
265 #end if
65245dc812c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents: 0
diff changeset
266
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
267 ########################### xy shift combination ###############################
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
268 ################################################################################
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
269
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
270 #elif str( $combine_conditional.combine_method ) == 'xy_shifts':
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
271 print("xy_shifts")
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
272
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
273 #if not $processed_true:
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
274
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
275 duplicated_coordinates= duplicated(coordinates_combined[,1:2])| duplicated(coordinates_combined[,1:2], fromLast=TRUE)
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
276 print(paste0("Number of removed duplicated coordinates after combination: ", sum(duplicated_coordinates)))
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
277 coordinates_combined = coordinates_combined[!duplicated_coordinates,]
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
278
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
279 ## remove duplicated coordinates
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
280 datasetlist = list()
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
281 count = 1
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
282 for (usable_dataset in list(#echo ','.join($msidata)#)){
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
283 pixelsofinterest = pixels(usable_dataset)[names(pixels(usable_dataset)) %in% rownames(coordinates_combined)]
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
284 filtered_dataset = usable_dataset[,pixelsofinterest]
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
285 if (ncol(filtered_dataset) > 0 ){
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
286 datasetlist[[count]] = filtered_dataset}
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
287 count = count +1}
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
288
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
289 msidata = do.call(combine, datasetlist)
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
290 writeImzML(msidata, "out")
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
291
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
292 #else
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
293
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
294 ## in case user made mistake with xy shifts: find duplicated coordinates
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
295 duplicated_coordinates= duplicated(coordinates_combined[,1:2])| duplicated(coordinates_combined[,1:2], fromLast=TRUE)
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
296 print(paste0("Number of removed duplicated coordinates after combination: ", sum(duplicated_coordinates)))
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
297 unique_coordinates = data.frame(coordinates_combined)[!duplicated_coordinates,]
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
298
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
299 filtered_dataset = msidata_combined [!duplicated_coordinates]
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
300 coordinates_matrix = as.matrix(unique_coordinates[,1:2])
4
48c07268f341 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents: 2
diff changeset
301
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
302 ## save msidata as imzML file MALDIquant
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
303 MALDIquantForeign::exportImzMl(filtered_dataset, file="out.imzML", processed=TRUE, coordinates=coordinates_matrix)
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
304
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
305 coordinates_combined = unique_coordinates
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
306
2
129cddd02600 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents: 1
diff changeset
307 #end if
1
65245dc812c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents: 0
diff changeset
308
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
309 #end if
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
310
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
311 ################################## outputs #####################################
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
312 ################################################################################
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
313
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
314 ########### QC with pixels and their annotations ################################
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
315
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
316 pdf("Combined_qc.pdf", width=15, height=15)
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
317
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
318 ## combined plot
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
319 combine_plot = ggplot(coordinates_combined[,1:3], aes(x=x, y=y, fill=sample_name))+
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
320 geom_tile() +
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
321 coord_fixed()+
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
322 ggtitle("Spatial orientation of combined data")+
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
323 theme_bw()+
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
324 theme(text=element_text(family="ArialMT", face="bold", size=15))+
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
325 theme(legend.position="bottom",legend.direction="vertical")+
2
129cddd02600 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents: 1
diff changeset
326 guides(fill=guide_legend(ncol=4,byrow=TRUE))
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
327 coord_labels = aggregate(cbind(x,y)~sample_name, data=coordinates_combined[,1:3], mean)
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
328 coord_labels\$file_number = gsub( "_.*$", "", coord_labels\$sample_name)
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
329 print(combine_plot)
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
330
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
331 #if str($annotation_cond.annotation_tabular) == 'annotation'
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
332 ## annotation plots
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
333 for (inputcolumns in 4:ncol(coordinates_combined)){
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
334 ## plot 1
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
335 column1_df = coordinates_combined[,c(1,2,inputcolumns)]
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
336 colnames(column1_df)[3] = "column1"
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
337
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
338 if (sum(is.na(column1_df[3])) < nrow(column1_df)){
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
339 column1_plot = ggplot(column1_df, aes(x=x, y=y, fill=column1))+
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
340 geom_tile() +
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
341 coord_fixed()+
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
342 ggtitle(paste0(annotation_colnames[inputcolumns-1]))+
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
343 theme_bw()+
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
344 theme(text=element_text(family="ArialMT", face="bold", size=15))+
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
345 theme(legend.position="bottom",legend.direction="vertical")+
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
346 guides(fill=guide_legend(ncol=4,byrow=TRUE, title=annotation_colnames[1]))
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
347 print(column1_plot)}
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
348 ##rename columnname for output tabular file
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
349 colnames(column1_df)[3] = annotation_colnames[inputcolumns-1]
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
350
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
351 }
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
352
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
353 #end if
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
354 dev.off()
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
355
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
356 ##################### annotation tabular output ################################
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
357
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
358 write.table(coordinates_combined, file="$pixel_annotations", quote = FALSE, row.names = FALSE, col.names=TRUE, sep = "\t")
1
65245dc812c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents: 0
diff changeset
359
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
360 ]]></configfile>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
361 </configfiles>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
362 <inputs>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
363 <param name="infiles" type="data" multiple="true" format="imzml,rdata,analyze75"
4
48c07268f341 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents: 2
diff changeset
364 label="MSI data"
48c07268f341 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents: 2
diff changeset
365 help="Input file as imzML (composite upload), Analyze7.5 (composite upload) or Cardinal MSImageSet saved as RData (regular upload)"/>
48c07268f341 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents: 2
diff changeset
366 <param name="centroids" type="boolean" label="Centroided input" help="Choose Yes if peak detection has already been done." truevalue="TRUE" falsevalue="FALSE"/>
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
367 <conditional name="processed_cond">
4
48c07268f341 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents: 2
diff changeset
368 <param name="processed_file" type="select" label="Processed imzML file" help="Choose no if your input is an Analyze7.5 or continuous imzML file">
48c07268f341 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents: 2
diff changeset
369 <option value="no_processed" selected="True">no</option>
48c07268f341 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
galaxyp
parents: 2
diff changeset
370 <option value="processed">yes</option>
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
371 </param>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
372 <when value="no_processed"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
373 <when value="processed">
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
374 <param name="accuracy" type="float" value="50" label="Mass accuracy to which the m/z values will be binned" help="This should be set to the native accuracy of the mass spectrometer, if known"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
375 <param name="units" display="radio" type="select" label="Unit of the mass accuracy" help="either m/z or ppm">
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
376 <option value="mz" >mz</option>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
377 <option value="ppm" selected="True" >ppm</option>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
378 </param>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
379 </when>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
380 </conditional>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
381 <conditional name="annotation_cond">
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
382 <param name="annotation_tabular" type="select" label="Optional annotation of pixels with tabular files">
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
383 <option value="no_annotation" selected="True">no annotation</option>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
384 <option value="annotation">pixel annotations</option>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
385 </param>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
386 <when value="no_annotation"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
387 <when value="annotation">
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
388 <param name="annotation_files" type="data" multiple="true" format="tabular"
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
389 label="Pixel annotations tabular files"
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
390 help="Same number and order of files as input files. First column x values, second column y values, further columns with annotations"/>
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
391 <param name="tabular_header" type="boolean" label="Tabular files contain a header line" truevalue="TRUE" falsevalue="FALSE"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
392 </when>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
393 </conditional>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
394 <conditional name="combine_conditional">
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
395 <param name="combine_method" type="select" label="Way of combining multiple files">
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
396 <option value="automatic_combine" selected="True" >automatic combination</option>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
397 <option value="xy_shifts">shift xy coordinates with a tabular file</option>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
398 </param>
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
399 <when value="automatic_combine">
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
400 <param name="shift_value" type="integer" value="5" label="Number of empty pixels that should separate different datasets in x and y dimension"/>
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
401 </when>
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
402 <when value="xy_shifts">
2
129cddd02600 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents: 1
diff changeset
403 <param name="coordinates_file" type="data" format="tabular" label="Datasetnames, x and y values to shift pixel coordinates before combining"
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
404 help="Tabular file with three columns: 1 for the filename, 1 for the x-coordinate shift and 1 for the y-coordinate shift. Pixels with the same coordinates after shifting will be deleted."/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
405 <param name="column_x" data_ref="coordinates_file" label="Column with values for shift in x direction" type="data_column"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
406 <param name="column_y" data_ref="coordinates_file" label="Column with values for shift in y direction" type="data_column"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
407 <param name="column_names" data_ref="coordinates_file" label="Column with dataset names" type="data_column"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
408 <param name="xy_header" type="boolean" label="Tabular files contain a header line" truevalue="TRUE" falsevalue="FALSE"/>
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
409 <param name="xy_origin" type="boolean" label="Set all file coordinates to 1/1 as origin" truevalue="TRUE" falsevalue="FALSE" help="Yes: all file coordinates are shifted in order to have at least one pixel with x = 1 and one with y = 1; then coordinates shifts are added. No: the coordinate shifts are added to the current coordinates of the file"/>
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
410 </when>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
411 </conditional>
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
412 <param name="processed_true" type="boolean" label="Do the files have different m/z axis?" help="If all m/z values of all files are exactly the same choose 'No'. If not sure choose 'Yes'." truevalue="TRUE" falsevalue="FALSE"/>
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
413 </inputs>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
414 <outputs>
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
415 <data format="imzml" name="outfile_imzml" label="${tool.name} on ${on_string}: imzML"/>
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
416 <data format="pdf" name="QC_overview" from_work_dir="Combined_qc.pdf" label = "${tool.name} on ${on_string}: QC"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
417 <data format="tabular" name="pixel_annotations" label="${tool.name} on ${on_string}: annotations"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
418 </outputs>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
419 <tests>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
420 <test>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
421 <param name="infiles" value="msidata_1.RData,msidata_2.RData,msidata_3.RData" ftype="rdata"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
422 <conditional name="annotation_cond">
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
423 <param name="annotation_tabular" value="annotation"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
424 <param name="annotation_files" value="annotations_file1.tabular,annotations_file2.tabular,annotations_file3.tabular" ftype="tabular"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
425 <param name="tabular_header" value="TRUE"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
426 </conditional>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
427 <param name="combine_method" value="xy_shifts"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
428 <param name="coordinates_file" ftype="tabular" value="xy_coordinates.tabular"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
429 <param name="column_x" value="1"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
430 <param name="column_y" value="2"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
431 <param name="column_names" value="3"/>
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
432 <param name="processed_true" value="FALSE"/>
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
433 <output name="pixel_annotations" file="123_annotation_output.tabular"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
434 <output name="QC_overview" file="123_combined_QC.pdf" compare="sim_size"/>
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
435 <output name="outfile_imzml" ftype="imzml" file="123_combined.imzml.txt" compare="sim_size">
6
bb1ac6b47a6c "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 15e24b1f0143679647906bc427654f66b417a45c"
galaxyp
parents: 5
diff changeset
436 <extra_files type="file" file="123_combined.imzml" name="imzml" lines_diff="12"/>
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
437 <extra_files type="file" file="123_combined.ibd" name="ibd" compare="sim_size"/>
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
438 </output>
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
439 </test>
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
440 <test>
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
441 <param name="infiles" value="123_combined_picked.rdata,123_combined_picked2.rdata" ftype="rdata"/>
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
442 <param name="centroids" value="TRUE"/>
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
443 <param name="combine_method" value="xy_shifts"/>
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
444 <param name="coordinates_file" ftype="tabular" value="xy_coordinates2.tabular"/>
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
445 <param name="column_x" value="1"/>
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
446 <param name="column_y" value="2"/>
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
447 <param name="column_names" value="3"/>
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
448 <param name="processed_true" value="TRUE"/>
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
449 <output name="pixel_annotations" file="picked.tabular"/>
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
450 <output name="QC_overview" file="picked_QC.pdf" compare="sim_size"/>
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
451 <output name="outfile_imzml" ftype="imzml" file="picked.imzml.txt" compare="sim_size">
6
bb1ac6b47a6c "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 15e24b1f0143679647906bc427654f66b417a45c"
galaxyp
parents: 5
diff changeset
452 <extra_files type="file" file="picked.imzml" name="imzml" lines_diff="12"/>
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
453 <extra_files type="file" file="picked.ibd" name="ibd" compare="sim_size"/>
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
454 </output>
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
455 </test>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
456 <test>
2
129cddd02600 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents: 1
diff changeset
457 <param name="infiles" value="msidata_1.RData,msidata_2.RData,msidata_3.RData" ftype="rdata"/>
129cddd02600 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents: 1
diff changeset
458 <conditional name="annotation_cond">
129cddd02600 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents: 1
diff changeset
459 <param name="annotation_tabular" value="no_annotation"/>
129cddd02600 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents: 1
diff changeset
460 </conditional>
129cddd02600 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents: 1
diff changeset
461 <param name="combine_method" value="automatic_combine"/>
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
462 <param name="processed_true" value="FALSE"/>
2
129cddd02600 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents: 1
diff changeset
463 <output name="QC_overview" file="123_combined_auto.pdf" compare="sim_size"/>
129cddd02600 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents: 1
diff changeset
464 <output name="pixel_annotations" file="123_combined_auto.tabular"/>
129cddd02600 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents: 1
diff changeset
465 <output name="outfile_imzml" ftype="imzml" file="123_combined_auto.imzml.txt" compare="sim_size">
6
bb1ac6b47a6c "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 15e24b1f0143679647906bc427654f66b417a45c"
galaxyp
parents: 5
diff changeset
466 <extra_files type="file" file="123_combined_auto.imzml" name="imzml" lines_diff="12"/>
2
129cddd02600 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents: 1
diff changeset
467 <extra_files type="file" file="123_combined_auto.ibd" name="ibd" compare="sim_size"/>
129cddd02600 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents: 1
diff changeset
468 </output>
129cddd02600 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents: 1
diff changeset
469 </test>
129cddd02600 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents: 1
diff changeset
470 <test>
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
471 <param name="infiles" value="msidata_1.RData,msidata_2.RData" ftype="rdata"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
472 <conditional name="annotation_cond">
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
473 <param name="annotation_tabular" value="annotation"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
474 <param name="annotation_files" value="annotations_file1.tabular,annotations_file2.tabular" ftype="tabular"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
475 <param name="tabular_header" value="TRUE"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
476 </conditional>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
477 <param name="combine_method" value="automatic_combine"/>
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
478 <param name="processed_true" value="FALSE"/>
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
479 <output name="pixel_annotations" file="12_annotation_output.tabular"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
480 <output name="QC_overview" file="12_combined_QC.pdf" compare="sim_size"/>
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
481 <output name="outfile_imzml" ftype="imzml" file="12_combined.imzml.txt" compare="sim_size">
6
bb1ac6b47a6c "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 15e24b1f0143679647906bc427654f66b417a45c"
galaxyp
parents: 5
diff changeset
482 <extra_files type="file" file="12_combined.imzml" name="imzml" lines_diff="12"/>
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
483 <extra_files type="file" file="12_combined.ibd" name="ibd" compare="sim_size"/>
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
484 </output>
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
485 </test>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
486 <test>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
487 <param name="infiles" value="msidata_1.RData,123_combined.RData" ftype="rdata"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
488 <conditional name="annotation_cond">
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
489 <param name="annotation_tabular" value="annotation"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
490 <param name="annotation_files" value="annotations_file1.tabular,123_annotation.tabular" ftype="tabular"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
491 <param name="tabular_header" value="TRUE"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
492 </conditional>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
493 <param name="combine_method" value="automatic_combine"/>
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
494 <param name="processed_true" value="FALSE"/>
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
495 <output name="pixel_annotations" file="112_annotation_output.tabular"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
496 <output name="QC_overview" file="112_auto_combined_QC.pdf" compare="sim_size"/>
2
129cddd02600 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents: 1
diff changeset
497 <output name="outfile_imzml" ftype="imzml" file="112_auto_combined.imzml.txt" compare="sim_size">
6
bb1ac6b47a6c "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 15e24b1f0143679647906bc427654f66b417a45c"
galaxyp
parents: 5
diff changeset
498 <extra_files type="file" file="112_auto_combined.imzml" name="imzml" lines_diff="12"/>
2
129cddd02600 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents: 1
diff changeset
499 <extra_files type="file" file="112_auto_combined.ibd" name="ibd" compare="sim_size"/>
129cddd02600 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
galaxyp
parents: 1
diff changeset
500 </output>
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
501 </test>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
502 <test>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
503 <param name="infiles" value="msidata_2.RData,123_combined.RData" ftype="rdata"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
504 <conditional name="annotation_cond">
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
505 <param name="annotation_tabular" value="no_annotation"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
506 </conditional>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
507 <param name="combine_method" value="automatic_combine"/>
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
508 <param name="processed_true" value="FALSE"/>
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
509 <output name="pixel_annotations" file="2123_annotation_output.tabular"/>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
510 <output name="QC_overview" file="2123_auto_combined_QC.pdf" compare="sim_size"/>
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
511 <output name="outfile_imzml" ftype="imzml" file="2123_auto_combined.imzml.txt" compare="sim_size">
6
bb1ac6b47a6c "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 15e24b1f0143679647906bc427654f66b417a45c"
galaxyp
parents: 5
diff changeset
512 <extra_files type="file" file="2123_auto_combined.imzml" name="imzml" lines_diff="12"/>
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
513 <extra_files type="file" file="2123_auto_combined.ibd" name="ibd" compare="sim_size"/>
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
514 </output>
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
515 </test>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
516 </tests>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
517 <help>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
518 <![CDATA[
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
519
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
520 @CARDINAL_DESCRIPTION@
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
521
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
522 -----
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
523
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
524 This tool combines several mass spectrometry imaging data files.
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
525
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
526 @MSIDATA_INPUT_DESCRIPTION@
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
527 - Coordinates stored as decimals rather than integers will be rounded to obtain a regular pixel grid. This might lead to duplicated coordinates which will be automatically removed before the tools analysis starts.
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
528 @SPECTRA_TABULAR_INPUT_DESCRIPTION@
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
529
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
530 - For xy shifts with tabular file: Tabular file with x and y coordinates shift and file name
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
531
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
532 - Each input file is renamed and shifted in x and y direction according to this tabular file. In the example the files have about the same pixel dimensions which is smaller than 510x260.
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
533 - The file can have any column names as header (in this case set "Tabular file contains a header line" to "Yes") or no header at all (set "Tabular file contains a header line" to "No").
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
534
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
535 ::
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
536
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
537 x_shift y_shift file name
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
538 0 0 file1
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
539 510 0 file2
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
540 0 260 file3
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
541 510 260 file4
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
542 ...
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
543 ...
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
544
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
545
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
546
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
547
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
548 **Options**
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
549
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
550 - "automatic combination": files are automatically arranged in a grid, subfiles are named according to the input file name
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
551 - "xy shifts": each file can be moved in x and y direction according to the users need (define one tabular file in the order in which the files are loaded in the history (bottom to top) and define for each file the x and y coordinates shifts in separate columns and the file name in a third column as shown above). The xy shift option combines all datasets and removes all duplicated pixels (same x and y coordinates).
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
552 - "Set all file coordinates to 1/1 as origin" can be choosen to override current pixel coordinates of the input file and set their minimal x and minimal y values to 1. Then the shifts from the xy shift tabular files are used to move the pixels of each dataset.
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
553 - In case the input files have not exactly the same m/z values set "Do the files have different m/z axis?" to "Yes". Then functionalities of the "MALDIquant" package are used to combine the datasets.
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
554
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
555
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
556 **Tips**
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
557
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
558 - The combine tool puts all samples into a common x-y-grid, therefore pixel coordinates will change. In case the pixels are already annotated, the annotations should be provided as tabular files and the tool will return an annotation file with the new pixel coordinates. This annotation file can then be used together with the combined MSI data for tools in which the annotation is required (e.g. 'MSI classification') or useful (e.g. 'MSI spectra plots').
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
559
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
560
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
561 **Output**
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
562
6
bb1ac6b47a6c "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 15e24b1f0143679647906bc427654f66b417a45c"
galaxyp
parents: 5
diff changeset
563 - MSI data as imzML file (in continuous format when m/z axis were the same; in processed format when m/z axis were different)
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
564 - Pdf with pixel positions and annotations of the combined files
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
565 - Tabular file with pixel annotations (x,y,column with input file names and annotation columns)
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
566
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
567
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
568 ]]>
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
569 </help>
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
570 <citations>
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
571 <citation type="doi">10.1093/bioinformatics/btv146</citation>
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
572 <citation type="doi">10.1007/978-3-319-45809-0_6</citation>
7
392b2dfd261d "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
galaxyp
parents: 6
diff changeset
573 <citation type="doi">10.1093/gigascience/giz143</citation>
5
b41107d8fe89 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 1df4591de435d232862f20669aea529ceb23b12a"
galaxyp
parents: 4
diff changeset
574 </citations>
0
93be1d20b5c3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff changeset
575 </tool>