annotate combine.xml @ 9:11d9b3ebbabd draft

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