annotate msi_combine.xml @ 5:ff91e78b5c5c draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
author galaxyp
date Fri, 06 Jul 2018 14:13:08 -0400
parents d05bd881af3d
children f4aafc565aa3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
1 <tool id="mass_spectrometry_imaging_combine" name="MSI combine" version="1.10.0.3">
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
2 <description>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
3 combine several mass spectrometry imaging datasets into one
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
4 </description>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
5 <requirements>
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
6 <requirement type="package" version="1.10.0">bioconductor-cardinal</requirement>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
7 <requirement type="package" version="2.2.1">r-ggplot2</requirement>
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
8 </requirements>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
9 <command detect_errors="exit_code">
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
10 <![CDATA[
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
11 #for $i, $infile in enumerate($infiles):
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
12 #if $infile.ext == 'imzml'
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
13 ln -s '${infile.extra_files_path}/imzml' infile_${i}.imzML &&
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
14 ln -s '${infile.extra_files_path}/ibd' infile_${i}.ibd &&
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
15 #elif $infile.ext == 'analyze75'
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
16 ln -s '${infile.extra_files_path}/hdr' infile_${i}.hdr &&
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
17 ln -s '${infile.extra_files_path}/img' infile_${i}.img &&
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
18 ln -s '${infile.extra_files_path}/t2m' infile_${i}.t2m &&
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
19 #else
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
20 ln -s '$infile' infile_${i}.RData &&
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
21 #end if
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
22 #end for
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
23 cat '${msi_combine}' &&
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
24 Rscript '${msi_combine}'
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
25
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
26 ]]>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
27 </command>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
28 <configfiles>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
29 <configfile name="msi_combine"><![CDATA[
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
30
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
31 #import re
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
32
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
33 ################ load libraries and some preparations #################
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
34
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
35 library(Cardinal)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
36 library(ggplot2)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
37
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
38 ## read tabular file for xy_shift option
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
39
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
40 #if str( $combine_conditional.combine_method ) == 'xy_shifts':
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
41 input_list = read.delim("$combine_conditional.coordinates_file", header = FALSE,
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
42 stringsAsFactors = FALSE)
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
43 #end if
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
44
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
45 ## load RData and store with new variable name
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
46
2
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
47 loadRData <- function(fileName){
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
48 #loads an RData file, and returns it
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
49 load(fileName)
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
50 get(ls()[ls() != "fileName"])
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
51 }
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
52
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
53 ## preparations for reading files one by one with for loop
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
54
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
55 pixel_vector = numeric()
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
56 x_shifts = 0
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
57 y_shifts = 0
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
58 max_y = numeric()
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
59 valid_dataset = logical()
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
60 #set $msidata = []
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
61 #set $pixelcoords = []
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
62 #set $num_infiles = len($infiles)
2
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
63 all_files = $num_infiles
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
64
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
65
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
66 ############## reading files and changing pixel coordinates ###################
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
67
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
68 #for $i, $infile in enumerate($infiles):
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
69
5
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
70 #if $infile.ext == 'imzml'
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
71 #if str($processed_cond.processed_file) == "processed":
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
72 msidata_$i <- readImzML('infile_${i}', mass.accuracy=$processed_cond.accuracy, units.accuracy = "$processed_cond.units")
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
73 #else
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
74 msidata <- readImzML('infile')
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
75 #end if
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
76 #elif $infile.ext == 'analyze75'
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
77 msidata_$i <- readAnalyze('infile_${i}')
5
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
78 #else
2
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
79 msidata_$i = loadRData('infile_${i}.RData')
5
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
80 #end if
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
81
2
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
82
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
83 sampleNames(msidata_$i) = "msidata" ## same name necessary to combine data in one single coordinate system
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
84
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
85 ################### preparation xy shifts ##########################
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
86
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
87 #if str( $combine_conditional.combine_method ) == 'xy_shifts':
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
88
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
89 coord(msidata_$i)\$x = coord(msidata_$i)\$x + input_list[$i+1,$combine_conditional.column_x] ## shifts x coordinates according to tabular file
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
90 coord(msidata_$i)\$y = coord(msidata_$i)\$y + input_list[$i+1,$combine_conditional.column_y] ## shifts y coordinates according to tabular file
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
91 pixel_vector = append(pixel_vector, rep(paste($i+1, input_list[$i+1,$combine_conditional.column_names], sep="_"),times=ncol(msidata_$i))) ## stores file name for each pixel
5
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
92 msidata_$i\$combined_sample = rep(paste($i+1, input_list[$i+1,$combine_conditional.column_names], sep="_"),times=ncol(msidata_$i))
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
93 pixelcoords_$i = cbind(coord(msidata_$i)[,1:2], rep($i+1,ncol(msidata_$i)))
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
94 #silent $pixelcoords.append('pixelcoords_'+str($i))
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
95 colnames(pixelcoords_$i)[3] = "file_number"
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
96
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
97 ################### preparation automatic combination ##########################
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
98
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
99 #elif str( $combine_conditional.combine_method ) == 'automatic_combine':
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
100 names_vector = character()
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
101 #set escaped_element_identifier = re.sub('[^\w\-\s\[/]]', '_', str($infile.element_identifier)) ## use name of inputfile from Galaxy
5
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
102 if (sum(spectra(msidata_$i)[],na.rm=TRUE)>0) ## use only valid files
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
103 {
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
104 if (is.null(levels(msidata_$i\$combined_sample))) ### if the file was not combined before use input file name, otherwise keep combined_sample name which was assigned before
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
105 {
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
106 names_vector = append(names_vector, rep(paste($i+1, "$escaped_element_identifier", sep="_"),ncol(msidata_$i)))
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
107 msidata_$i\$combined_sample = as.factor(names_vector)
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
108 }
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
109 }
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
110
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
111 ## Number of input files define grid which is row-wise filled with files
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
112
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
113 coord(msidata_$i)\$x = coord(msidata_$i)\$x - (min(coord(msidata_$i)\$x-1)) + x_shifts
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
114 coord(msidata_$i)\$y = coord(msidata_$i)\$y - (min(coord(msidata_$i)\$y-1)) + y_shifts
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
115 x_shifts = max(coord(msidata_$i)\$x) + 5
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
116 max_y = append(max_y, max(coord(msidata_$i)\$y))
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
117 all_files = $num_infiles
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
118 new_row = ($i+1)/ceiling(sqrt(all_files))
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
119 new_row%%1==0
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
120 if (new_row%%1==0)
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
121 {x_shifts = 0 ### when row is filled: x values start again at zero
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
122 y_shifts = max(max_y) + 5 ### when row is filled: y value increases to start a new row
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
123 max_y = numeric()}
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
124
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
125 #end if
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
126
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
127 ## store files to combine them later and for each file check if it is valid
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
128
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
129 #silent $msidata.append('msidata_'+str($i))
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
130 valid_dataset = append(valid_dataset,
5
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
131 (ncol(msidata_$i)>0 & nrow(msidata_$i)>0 & sum(spectra(msidata_$i)[], na.rm=TRUE)>0))
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
132
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
133 #end for
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
134
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
135
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
136 ###################### automatic combination ###################################
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
137 ################################################################################
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
138
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
139 #if str( $combine_conditional.combine_method ) == 'automatic_combine':
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
140 print("automatic_combine")
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
141
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
142 ## combine only valid datasets
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
143
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
144 valid_data = list(#echo ','.join($msidata)#)[valid_dataset]
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
145 msidata_combined = do.call(combine, valid_data)
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
146 print("Valid datasets in order of input bottom to top:")
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
147 print(valid_dataset)
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
148
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
149 ## create dataframe with x,y,sample_name and show all pixels in PDF as QC
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
150
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
151 pdf("Combined_qc.pdf", width=15, height=15)
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
152 position_df = cbind(coord(msidata_combined)[,1:2], msidata_combined\$combined_sample)
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
153 colnames(position_df)[3] = "sample_name"
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
154 combine_plot = ggplot(position_df, aes(x=x, y=y, fill=sample_name))+
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
155 geom_tile() +
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
156 coord_fixed()+
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
157 ggtitle("Spatial orientation of combined data")+
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
158 theme_bw()+
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
159 theme(text=element_text(family="ArialMT", face="bold", size=15))+
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
160 theme(legend.position="bottom",legend.direction="vertical")+
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
161 guides(fill=guide_legend(ncol=4,byrow=TRUE))
5
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
162 coord_labels = aggregate(cbind(x,y)~sample_name, data=position_df, mean, na.rm=TRUE, na.action="na.pass")
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
163 coord_labels\$file_number = gsub( "_.*$", "", coord_labels\$sample_name)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
164 for(file_count in 1:nrow(coord_labels))
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
165 {combine_plot = combine_plot + annotate("text",x=coord_labels[file_count,"x"],
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
166 y=coord_labels[file_count,"y"],label=toString(coord_labels[file_count,4]))}
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
167 print(combine_plot)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
168 dev.off()
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
169
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
170 ## save as (.RData)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
171
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
172 msidata = msidata_combined
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
173 save(msidata, file="$msidata_combined")
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
174
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
175
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
176 ################################## xy shifts ###################################
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
177 ################################################################################
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
178
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
179 #elif str( $combine_conditional.combine_method ) == 'xy_shifts':
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
180 print("xy_shifts")
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
181
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
182 #if str($combine_conditional.combination_true) == "yes_combi":
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
183 print("combination with xy shifts")
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
184
5
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
185 ## find duplicated coordinates
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
186 all_coordinates = do.call(rbind, list(#echo ','.join($pixelcoords)#))
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
187 duplicated_coordinates= duplicated(all_coordinates[,1:2])| duplicated(all_coordinates[,1:2], fromLast=TRUE)
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
188 print(paste0("Number of removed duplicated coordinates: ", sum(duplicated_coordinates)/2))
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
189 unique_coordinates = all_coordinates[!duplicated_coordinates,]
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
190
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
191 ## remove duplicated coordinates
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
192 datasetlist = list()
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
193 count = 1
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
194 for (usable_dataset in list(#echo ','.join($msidata)#)){
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
195 pixelsofinterest = pixels(usable_dataset)[names(pixels(usable_dataset)) %in% rownames(unique_coordinates)]
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
196 filtered_dataset = usable_dataset[,pixelsofinterest]
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
197 if (ncol(filtered_dataset) > 0 ){
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
198 datasetlist[[count]] = filtered_dataset}
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
199 count = count +1}
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
200
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
201 msidata_combined = do.call(combine, datasetlist)
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
202
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
203 ## save as (.RData)
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
204
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
205 msidata = msidata_combined
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
206 save(msidata, file="$msidata_combined")
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
207
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
208 ## create x,y,sample_name dataframe for QC pdf
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
209
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
210 position_df = cbind(coord(msidata), msidata\$combined_sample)
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
211 colnames(position_df)[3] = "sample_name"
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
212
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
213 #else:
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
214 print("no combination, only testing xy shifts")
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
215
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
216 position_df = do.call(rbind, list(#echo ','.join($pixelcoords)#))
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
217 position_df\$sample_name = as.factor(pixel_vector)
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
218
5
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
219 print(paste0("Number of duplicated coordinates: ", sum(duplicated(position_df[,1:2]))))
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
220
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
221 #end if
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
222
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
223 ## create PDF to show all pixels in PDF as QC
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
224
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
225 pdf("Combined_qc.pdf", width=15, height=15)
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
226 combine_plot = ggplot(position_df, aes(x=x, y=y, fill=sample_name))+
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
227 geom_tile() +
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
228 coord_fixed()+
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
229 ggtitle("Spatial orientation of combined data")+
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
230 theme_bw()+
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
231 theme(text=element_text(family="ArialMT", face="bold", size=15))+
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
232 theme(legend.position="bottom",legend.direction="vertical")+
4
d05bd881af3d planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents: 3
diff changeset
233 guides(fill=guide_legend(ncol=5,byrow=TRUE))
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
234 coord_labels = aggregate(cbind(x,y)~sample_name, data=position_df, mean)
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
235 coord_labels\$file_number = gsub( "_.*$", "", coord_labels\$sample_name)
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
236 for(file_count in 1:nrow(coord_labels))
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
237 {combine_plot = combine_plot + annotate("text",x=coord_labels[file_count,"x"],
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
238 y=coord_labels[file_count,"y"],label=toString(coord_labels[file_count,4]))}
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
239 print(combine_plot)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
240 dev.off()
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
241
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
242 #end if
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
243
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
244 ####################### optional matrix output #################################
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
245
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
246 #if $output_matrix:
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
247
5
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
248 if (length(features(msidata))> 0 & length(pixels(msidata)) > 0){
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
249 spectramatrix = spectra(msidata)[]
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
250 spectramatrix = cbind(mz(msidata),spectramatrix)
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
251 newmatrix = rbind(c("mz | spectra", names(pixels(msidata))), spectramatrix)
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
252 write.table(newmatrix, file="$matrixasoutput", quote = FALSE, row.names = FALSE, col.names=FALSE, sep = "\t")
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
253 }else{
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
254 print("file has no features or pixels left")
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
255 }
5
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
256
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
257 #end if
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
258
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
259 ]]></configfile>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
260 </configfiles>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
261 <inputs>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
262 <param name="infiles" type="data" multiple="true" format="imzml,rdata,analyze75"
4
d05bd881af3d planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents: 3
diff changeset
263 label="MSI data as imzml, analyze7.5 or Cardinal MSImageSet saved as RData"
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
264 help="load imzml and ibd file by uploading composite datatype imzml"/>
5
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
265 <conditional name="processed_cond">
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
266 <param name="processed_file" type="select" label="Is the input file a processed imzML file ">
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
267 <option value="no_processed" selected="True">not a processed imzML</option>
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
268 <option value="processed">processed imzML</option>
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
269 </param>
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
270 <when value="no_processed"/>
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
271 <when value="processed">
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
272 <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"/>
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
273 <param name="units" display="radio" type="select" label="Unit of the mass accuracy" help="either m/z or ppm">
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
274 <option value="mz" >mz</option>
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
275 <option value="ppm" selected="True" >ppm</option>
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
276 </param>
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
277 </when>
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
278 </conditional>
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
279 <conditional name="combine_conditional">
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
280 <param name="combine_method" type="select" label="Select the way you want to combine multiple files" help="More detailed help can be found in the help section at the bottom">
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
281 <option value="automatic_combine" selected="True" >automatic combination</option>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
282 <option value="xy_shifts">xy shifts by hand</option>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
283 </param>
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
284 <when value="automatic_combine"/>
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
285 <when value="xy_shifts">
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
286 <param name="coordinates_file" type="data" format="tabular" label="datasetnames, X and y values to shift data before combining"
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
287 help="Tabular file with three columns: 1 for the filename, 1 for the x-coordinate shift and 1 for the y-coordinate shift"/>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
288 <param name="column_x" data_ref="coordinates_file" label="Column with values for shift in x direction" type="data_column"/>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
289 <param name="column_y" data_ref="coordinates_file" label="Column with values for shift in y direction" type="data_column"/>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
290 <param name="column_names" data_ref="coordinates_file" label="Column with dataset names" type="data_column"/>
5
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
291 <param name="combination_true" type="boolean" display="radio" truevalue="yes_combi" falsevalue="no_combi" label="Combine datasets" help = "If there are duplicated pixels they will be deleted. If it is not clear if there are duplicated pixels, select No to get an idea about the pixel overlap"/>
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
292 </when>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
293 </conditional>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
294 <param name="output_matrix" type="boolean" display="radio" label="Intensity matrix output"/>
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
295 </inputs>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
296 <outputs>
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
297 <data format="rdata" name="msidata_combined" label="MSI_data_combined"/>
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
298 <data format="pdf" name="combining_qc" from_work_dir="Combined_qc.pdf" label = "Combined_QC"/>
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
299 <data format="tabular" name="matrixasoutput" label="Combined_matrix">
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
300 <filter>output_matrix</filter>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
301 </data>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
302 </outputs>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
303 <tests>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
304 <test expect_num_outputs="3">
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
305 <param name="infiles" value="msidata_1.RData,msidata_2.RData,msidata_3.RData" ftype="rdata"/>
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
306 <param name="combine_method" value="xy_shifts"/>
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
307 <param name="coordinates_file" ftype="tabular" value="xy_coordinates.tabular"/>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
308 <param name="column_x" value="1"/>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
309 <param name="column_y" value="2"/>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
310 <param name="column_names" value="3"/>
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
311 <param name="combination_true" value="yes_combi"/>
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
312 <param name="output_matrix" value="True"/>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
313 <output name="matrixasoutput" file="123_combined_matrix.tabular"/>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
314 <output name="msidata_combined" file="123_combined.RData" compare="sim_size" />
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
315 <output name="combining_qc" file="123_combined_QC.pdf" compare="sim_size" delta="20000"/>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
316 </test>
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
317 <test expect_num_outputs="2">
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
318 <param name="infiles" value="msidata_1.RData,msidata_2.RData,msidata_3.RData" ftype="rdata"/>
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
319 <param name="combine_method" value="xy_shifts"/>
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
320 <param name="coordinates_file" ftype="tabular" value="xy_coordinates.tabular"/>
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
321 <param name="column_x" value="1"/>
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
322 <param name="column_y" value="2"/>
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
323 <param name="column_names" value="3"/>
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
324 <param name="combination_true" value="no_combi"/>
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
325 <output name="msidata_combined" file="123_no_combi.RData" compare="sim_size" />
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
326 <output name="combining_qc" file="123_no_combi_QC.pdf" compare="sim_size" delta="20000"/>
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
327 </test>
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
328 <test expect_num_outputs="3">
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
329 <param name="infiles" value="msidata_1.RData,msidata_2.RData" ftype="rdata"/>
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
330 <param name="combine_method" value="automatic_combine"/>
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
331 <param name="output_matrix" value="True"/>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
332 <output name="matrixasoutput" file="12_combined_matrix.tabular"/>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
333 <output name="msidata_combined" file="12_combined.RData" compare="sim_size" />
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
334 <output name="combining_qc" file="12_combined_QC.pdf" compare="sim_size" delta="20000"/>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
335 </test>
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
336 <test expect_num_outputs="2">
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
337 <param name="infiles" value="msidata_1.RData,123_combined.RData" ftype="rdata"/>
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
338 <param name="combine_method" value="automatic_combine"/>
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
339 <param name="output_matrix" value="False"/>
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
340 <output name="msidata_combined" file="112_auto_combined.RData" compare="sim_size" />
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
341 <output name="combining_qc" file="112_auto_combined_QC.pdf" compare="sim_size" delta="20000"/>
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
342 </test>
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
343 </tests>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
344 <help>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
345 <![CDATA[
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
346
2
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
347 Cardinal is an R package that implements statistical & computational tools for analyzing mass spectrometry imaging datasets. `More information on Cardinal <http://cardinalmsi.org//>`_
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
348
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
349 This tool uses the Cardinal combine function to combine several mass spectrometry imaging data.
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
350
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
351 Input data: 3 types of input data can be used:
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
352
2
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
353 - imzml file (upload imzml and ibd file via the "composite" function) `Introduction to the imzml format <https://ms-imaging.org/wp/imzml/>`_
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
354 - Analyze7.5 (upload hdr, img and t2m file via the "composite" function)
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
355 - Cardinal "MSImageSet" data (with variable name "msidata", saved as .RData)
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
356
2
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
357 Prerequisite:
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
358
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
359 - m/z values need to be the same across all datasets (before using this tool), this can be achieved with the filtering tool (use same m/z range) and the preprocessing tool (use same binning parameter)
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
360
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
361 Options:
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
362
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
363 - "automatic combination": files are automatically arranged in a grid, subfiles are named according to input file name
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
364 - "xy shifts by hand": 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). To test if the pixels are correctly shifted use "combine datasets: No".
5
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
365 Combine datasets: Yes - Combines all datasets and removes all duplicated pixels (same x and y coordinates).
2
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
366
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
367 Output:
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
368
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
369 - imzML file containing multiple subfiles
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
370 - pdf that shows the pixel positions of the combined files
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
371 - optional: intensity matrix as tabular file (intensities for m/z in rows and pixel in columns)
2
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
372
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
373
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
374 ]]>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
375 </help>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
376 <citations>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
377 <citation type="doi">10.1093/bioinformatics/btv146</citation>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
378 </citations>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
379 </tool>