annotate msi_combine.xml @ 7:72914d913505 draft default tip

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
author galaxyp
date Wed, 22 Aug 2018 13:31:44 -0400
parents 40f177062ba9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
72914d913505 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents: 6
diff changeset
1 <tool id="mass_spectrometry_imaging_combine" name="MSI combine" version="1.10.0.5">
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
2 <description>
50ba517b7caa 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
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
4 </description>
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
5 <requirements>
1
2ff16a066571 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>
7
72914d913505 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents: 6
diff changeset
7 <requirement type="package" version="3.0.0">r-ggplot2</requirement>
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
8 </requirements>
50ba517b7caa 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">
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
10 <![CDATA[
50ba517b7caa 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):
50ba517b7caa 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
f07413fa9b58 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 &&
f07413fa9b58 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
50ba517b7caa 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
f07413fa9b58 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 &&
f07413fa9b58 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 &&
f07413fa9b58 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
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
19 #else
50ba517b7caa 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 &&
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
21 #end if
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
22 #end for
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
23 #for $i, $annotation_file in enumerate($annotation_files):
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
24 ln -s '$annotation_file' annotation_file_${i}.tabular &&
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
25 #end for
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
26
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
27 cat '${msi_combine}' &&
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
28 Rscript '${msi_combine}'
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
29
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
30 ]]>
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
31 </command>
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
32 <configfiles>
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
33 <configfile name="msi_combine"><![CDATA[
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
34
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
35 #import re
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
36
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
37 ################ load libraries and some preparations #################
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
38
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
39 library(Cardinal)
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
40 library(ggplot2)
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
41
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
42 ## read tabular file for xy_shift option
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
43
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
44 #if str( $combine_conditional.combine_method ) == 'xy_shifts':
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
45 input_list = read.delim("$combine_conditional.coordinates_file", header = FALSE,
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
46 stringsAsFactors = FALSE)
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
47 #end if
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
48
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
49 ## load RData and store with new variable name
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
50
2
4f46f06e861b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
51 loadRData <- function(fileName){
4f46f06e861b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
52 #loads an RData file, and returns it
4f46f06e861b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
53 load(fileName)
4f46f06e861b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
54 get(ls()[ls() != "fileName"])
4f46f06e861b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
55 }
4f46f06e861b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
56
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
57 ## preparations for reading files one by one with for loop
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
58
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
59 pixel_vector = numeric()
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
60 x_shifts = 0
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
61 y_shifts = 0
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
62 max_y = numeric()
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
63 valid_dataset = logical()
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
64 #set $msidata = []
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
65 #set $pixelcoords = []
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
66 #set $num_infiles = len($infiles)
2
4f46f06e861b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
67 all_files = $num_infiles
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
68
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
69
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
70 ############## reading files and changing pixel coordinates ###################
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
71
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
72 #for $i, $infile in enumerate($infiles):
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
73
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
74 ## read MSI data
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
75
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
76 #if $infile.ext == 'imzml'
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
77 #if str($processed_cond.processed_file) == "processed":
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
78 msidata_$i <- readImzML('infile_${i}', mass.accuracy=$processed_cond.accuracy, units.accuracy = "$processed_cond.units")
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
79 #else
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
80 msidata_$i <- readImzML('infile_${i}')
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
81 #end if
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
82 #elif $infile.ext == 'analyze75'
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
83 msidata_$i <- readAnalyze('infile_${i}')
5
49c4a97e7e3a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
84 #else
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
85 msidata_$i = loadRData('infile_${i}.RData')
5
49c4a97e7e3a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
86 #end if
49c4a97e7e3a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
87
2
4f46f06e861b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
88
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
89 ## read annotation data, up to 5 annotations can be used for now
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
90
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
91 ## read annotation tabular, set first two columns as x and y, merge with coordinates dataframe and order according to pixelorder in msidata
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
92 input_annotation = read.delim("annotation_file_${i}.tabular", header = TRUE,
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
93 stringsAsFactors = FALSE)
7
72914d913505 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents: 6
diff changeset
94
72914d913505 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents: 6
diff changeset
95 if (class(input_annotation[,1]) == "character"){
72914d913505 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents: 6
diff changeset
96 annotation_coordinates = matrix(unlist(strsplit(as.character(input_annotation[,1]), "\\,")), ncol=2, byrow=TRUE)
72914d913505 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents: 6
diff changeset
97 annotation_coordinates2 = cbind(as.numeric(substring(annotation_coordinates[,1], 5, last = 1000000L)), as.numeric(substring(annotation_coordinates[,2], 5, last = 1000000L)))
72914d913505 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents: 6
diff changeset
98 input_annotation = cbind(annotation_coordinates2, input_annotation[,-1])
72914d913505 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents: 6
diff changeset
99 }
72914d913505 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents: 6
diff changeset
100
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
101 colnames(input_annotation)[1:2] = c("x", "y")
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
102 msidata_coordinates = cbind(coord(msidata_$i)[,1:2], 1:ncol(msidata_$i))
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
103 colnames(msidata_coordinates)[3] = "pixel_index"
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
104 ## only first 5 annotation columns are kept
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
105 if (ncol(input_annotation) > 7){
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
106 input_annotation = input_annotation[,1:7]}
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
107
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
108 annotation_df = merge(msidata_coordinates, input_annotation, by=c("x", "y"), all.x=TRUE)
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
109 annotation_df_8 = cbind(annotation_df, data.frame(matrix(NA,ncol=8-ncol(annotation_df), nrow=ncol(msidata_$i))))
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
110 annotation_df_8_sorted = annotation_df_8[order(annotation_df_8\$pixel_index),]## orders pixel according to msidata
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
111
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
112 ## each annotation column is assigned to the pixel in the pData slot of the MSIdata
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
113 msidata_$i\$column1 = annotation_df_8_sorted[,4]
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
114 msidata_$i\$column2 = annotation_df_8_sorted[,5]
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
115 msidata_$i\$column3 = annotation_df_8_sorted[,6]
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
116 msidata_$i\$column4 = annotation_df_8_sorted[,7]
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
117 msidata_$i\$column5 = annotation_df_8_sorted[,8]
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
118
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
119 ## same name for MSI data files necessary to combine data in one single coordinate system
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
120 sampleNames(msidata_$i) = "msidata"
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
121
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
122 ################### preparation xy shifts ##########################
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
123
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
124 #if str( $combine_conditional.combine_method ) == 'xy_shifts':
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
125
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
126 ## shift coordinates according to input tabular file and store file names
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
127 coord(msidata_$i)\$x = coord(msidata_$i)\$x + input_list[$i+1,$combine_conditional.column_x] ## shifts x coordinates according to tabular file
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
128 coord(msidata_$i)\$y = coord(msidata_$i)\$y + input_list[$i+1,$combine_conditional.column_y] ## shifts y coordinates according to tabular file
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
129 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
49c4a97e7e3a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
130 msidata_$i\$combined_sample = rep(paste($i+1, input_list[$i+1,$combine_conditional.column_names], sep="_"),times=ncol(msidata_$i))
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
131 pixelcoords_$i = cbind(coord(msidata_$i)[,1:2], rep($i+1,ncol(msidata_$i)))
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
132 #silent $pixelcoords.append('pixelcoords_'+str($i))
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
133 colnames(pixelcoords_$i)[3] = "file_number"
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
134
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
135 ################### preparation automatic combination ##########################
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
136
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
137 #elif str( $combine_conditional.combine_method ) == 'automatic_combine':
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
138 names_vector = character()
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
139 #set escaped_element_identifier = re.sub('[^\w\-\s\[/]]', '_', str($infile.element_identifier)) ## use name of inputfile from Galaxy
5
49c4a97e7e3a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
140 if (sum(spectra(msidata_$i)[],na.rm=TRUE)>0) ## use only valid files
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
141 {
7
72914d913505 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents: 6
diff changeset
142 if (is.null(levels(msidata_$i\$combined_sample)))
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
143 {
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
144 names_vector = append(names_vector, rep(paste($i+1, "$escaped_element_identifier", sep="_"),ncol(msidata_$i)))
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
145 msidata_$i\$combined_sample = as.factor(names_vector)
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
146 }
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
147 }
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
148
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
149 ## Number of input files define grid which is row-wise filled with files
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
150
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
151 coord(msidata_$i)\$x = coord(msidata_$i)\$x - (min(coord(msidata_$i)\$x-1)) + x_shifts
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
152 coord(msidata_$i)\$y = coord(msidata_$i)\$y - (min(coord(msidata_$i)\$y-1)) + y_shifts
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
153 x_shifts = max(coord(msidata_$i)\$x) + 5
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
154 max_y = append(max_y, max(coord(msidata_$i)\$y))
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
155 all_files = $num_infiles
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
156 new_row = ($i+1)/ceiling(sqrt(all_files))
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
157 new_row%%1==0
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
158 if (new_row%%1==0)
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
159 {x_shifts = 0 ### when row is filled: x values start again at zero
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
160 y_shifts = max(max_y) + 5 ### when row is filled: y value increases to start a new row
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
161 max_y = numeric()}
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
162
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
163 #end if
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
164
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
165 ## store files to combine them later and for each file check if it is valid
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
166
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
167 #silent $msidata.append('msidata_'+str($i))
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
168 valid_dataset = append(valid_dataset,
5
49c4a97e7e3a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
169 (ncol(msidata_$i)>0 & nrow(msidata_$i)>0 & sum(spectra(msidata_$i)[], na.rm=TRUE)>0))
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
170
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
171 #end for
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
172
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
173 ## extract columnnames from (last) annotation tabular (for QC plot names)
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
174 annotation_colnames = colnames(input_annotation)[-c(1,2)]
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
175
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
176 ###################### automatic combination ###################################
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
177 ################################################################################
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
178
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
179 #if str( $combine_conditional.combine_method ) == 'automatic_combine':
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
180 print("automatic_combine")
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
181
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
182 ## combine only valid datasets
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
183
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
184 valid_data = list(#echo ','.join($msidata)#)[valid_dataset]
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
185 msidata_combined = do.call(combine, valid_data)
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
186 print("Valid datasets in order of input bottom to top:")
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
187 print(valid_dataset)
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
188
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
189 ## create dataframe with x,y,sample_name and show all pixels in PDF as QC
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
190
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
191 pdf("Combined_qc.pdf", width=15, height=15)
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
192 position_df = cbind(coord(msidata_combined)[,1:2], msidata_combined\$combined_sample)
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
193 colnames(position_df)[3] = "sample_name"
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
194 combine_plot = ggplot(position_df, aes(x=x, y=y, fill=sample_name))+
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
195 geom_tile() +
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
196 coord_fixed()+
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
197 ggtitle("Spatial orientation of combined data (sample names)")+
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
198 theme_bw()+
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
199 theme(text=element_text(family="ArialMT", face="bold", size=15))+
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
200 theme(legend.position="bottom",legend.direction="vertical")+
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
201 guides(fill=guide_legend(ncol=4,byrow=TRUE))
5
49c4a97e7e3a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
202 coord_labels = aggregate(cbind(x,y)~sample_name, data=position_df, mean, na.rm=TRUE, na.action="na.pass")
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
203 coord_labels\$file_number = gsub( "_.*$", "", coord_labels\$sample_name)
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
204 for(file_count in 1:nrow(coord_labels))
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
205 {combine_plot = combine_plot + annotate("text",x=coord_labels[file_count,"x"],
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
206 y=coord_labels[file_count,"y"],label=toString(coord_labels[file_count,4]))}
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
207 print(combine_plot)
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
208 dev.off()
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
209
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
210 ## save as (.RData)
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
211
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
212 msidata = msidata_combined
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
213 save(msidata, file="$msidata_combined")
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
214
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
215
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
216 ################################## xy shifts ###################################
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
217 ################################################################################
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
218
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
219 #elif str( $combine_conditional.combine_method ) == 'xy_shifts':
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
220 print("xy_shifts")
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
221
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
222 ## find duplicated coordinates
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
223 all_coordinates = do.call(rbind, list(#echo ','.join($pixelcoords)#))
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
224 duplicated_coordinates= duplicated(all_coordinates[,1:2])| duplicated(all_coordinates[,1:2], fromLast=TRUE)
5
49c4a97e7e3a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
225 print(paste0("Number of removed duplicated coordinates: ", sum(duplicated_coordinates)/2))
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
226 unique_coordinates = all_coordinates[!duplicated_coordinates,]
5
49c4a97e7e3a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
227
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
228 ## remove duplicated coordinates
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
229 datasetlist = list()
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
230 count = 1
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
231 for (usable_dataset in list(#echo ','.join($msidata)#)){
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
232 pixelsofinterest = pixels(usable_dataset)[names(pixels(usable_dataset)) %in% rownames(unique_coordinates)]
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
233 filtered_dataset = usable_dataset[,pixelsofinterest]
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
234 if (ncol(filtered_dataset) > 0 ){
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
235 datasetlist[[count]] = filtered_dataset}
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
236 count = count +1}
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
237
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
238 msidata_combined = do.call(combine, datasetlist)
5
49c4a97e7e3a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
239
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
240 ## save as (.RData)
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
241
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
242 msidata = msidata_combined
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
243 save(msidata, file="$msidata_combined")
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
244
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
245 ## create x,y,sample_name dataframe for QC pdf
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
246
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
247 position_df = cbind(coord(msidata), msidata\$combined_sample)
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
248 colnames(position_df)[3] = "sample_name"
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
249
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
250 #end if
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
251
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
252
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
253 ################################## outputs ####################################
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
254 ################################################################################
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
255
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
256 ########### QC with pixels and their annotations ################################
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
257
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
258 pdf("Combined_qc.pdf", width=15, height=15)
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
259
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
260 ## combined plot
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
261 combine_plot = ggplot(position_df, aes(x=x, y=y, fill=sample_name))+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
262 geom_tile() +
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
263 coord_fixed()+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
264 ggtitle("Spatial orientation of combined data")+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
265 theme_bw()+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
266 theme(text=element_text(family="ArialMT", face="bold", size=15))+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
267 theme(legend.position="bottom",legend.direction="vertical")+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
268 guides(fill=guide_legend(ncol=5,byrow=TRUE))
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
269 coord_labels = aggregate(cbind(x,y)~sample_name, data=position_df, mean)
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
270 coord_labels\$file_number = gsub( "_.*$", "", coord_labels\$sample_name)
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
271 for(file_count in 1:nrow(coord_labels))
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
272 {combine_plot = combine_plot + annotate("text",x=coord_labels[file_count,"x"],
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
273 y=coord_labels[file_count,"y"],label=toString(coord_labels[file_count,4]))}
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
274 print(combine_plot)
5
49c4a97e7e3a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
275
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
276
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
277 ## annotation plots
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
278
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
279 ## plot 1
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
280
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
281 column1_df = cbind(coord(msidata), msidata\$column1)
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
282 colnames(column1_df)[3] = "column1"
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
283
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
284 if (sum(is.na(column1_df[3])) < nrow(column1_df)){
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
285 column1_plot = ggplot(column1_df, aes(x=x, y=y, fill=column1))+
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
286 geom_tile() +
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
287 coord_fixed()+
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
288 ggtitle(paste0(annotation_colnames[1]))+
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
289 theme_bw()+
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
290 theme(text=element_text(family="ArialMT", face="bold", size=15))+
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
291 theme(legend.position="bottom",legend.direction="vertical")+
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
292 guides(fill=guide_legend(ncol=5,byrow=TRUE, title=annotation_colnames[1]))
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
293 print(column1_plot)}
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
294 ##rename columnname for output tabular file
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
295 colnames(column1_df)[3] = annotation_colnames[1]
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
296
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
297 ## plot 2
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
298 column2_df = cbind(coord(msidata), msidata\$column2)
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
299 colnames(column2_df)[3] = "column2"
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
300
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
301 if (sum(is.na(column2_df[3])) < nrow(column2_df)){
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
302 column2_plot = ggplot(column2_df, aes(x=x, y=y, fill=column2))+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
303 geom_tile() +
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
304 coord_fixed()+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
305 ggtitle(paste0(annotation_colnames[2]))+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
306 theme_bw()+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
307 theme(text=element_text(family="ArialMT", face="bold", size=15))+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
308 theme(legend.position="bottom",legend.direction="vertical")+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
309 guides(fill=guide_legend(ncol=5,byrow=TRUE, title=annotation_colnames[2]))
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
310 print(column2_plot)}
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
311 ##rename columnname for output tabular file
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
312 colnames(column2_df)[3] = annotation_colnames[2]
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
313
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
314 ## plot 3
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
315 column3_df = cbind(coord(msidata), msidata\$column3)
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
316 colnames(column3_df)[3] = "column3"
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
317 if (sum(is.na(column3_df[3])) < nrow(column3_df)){
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
318 column3_plot = ggplot(column3_df, aes(x=x, y=y, fill=column3))+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
319 geom_tile() +
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
320 coord_fixed()+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
321 ggtitle(paste0(annotation_colnames[3]))+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
322 theme_bw()+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
323 theme(text=element_text(family="ArialMT", face="bold", size=15))+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
324 theme(legend.position="bottom",legend.direction="vertical")+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
325 guides(fill=guide_legend(ncol=5,byrow=TRUE, title=annotation_colnames[3]))
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
326 print(column3_plot)}
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
327 ##rename columnname for output tabular file
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
328 colnames(column3_df)[3] = annotation_colnames[3]
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
329
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
330 ## plot 4
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
331 column4_df = cbind(coord(msidata), msidata\$column4)
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
332 colnames(column4_df)[3] = "column4"
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
333
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
334 if (sum(is.na(column4_df[3])) < nrow(column4_df)){
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
335 column4_plot = ggplot(column4_df, aes(x=x, y=y, fill=column4))+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
336 geom_tile() +
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
337 coord_fixed()+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
338 ggtitle(paste0(annotation_colnames[4]))+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
339 theme_bw()+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
340 theme(text=element_text(family="ArialMT", face="bold", size=15))+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
341 theme(legend.position="bottom",legend.direction="vertical")+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
342 guides(fill=guide_legend(ncol=5,byrow=TRUE, title=annotation_colnames[4]))
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
343 print(column4_plot)}
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
344 ##rename columnname for output tabular file
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
345 colnames(column4_df)[3] = annotation_colnames[4]
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
346
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
347 ## plot5
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
348
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
349 column5_df = cbind(coord(msidata), msidata\$column5)
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
350 colnames(column5_df)[3] = "column5"
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
351 if (sum(is.na(column5_df[3])) < nrow(column5_df)){
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
352 column5_plot = ggplot(column5_df, aes(x=x, y=y, fill=column5))+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
353 geom_tile() +
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
354 coord_fixed()+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
355 ggtitle(paste0(annotation_colnames[5]))+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
356 theme_bw()+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
357 theme(text=element_text(family="ArialMT", face="bold", size=15))+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
358 theme(legend.position="bottom",legend.direction="vertical")+
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
359 guides(fill=guide_legend(ncol=5,byrow=TRUE, title=annotation_colnames[5]))
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
360 print(column5_plot)}
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
361 ##rename columnname for output tabular file
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
362 colnames(column5_df)[3] = annotation_colnames[5]
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
363
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
364 dev.off()
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
365
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
366 ##################### annotation tabular output ################################
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
367
5
49c4a97e7e3a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
368 if (length(features(msidata))> 0 & length(pixels(msidata)) > 0){
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
369 annotation_df_list = list(position_df, column1_df, column2_df, column3_df, column4_df, column5_df)
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
370 combined_annotations = Reduce(function(...) merge(..., by=c("x", "y"), all=TRUE), annotation_df_list)
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
371 write.table(combined_annotations, file="$annotation_output", quote = FALSE, row.names = FALSE, col.names=TRUE, sep = "\t")
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
372 }else{
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
373 print("No annotation tabular output because file has no features or pixels left")
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
374 }
5
49c4a97e7e3a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
375
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
376 ####################### optional matrix output #################################
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
377
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
378 #if $output_matrix:
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
379
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
380 if (length(features(msidata))> 0 & length(pixels(msidata)) > 0){
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
381 spectramatrix = spectra(msidata)[]
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
382 spectramatrix = cbind(mz(msidata),spectramatrix)
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
383 newmatrix = rbind(c("mz | spectra", names(pixels(msidata))), spectramatrix)
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
384 write.table(newmatrix, file="$matrixasoutput", quote = FALSE, row.names = FALSE, col.names=FALSE, sep = "\t")
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
385 }else{
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
386 print("No intensity matrix output because file has no features or pixels left")
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
387 }
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
388
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
389 #end if
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
390
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
391 ]]></configfile>
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
392 </configfiles>
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
393 <inputs>
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
394 <param name="infiles" type="data" multiple="true" format="imzml,rdata,analyze75"
4
c1c0618fe430 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents: 3
diff changeset
395 label="MSI data as imzml, analyze7.5 or Cardinal MSImageSet saved as RData"
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
396 help="load imzml and ibd file by uploading composite datatype imzml"/>
5
49c4a97e7e3a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
397 <conditional name="processed_cond">
49c4a97e7e3a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
398 <param name="processed_file" type="select" label="Is the input file a processed imzML file ">
49c4a97e7e3a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
399 <option value="no_processed" selected="True">not a processed imzML</option>
49c4a97e7e3a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
400 <option value="processed">processed imzML</option>
49c4a97e7e3a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
401 </param>
49c4a97e7e3a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
402 <when value="no_processed"/>
49c4a97e7e3a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
403 <when value="processed">
49c4a97e7e3a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
404 <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"/>
49c4a97e7e3a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
405 <param name="units" display="radio" type="select" label="Unit of the mass accuracy" help="either m/z or ppm">
49c4a97e7e3a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
406 <option value="mz" >mz</option>
49c4a97e7e3a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
407 <option value="ppm" selected="True" >ppm</option>
49c4a97e7e3a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
408 </param>
49c4a97e7e3a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
409 </when>
49c4a97e7e3a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
410 </conditional>
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
411 <param name="annotation_files" type="data" multiple="true" format="tabular"
7
72914d913505 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents: 6
diff changeset
412 label="Pixel annotations as tabular files, same number and order of files as input files"
72914d913505 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents: 6
diff changeset
413 help="Coordinates in column 1 in format x = 1, y = 1 or first column x values, second column y values. Up to 5 columns with pixel annotations"/>
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
414 <conditional name="combine_conditional">
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
415 <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">
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
416 <option value="automatic_combine" selected="True" >automatic combination</option>
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
417 <option value="xy_shifts">shift xy coordinates with a tabular file</option>
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
418 </param>
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
419 <when value="automatic_combine"/>
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
420 <when value="xy_shifts">
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
421 <param name="coordinates_file" type="data" format="tabular" label="datasetnames, x and y values to shift pixel coordinates before combining"
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
422 help="Tabular file with three columns: 1 for the filename, 1 for the x-coordinate shift and 1 for the y-coordinate shift. Pixels with the same coordinates after shifting will be deleted."/>
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
423 <param name="column_x" data_ref="coordinates_file" label="Column with values for shift in x direction" type="data_column"/>
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
424 <param name="column_y" data_ref="coordinates_file" label="Column with values for shift in y direction" type="data_column"/>
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
425 <param name="column_names" data_ref="coordinates_file" label="Column with dataset names" type="data_column"/>
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
426 </when>
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
427 </conditional>
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
428 <param name="output_matrix" type="boolean" display="radio" label="Intensity matrix output"/>
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
429 </inputs>
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
430 <outputs>
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
431 <data format="rdata" name="msidata_combined" label="MSI_data_combined"/>
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
432 <data format="pdf" name="combining_qc" from_work_dir="Combined_qc.pdf" label = "Combined_QC"/>
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
433 <data format="tabular" name="annotation_output" label="Annotation_tabular"/>
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
434 <data format="tabular" name="matrixasoutput" label="Combined_matrix">
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
435 <filter>output_matrix</filter>
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
436 </data>
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
437 </outputs>
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
438 <tests>
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
439 <test expect_num_outputs="4">
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
440 <param name="infiles" value="msidata_1.RData,msidata_2.RData,msidata_3.RData" ftype="rdata"/>
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
441 <param name="annotation_files" value="annotations_file1.tabular,annotations_file2.tabular,annotations_file3.tabular" ftype="tabular"/>
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
442 <param name="combine_method" value="xy_shifts"/>
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
443 <param name="coordinates_file" ftype="tabular" value="xy_coordinates.tabular"/>
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
444 <param name="column_x" value="1"/>
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
445 <param name="column_y" value="2"/>
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
446 <param name="column_names" value="3"/>
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
447 <param name="output_matrix" value="True"/>
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
448 <output name="matrixasoutput" file="123_combined_matrix.tabular"/>
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
449 <output name="annotation_output" file="123_annotation_output.tabular"/>
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
450 <output name="msidata_combined" file="123_combined.RData" compare="sim_size" />
7
72914d913505 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents: 6
diff changeset
451 <output name="combining_qc" file="123_combined_QC.pdf" compare="sim_size" delta="2000"/>
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
452 </test>
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
453 <test expect_num_outputs="4">
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
454 <param name="infiles" value="msidata_1.RData,msidata_2.RData" ftype="rdata"/>
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
455 <param name="annotation_files" value="annotations_file1.tabular,annotations_file2.tabular" ftype="tabular"/>
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
456 <param name="combine_method" value="automatic_combine"/>
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
457 <param name="output_matrix" value="True"/>
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
458 <output name="matrixasoutput" file="12_combined_matrix.tabular"/>
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
459 <output name="annotation_output" file="12_annotation_output.tabular"/>
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
460 <output name="msidata_combined" file="12_combined.RData" compare="sim_size" />
7
72914d913505 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents: 6
diff changeset
461 <output name="combining_qc" file="12_combined_QC.pdf" compare="sim_size" delta="2000"/>
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
462 </test>
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
463 <test expect_num_outputs="3">
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
464 <param name="infiles" value="msidata_1.RData,123_combined.RData" ftype="rdata"/>
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
465 <param name="annotation_files" value="annotations_file1.tabular,123_annotation.tabular" ftype="tabular"/>
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
466 <param name="combine_method" value="automatic_combine"/>
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
467 <param name="output_matrix" value="False"/>
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
468 <output name="annotation_output" file="112_annotation_output.tabular"/>
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
469 <output name="msidata_combined" file="112_auto_combined.RData" compare="sim_size" />
7
72914d913505 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents: 6
diff changeset
470 <output name="combining_qc" file="112_auto_combined_QC.pdf" compare="sim_size" delta="2000"/>
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
471 </test>
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
472 </tests>
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
473 <help>
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
474 <![CDATA[
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
475
2
4f46f06e861b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
476 Cardinal is an R package that implements statistical & computational tools for analyzing mass spectrometry imaging datasets. `More information on Cardinal <http://cardinalmsi.org//>`_
1
2ff16a066571 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
477
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
478 This tool uses the Cardinal combine function to combine several mass spectrometry imaging data.
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
479
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
480 Input data: 3 types of input data can be used:
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
481
2
4f46f06e861b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
482 - imzml file (upload imzml and ibd file via the "composite" function) `Introduction to the imzml format <https://ms-imaging.org/wp/imzml/>`_
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
483 - Analyze7.5 (upload hdr, img and t2m file via the "composite" function)
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
484 - Cardinal "MSImageSet" data (with variable name "msidata", saved as .RData)
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
485
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
486
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
487 Input:
2
4f46f06e861b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
488
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
489 - MSI data files with same m/z values (to obtain same m/z values for different files: filtering tool same m/z range and preprocessing tool same binning width)
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
490 - Tabular files with pixel annotations need to have the x values in the first column, y values in the second column and then up to five annotations in the next columns. The order of the annotations in the columns must be the same for all files (x and y in column 1 and 2; annotation1 in column3, annotation2 in column4,...)
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
491 - The order and the number of MSI data files and annotation tabular files must be the same
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
492 - For xy shifts with tabular file: Tabular file with x and y coordinates shift and file name (see below)
2
4f46f06e861b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
493
4f46f06e861b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
494 Options:
4f46f06e861b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
495
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
496 - "automatic combination": files are automatically arranged in a grid (duplicated pixels are allowed), subfiles are named according to the input file name
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
497 - "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). The xy shift option combines all datasets and removes all duplicated pixels (same x and y coordinates).
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
498
2
4f46f06e861b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
499
4f46f06e861b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
500 Output:
4f46f06e861b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
501
6
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
502 - single imzML file
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
503 - pdf that shows the pixel positions and annotations of the combined files
40f177062ba9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
504 - Tabular file with pixel annotations (x,y,column with input file names, up to five annotation columns)
3
f07413fa9b58 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
505 - optional: intensity matrix as tabular file (intensities for m/z in rows and pixel in columns)
2
4f46f06e861b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
506
4f46f06e861b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
507
0
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
508 ]]>
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
509 </help>
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
510 <citations>
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
511 <citation type="doi">10.1093/bioinformatics/btv146</citation>
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
512 </citations>
50ba517b7caa planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
513 </tool>