annotate msi_combine.xml @ 7:19d8eee15959 draft

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:41:16 -0400
parents f4aafc565aa3
children c6564ddf0744
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
19d8eee15959 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
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
2 <description>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
3 combine several mass spectrometry imaging datasets into one
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
4 </description>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
5 <requirements>
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
6 <requirement type="package" version="1.10.0">bioconductor-cardinal</requirement>
7
19d8eee15959 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
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
8 </requirements>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
9 <command detect_errors="exit_code">
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
10 <![CDATA[
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
11 #for $i, $infile in enumerate($infiles):
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
12 #if $infile.ext == 'imzml'
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
13 ln -s '${infile.extra_files_path}/imzml' infile_${i}.imzML &&
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
14 ln -s '${infile.extra_files_path}/ibd' infile_${i}.ibd &&
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
15 #elif $infile.ext == 'analyze75'
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
16 ln -s '${infile.extra_files_path}/hdr' infile_${i}.hdr &&
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
17 ln -s '${infile.extra_files_path}/img' infile_${i}.img &&
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
18 ln -s '${infile.extra_files_path}/t2m' infile_${i}.t2m &&
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
19 #else
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
20 ln -s '$infile' infile_${i}.RData &&
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
21 #end if
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
22 #end for
6
f4aafc565aa3 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):
f4aafc565aa3 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 &&
f4aafc565aa3 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
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
26
0
9cbcf48bf60a 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}' &&
9cbcf48bf60a 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}'
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
29
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
30 ]]>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
31 </command>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
32 <configfiles>
9cbcf48bf60a 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
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
34
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
35 #import re
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
36
91bba2486773 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
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
38
1
f3f6c32ab690 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)
f3f6c32ab690 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)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
41
3
91bba2486773 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
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
43
1
f3f6c32ab690 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':
f3f6c32ab690 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
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
46 stringsAsFactors = FALSE)
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
47 #end if
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
48
3
91bba2486773 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
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
50
2
00b6c61f5054 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){
00b6c61f5054 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
00b6c61f5054 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)
00b6c61f5054 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"])
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
55 }
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
56
3
91bba2486773 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
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
58
0
9cbcf48bf60a 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
f3f6c32ab690 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
f3f6c32ab690 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
f3f6c32ab690 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
91bba2486773 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
9cbcf48bf60a 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
f3f6c32ab690 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 = []
f3f6c32ab690 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
00b6c61f5054 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
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
68
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
69
91bba2486773 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 ###################
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
71
0
9cbcf48bf60a 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):
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
73
6
f4aafc565aa3 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
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
75
f4aafc565aa3 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'
f4aafc565aa3 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":
f4aafc565aa3 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")
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
79 #else
f4aafc565aa3 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}')
f4aafc565aa3 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
f4aafc565aa3 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'
f4aafc565aa3 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
ff91e78b5c5c 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
f4aafc565aa3 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
ff91e78b5c5c 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
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
87
2
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
88
6
f4aafc565aa3 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
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
90
f4aafc565aa3 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
f4aafc565aa3 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,
f4aafc565aa3 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
19d8eee15959 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents: 6
diff changeset
94
19d8eee15959 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"){
19d8eee15959 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)
19d8eee15959 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)))
19d8eee15959 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])
19d8eee15959 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents: 6
diff changeset
99 }
19d8eee15959 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents: 6
diff changeset
100
6
f4aafc565aa3 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")
f4aafc565aa3 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))
f4aafc565aa3 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"
f4aafc565aa3 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
f4aafc565aa3 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){
f4aafc565aa3 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]}
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
107
f4aafc565aa3 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)
f4aafc565aa3 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))))
f4aafc565aa3 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
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
111
f4aafc565aa3 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
f4aafc565aa3 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]
f4aafc565aa3 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]
f4aafc565aa3 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]
f4aafc565aa3 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]
f4aafc565aa3 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]
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
118
f4aafc565aa3 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
f4aafc565aa3 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
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
121
91bba2486773 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
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
123
1
f3f6c32ab690 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
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
125
6
f4aafc565aa3 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
91bba2486773 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
91bba2486773 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
91bba2486773 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
ff91e78b5c5c 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
91bba2486773 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)))
91bba2486773 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))
91bba2486773 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"
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
134
91bba2486773 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 ##########################
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
136
1
f3f6c32ab690 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
91bba2486773 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()
91bba2486773 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
ff91e78b5c5c 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
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
141 {
7
19d8eee15959 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
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
143 {
91bba2486773 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)))
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
145 msidata_$i\$combined_sample = as.factor(names_vector)
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
146 }
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
147 }
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
148
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
149 ## Number of input files define grid which is row-wise filled with files
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
150
1
f3f6c32ab690 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
f3f6c32ab690 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
91bba2486773 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
f3f6c32ab690 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))
f3f6c32ab690 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
f3f6c32ab690 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))
f3f6c32ab690 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
f3f6c32ab690 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
91bba2486773 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
91bba2486773 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
f3f6c32ab690 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()}
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
162
0
9cbcf48bf60a 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
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
164
91bba2486773 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
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
166
0
9cbcf48bf60a 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
91bba2486773 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
ff91e78b5c5c 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
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
170
0
9cbcf48bf60a 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
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
172
6
f4aafc565aa3 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)
f4aafc565aa3 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
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
175
1
f3f6c32ab690 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 ###################################
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
177 ################################################################################
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
178
1
f3f6c32ab690 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':
f3f6c32ab690 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
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
181
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
182 ## combine only valid datasets
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
183
3
91bba2486773 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]
91bba2486773 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)
91bba2486773 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:")
91bba2486773 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)
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
188
91bba2486773 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
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
190
91bba2486773 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)
91bba2486773 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
f3f6c32ab690 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"
f3f6c32ab690 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))+
f3f6c32ab690 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() +
f3f6c32ab690 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
f4aafc565aa3 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
f3f6c32ab690 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()+
f3f6c32ab690 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))+
f3f6c32ab690 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")+
f3f6c32ab690 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
ff91e78b5c5c 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
f3f6c32ab690 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)
f3f6c32ab690 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
91bba2486773 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"],
91bba2486773 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
f3f6c32ab690 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)
f3f6c32ab690 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()
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
209
f3f6c32ab690 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)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
211
f3f6c32ab690 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
f3f6c32ab690 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")
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
214
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
215
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
216 ################################## xy shifts ###################################
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
217 ################################################################################
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
218
91bba2486773 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':
91bba2486773 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")
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
221
6
f4aafc565aa3 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
f4aafc565aa3 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)#))
f4aafc565aa3 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
ff91e78b5c5c 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
f4aafc565aa3 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
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
227
6
f4aafc565aa3 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
f4aafc565aa3 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()
f4aafc565aa3 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
f4aafc565aa3 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)#)){
f4aafc565aa3 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)]
f4aafc565aa3 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]
f4aafc565aa3 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 ){
f4aafc565aa3 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}
f4aafc565aa3 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}
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
237
f4aafc565aa3 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
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
239
6
f4aafc565aa3 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)
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
241
f4aafc565aa3 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
f4aafc565aa3 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
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
244
6
f4aafc565aa3 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
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
246
f4aafc565aa3 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)
f4aafc565aa3 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"
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
249
f4aafc565aa3 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
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
251
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
252
6
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
253 ################################## outputs ####################################
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
254 ################################################################################
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
255
6
f4aafc565aa3 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
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
257
6
f4aafc565aa3 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
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
259
6
f4aafc565aa3 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
f4aafc565aa3 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))+
f4aafc565aa3 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() +
f4aafc565aa3 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()+
f4aafc565aa3 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")+
f4aafc565aa3 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()+
f4aafc565aa3 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))+
f4aafc565aa3 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")+
f4aafc565aa3 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))
f4aafc565aa3 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)
f4aafc565aa3 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)
f4aafc565aa3 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))
f4aafc565aa3 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"],
f4aafc565aa3 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]))}
f4aafc565aa3 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
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
275
6
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
276
f4aafc565aa3 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
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
278
f4aafc565aa3 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
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
280
6
f4aafc565aa3 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)
f4aafc565aa3 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
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
283
6
f4aafc565aa3 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)){
f4aafc565aa3 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
f3f6c32ab690 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() +
f3f6c32ab690 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
f4aafc565aa3 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
f3f6c32ab690 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
91bba2486773 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))+
91bba2486773 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
f4aafc565aa3 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]))
f4aafc565aa3 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)}
f4aafc565aa3 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
f4aafc565aa3 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]
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
296
f4aafc565aa3 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
f4aafc565aa3 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)
f4aafc565aa3 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"
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
300
f4aafc565aa3 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)){
f4aafc565aa3 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))+
f4aafc565aa3 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() +
f4aafc565aa3 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()+
f4aafc565aa3 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]))+
f4aafc565aa3 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()+
f4aafc565aa3 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))+
f4aafc565aa3 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")+
f4aafc565aa3 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]))
f4aafc565aa3 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)}
f4aafc565aa3 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
f4aafc565aa3 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]
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
313
f4aafc565aa3 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
f4aafc565aa3 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)
f4aafc565aa3 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"
f4aafc565aa3 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)){
f4aafc565aa3 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))+
f4aafc565aa3 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() +
f4aafc565aa3 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()+
f4aafc565aa3 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]))+
f4aafc565aa3 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()+
f4aafc565aa3 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))+
f4aafc565aa3 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")+
f4aafc565aa3 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]))
f4aafc565aa3 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)}
f4aafc565aa3 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
f4aafc565aa3 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]
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
329
f4aafc565aa3 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
f4aafc565aa3 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)
f4aafc565aa3 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"
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
333
f4aafc565aa3 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)){
f4aafc565aa3 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))+
f4aafc565aa3 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() +
f4aafc565aa3 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()+
f4aafc565aa3 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]))+
f4aafc565aa3 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()+
f4aafc565aa3 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))+
f4aafc565aa3 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")+
f4aafc565aa3 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]))
f4aafc565aa3 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)}
f4aafc565aa3 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
f4aafc565aa3 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]
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
346
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
347 ## plot5
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
348
f4aafc565aa3 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)
f4aafc565aa3 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"
f4aafc565aa3 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)){
f4aafc565aa3 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))+
f4aafc565aa3 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() +
f4aafc565aa3 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()+
f4aafc565aa3 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]))+
f4aafc565aa3 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()+
f4aafc565aa3 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))+
f4aafc565aa3 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")+
f4aafc565aa3 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]))
f4aafc565aa3 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)}
f4aafc565aa3 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
f4aafc565aa3 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]
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
363
1
f3f6c32ab690 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()
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
365
6
f4aafc565aa3 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
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
367
5
ff91e78b5c5c 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
f4aafc565aa3 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)
f4aafc565aa3 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)
f4aafc565aa3 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
f3f6c32ab690 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
f4aafc565aa3 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
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
374 }
5
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
375
6
f4aafc565aa3 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 #################################
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
377
f4aafc565aa3 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:
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
379
f4aafc565aa3 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){
f4aafc565aa3 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)[]
f4aafc565aa3 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)
f4aafc565aa3 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)
f4aafc565aa3 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")
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
385 }else{
f4aafc565aa3 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")
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
387 }
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
388
f4aafc565aa3 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
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
390
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
391 ]]></configfile>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
392 </configfiles>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
393 <inputs>
9cbcf48bf60a 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
d05bd881af3d 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
9cbcf48bf60a 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
ff91e78b5c5c 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">
ff91e78b5c5c 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 ">
ff91e78b5c5c 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>
ff91e78b5c5c 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>
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
401 </param>
ff91e78b5c5c 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"/>
ff91e78b5c5c 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">
ff91e78b5c5c 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"/>
ff91e78b5c5c 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">
ff91e78b5c5c 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>
ff91e78b5c5c 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>
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
408 </param>
ff91e78b5c5c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 4
diff changeset
409 </when>
ff91e78b5c5c 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
f4aafc565aa3 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
19d8eee15959 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"
19d8eee15959 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
f3f6c32ab690 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">
f3f6c32ab690 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">
f3f6c32ab690 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
f4aafc565aa3 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
f3f6c32ab690 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
91bba2486773 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
f3f6c32ab690 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
f4aafc565aa3 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"
f4aafc565aa3 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
f3f6c32ab690 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"/>
f3f6c32ab690 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"/>
f3f6c32ab690 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"/>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
426 </when>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
427 </conditional>
f3f6c32ab690 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
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
429 </inputs>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
430 <outputs>
3
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
431 <data format="rdata" name="msidata_combined" label="MSI_data_combined"/>
91bba2486773 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 2
diff changeset
432 <data format="pdf" name="combining_qc" from_work_dir="Combined_qc.pdf" label = "Combined_QC"/>
6
f4aafc565aa3 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
91bba2486773 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
9cbcf48bf60a 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>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
436 </data>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
437 </outputs>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
438 <tests>
6
f4aafc565aa3 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
9cbcf48bf60a 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
f4aafc565aa3 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
f3f6c32ab690 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
9cbcf48bf60a 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"/>
9cbcf48bf60a 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"/>
9cbcf48bf60a 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"/>
9cbcf48bf60a 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"/>
9cbcf48bf60a 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"/>
9cbcf48bf60a 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
f4aafc565aa3 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
9cbcf48bf60a 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
19d8eee15959 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
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
452 </test>
6
f4aafc565aa3 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
9cbcf48bf60a 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
f4aafc565aa3 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
91bba2486773 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
9cbcf48bf60a 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"/>
9cbcf48bf60a 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
f4aafc565aa3 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
9cbcf48bf60a 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
19d8eee15959 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
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
462 </test>
6
f4aafc565aa3 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
91bba2486773 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
f4aafc565aa3 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
f3f6c32ab690 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
91bba2486773 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
f4aafc565aa3 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
91bba2486773 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
19d8eee15959 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
f3f6c32ab690 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
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
472 </tests>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
473 <help>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
474 <![CDATA[
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
475
2
00b6c61f5054 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
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
477
3
91bba2486773 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
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
479
9cbcf48bf60a 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:
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
481
2
00b6c61f5054 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
9cbcf48bf60a 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)
9cbcf48bf60a 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)
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
485
6
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
486
f4aafc565aa3 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
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
488
6
f4aafc565aa3 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)
f4aafc565aa3 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,...)
f4aafc565aa3 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
f4aafc565aa3 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
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
493
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
494 Options:
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
495
6
f4aafc565aa3 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
f4aafc565aa3 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).
f4aafc565aa3 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents: 5
diff changeset
498
2
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
499
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
500 Output:
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
501
6
f4aafc565aa3 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
f4aafc565aa3 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
f4aafc565aa3 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
91bba2486773 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
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
506
00b6c61f5054 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 1
diff changeset
507
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
508 ]]>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
509 </help>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
510 <citations>
9cbcf48bf60a 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>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
512 </citations>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
513 </tool>