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