annotate msi_combine.xml @ 1:f3f6c32ab690 draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
author galaxyp
date Tue, 08 May 2018 02:36:26 -0400
parents 9cbcf48bf60a
children 00b6c61f5054
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
1 <tool id="mass_spectrometry_imaging_combine" name="MSI combine" version="1.10.0.0">
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
2 <description>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
3 combine several mass spectrometry imaging datasets into one
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
4 </description>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
5 <requirements>
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
6 <requirement type="package" version="1.10.0">bioconductor-cardinal</requirement>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
7 <requirement type="package" version="2.2.1">r-ggplot2</requirement>
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
8 </requirements>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
9 <command detect_errors="exit_code">
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
10 <![CDATA[
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
11 #for $i, $infile in enumerate($infiles):
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
12 #if $infile.ext == 'imzml'
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
13 ln -s '${infile.extra_files_path}/imzml' infile.imzML &&
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
14 ln -s '${infile.extra_files_path}/ibd' infile.ibd &&
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
15 #elif $infile.ext == 'analyze75'
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
16 ln -s '${infile.extra_files_path}/hdr' infile.hdr &&
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
17 ln -s '${infile.extra_files_path}/img' infile.img &&
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
18 ln -s '${infile.extra_files_path}/t2m' infile.t2m &&
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
19 #else
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
20 ln -s '$infile' infile_${i}.RData &&
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
21 #end if
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
22 #end for
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
23 cat '${msi_combine}' &&
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
24 Rscript '${msi_combine}'
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
25
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
26 ]]>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
27 </command>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
28 <configfiles>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
29 <configfile name="msi_combine"><![CDATA[
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
30 #import re
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
31 ################ load libraries, read rename and combine files #################
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
32
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
33 library(Cardinal)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
34 library(ggplot2)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
35
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
36 #if str( $combine_conditional.combine_method ) == 'xy_shifts':
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
37 input_list = read.delim("$combine_conditional.coordinates_file", header = FALSE,
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
38 stringsAsFactors = FALSE)
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
39 #end if
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
40
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
41 pixel_vector = numeric()
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
42 names_vector = character()
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
43 x_shifts = 0
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
44 y_shifts = 0
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
45 max_y = numeric()
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
46
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
47 #set $msidata = []
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
48 #set $pixelcoords = []
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
49 #set $num_infiles = len($infiles)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
50
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
51 #for $i, $infile in enumerate($infiles):
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
52
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
53 #if $infile.ext == 'imzml'
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
54 msidata_$i <- readImzML('infile_${i}')
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
55 sampleNames(msidata_$i) = "msidata"
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
56 pixelcoords_$i = cbind(coord(msidata_$i)[,1:2], rep($i+1,ncol(msidata_$i)))
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
57 #elif $infile.ext == 'analyze75'
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
58 msidata_$i <- readAnalyze('infile_${i}')
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
59 sampleNames(msidata_$i) = "msidata"
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
60 pixelcoords_$i = cbind(coord(msidata_$i)[,1:2], rep($i+1,ncol(msidata_$i)))
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
61 #else
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
62 loadRData <- function(fileName){
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
63 #loads an RData file, and returns it
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
64 load(fileName)
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
65 get(ls()[ls() != "fileName"])
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
66 }
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
67 msidata_$i = loadRData('infile_${i}.RData')
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
68 sampleNames(msidata_$i) = "msidata"
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
69 pixelcoords_$i = cbind(coord(msidata_$i)[,1:2], rep($i+1,ncol(msidata_$i)))
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
70 #end if
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
71 colnames(pixelcoords_$i)[3] = "file_number"
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
72
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
73 #if str( $combine_conditional.combine_method ) == 'xy_shifts':
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
74 coord(msidata_$i)\$x = coord(msidata_$i)\$x + input_list[$i+1,$combine_conditional.column_x]
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
75 coord(msidata_$i)\$y = coord(msidata_$i)\$y + input_list[$i+1,$combine_conditional.column_y]
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
76 pixel_vector = append(pixel_vector, rep(input_list[$i+1,$combine_conditional.column_names],times=ncol(msidata_$i)))
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
77
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
78 #elif str( $combine_conditional.combine_method ) == 'automatic_combine':
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
79 #set escaped_element_identifier = re.sub('[^\w\-\s\[/]]', '_', str($infile.element_identifier))
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
80 names_vector = append(names_vector, rep(paste($i+1, "$escaped_element_identifier", sep="_"),ncol(msidata_$i)))
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
81 coord(msidata_$i)\$x = coord(msidata_$i)\$x - (min(coord(msidata_$i)\$x-1)) + x_shifts
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
82 coord(msidata_$i)\$y = coord(msidata_$i)\$y - (min(coord(msidata_$i)\$y-1)) + y_shifts
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
83 x_shifts = max(coord(msidata_$i)\$x) + $combine_conditional.x_distance
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
84 max_y = append(max_y, max(coord(msidata_$i)\$y))
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
85
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
86 all_files = $num_infiles
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
87 new_row = ($i+1)/ceiling(sqrt(all_files))
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
88 new_row%%1==0
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
89 if (new_row%%1==0)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
90 {x_shifts = 0 ### x values start again at zero
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
91 y_shifts = max(max_y) + $combine_conditional.y_distance
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
92 max_y = numeric()}
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
93
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
94 #end if
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
95 #silent $msidata.append('msidata_'+str($i))
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
96 #silent $pixelcoords.append('pixelcoords_'+str($i))
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
97 #end for
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
98
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
99 ###################### automatic combination ###################################
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
100 ################################################################################
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
101
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
102 #if str( $combine_conditional.combine_method ) == 'automatic_combine':
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
103 print("automatic_combine")
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
104 msidata_combined = do.call(combine, list(#echo ','.join($msidata)#))
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
105 sample_names = as.factor(names_vector)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
106 pData(msidata_combined)\$sample = sample_names
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
107
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
108 ## create PDF to show pixels of each file
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
109 pdf("combining_qc.pdf", width=15, height=15)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
110 position_df = cbind(coord(msidata_combined)[,1:2], pData(msidata_combined)\$sample)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
111 colnames(position_df)[3] = "sample_name"
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
112
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
113 combine_plot = ggplot(position_df, aes(x=x, y=y, fill=sample_name))+
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
114 geom_tile() +
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
115 coord_fixed()+
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
116 ggtitle("Spatial orientation of combined data")+
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
117 theme_bw()+
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
118 theme(text=element_text(family="ArialMT", face="bold", size=15))+
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
119 theme(legend.position="bottom",legend.direction="vertical")+
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
120 guides(fill=guide_legend(ncol=4,byrow=TRUE))
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
121
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
122
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
123 coord_labels = aggregate(cbind(x,y)~sample_name, data=position_df, mean)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
124 coord_labels\$file_number = gsub( "_.*$", "", coord_labels\$sample_name)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
125 for(file_count in 1:nrow(coord_labels))
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
126 {
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
127 combine_plot = combine_plot + annotate("text",x=coord_labels[file_count,"x"],y=coord_labels[file_count,"y"],label=toString(coord_labels[file_count,4]))
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
128 }
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
129
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
130 print(combine_plot)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
131 dev.off()
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
132
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
133 ## save as (.RData)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
134 msidata = msidata_combined
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
135 save(msidata, file="$msidata_combined")
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
136 ################################## xy shifts ###################################
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
137 ################################################################################
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
138 #elif str( $combine_conditional.combine_method ) == 'xy_shifts':
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
139 print("xy_shifts")
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
140 msidata_combined = do.call(combine, list(#echo ','.join($msidata)#))
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
141
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
142 ############# replace NA with 0 and rename pixels according to dataset #########
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
143
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
144 spectra(msidata_combined)[is.na(spectra(msidata_combined))] <- 0
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
145 print(paste0("Number of NAs which were replaced ",sum(is.na(spectra(msidata_combined)))))
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
146
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
147 sample_names = as.factor(pixel_vector)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
148 pData(msidata_combined)\$sample = sample_names
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
149
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
150 ###################################### outputs #################################
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
151 ## save as (.RData)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
152 msidata = msidata_combined
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
153 save(msidata, file="$msidata_combined")
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
154
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
155 ## create PDF to show pixels of each file
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
156 pdf("combining_qc.pdf")
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
157 position_df = cbind(coord(msidata), pData(msidata)\$sample)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
158 colnames(position_df)[3] = "sample_name"
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
159
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
160 combine_plot = ggplot(position_df, aes(x=x, y=y, fill=sample_name))+
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
161 geom_tile() +
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
162 coord_fixed()+
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
163 ggtitle("Spatial orientation of combined data")+
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
164 theme_bw()+
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
165 theme(text=element_text(family="ArialMT", face="bold", size=12))
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
166
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
167 coord_labels = aggregate(cbind(x,y)~sample_name, data=position_df, mean)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
168 for(file_count in 1:nrow(coord_labels))
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
169 {
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
170 combine_plot = combine_plot + annotate("text",x=coord_labels[file_count,"x"],y=coord_labels[file_count,"y"],label=toString(coord_labels[file_count,"sample_name"]))
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
171 }
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
172
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
173 print(combine_plot)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
174
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
175 dev.off()
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
176
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
177
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
178 ################################## no shifts ###################################
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
179 ################################################################################
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
180 #elif str( $combine_conditional.combine_method ) == 'no_shifts':
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
181 print("no_shifts")
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
182 msidata_combined = do.call(combine, list(#echo ','.join($msidata)#))
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
183
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
184 ############# replace NA with 0 and rename pixels according to dataset #########
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
185
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
186 spectra(msidata_combined)[is.na(spectra(msidata_combined))] <- 0
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
187 print(paste0("Number of NAs which were replaced ",sum(is.na(spectra(msidata_combined)))))
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
188
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
189 ###################################### outputs #################################
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
190 ## save as (.RData)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
191 msidata = msidata_combined
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
192 save(msidata, file="$msidata_combined")
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
193
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
194 ## create PDF to show pixels of each file
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
195 pdf("combining_qc.pdf")
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
196 position_df = cbind(coord(msidata), pData(msidata)\$sample)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
197 colnames(position_df)[3] = "sample_name"
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
198
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
199 ggplot(position_df, aes(x=x, y=y, fill=sample_name))+
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
200 geom_tile() +
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
201 coord_fixed()+
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
202 ggtitle("Spatial orientation of combined data")+
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
203 theme_bw()+
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
204 theme(text=element_text(family="ArialMT", face="bold", size=12))
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
205
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
206 dev.off()
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
207
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
208
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
209 ################################## no combination ##############################
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
210 ################################################################################
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
211 #elif str( $combine_conditional.combine_method ) == 'no_combine':
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
212 print("no_combine")
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
213
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
214 ## create PDF to show pixels of each file
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
215 pdf("combining_qc.pdf")
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
216 position_df = do.call(rbind, list(#echo ','.join($pixelcoords)#))
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
217 position_df[duplicated(position_df[,1:2]),3] = 0
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
218 position_df\$file_number = as.factor(position_df\$file_number)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
219
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
220 combine_plot = ggplot(position_df, aes(x=x, y=y, fill=file_number))+
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
221 geom_tile() +
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
222 coord_fixed()+
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
223 ggtitle("Spatial orientation before combination")+
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
224 theme_bw()+
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
225 theme(text=element_text(family="ArialMT", face="bold", size=12))+
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
226 theme(panel.grid.major = element_line(colour = "black")) +
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
227 scale_x_continuous(minor_breaks = seq(min(position_df\$x-50), max(position_df\$x+50, 1))) +
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
228 scale_y_continuous(minor_breaks = seq(min(position_df\$y-50), max(position_df\$y+50, 1)))
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
229
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
230
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
231 coord_labels = aggregate(cbind(x,y)~file_number, data=position_df, mean)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
232 for(file_count in 1:nrow(coord_labels))
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
233 {
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
234 combine_plot = combine_plot + annotate("text",x=coord_labels[file_count,"x"],y=coord_labels[file_count,"y"],label=toString(coord_labels[file_count,"file_number"]))
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
235 }
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
236
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
237 print(combine_plot)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
238
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
239 dev.off()
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
240 #end if
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
241
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
242 #if $output_matrix:
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
243
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
244 if (length(features(msidata_combined))> 0 & length(pixels(msidata_combined)) > 0)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
245 {
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
246 spectramatrix = spectra(msidata_combined)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
247 rownames(spectramatrix) = mz(msidata_combined)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
248 newmatrix = rbind(pixels(msidata_combined), spectramatrix)
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
249 write.table(newmatrix[2:nrow(newmatrix),], file="$matrixasoutput", quote = FALSE, row.names = TRUE, col.names=NA, sep = "\t")
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
250 }else{
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
251 print("file has no features or pixels left")
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
252 }
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
253 #end if
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
254
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
255 ]]></configfile>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
256 </configfiles>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
257 <inputs>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
258 <param name="infiles" type="data" multiple="true" format="imzml,rdata,analyze75"
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
259 label="MSI rawdata as imzml, analyze7.5 or Cardinal MSImageSet saved as RData"
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
260 help="load imzml and ibd file by uploading composite datatype imzml"/>
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
261 <conditional name="combine_conditional">
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
262 <param name="combine_method" type="select" label="Select the way you want to combine multiple files" help="More detailed help can be found in the help section at the bottom">
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
263 <option value="automatic_combine" selected="True" >automatic combination</option>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
264 <option value="no_shifts" >no coordinates shift</option>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
265 <option value="xy_shifts">xy shifts by hand</option>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
266 <option value="no_combine">check pixels before combination</option>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
267 </param>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
268 <when value="no_shifts">
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
269 </when>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
270 <when value="automatic_combine">
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
271 <param name="x_distance" type="integer" value="10" label="How many pixels in x direction should be between files?"/>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
272 <param name="y_distance" type="integer" value="10" label="How many pixels in y direction should be between files?"/>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
273 </when>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
274 <when value="xy_shifts">
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
275 <param name="coordinates_file" type="data" format="tabular" label="datasetnames, X and y values to shift data before combining"
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
276 help="Tabular file with three columns: 1 for the filename, 1 for the x-coordinate shift and 1 for the y-coordinate shift"/>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
277 <param name="column_x" data_ref="coordinates_file" label="Column with values for shift in x direction" type="data_column"/>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
278 <param name="column_y" data_ref="coordinates_file" label="Column with values for shift in y direction" type="data_column"/>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
279 <param name="column_names" data_ref="coordinates_file" label="Column with dataset names" type="data_column"/>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
280 </when>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
281 <when value="no_combine"/>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
282 </conditional>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
283 <param name="output_matrix" type="boolean" display="radio" label="Intensity matrix output"/>
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
284 </inputs>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
285 <outputs>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
286 <data format="rdata" name="msidata_combined" label="Combined MSI data"/>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
287 <data format="pdf" name="combining_qc" from_work_dir="combining_qc.pdf" label = "Combined image of pixels"/>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
288 <data format="tabular" name="matrixasoutput" label="Combined matrix">
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
289 <filter>output_matrix</filter>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
290 </data>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
291 </outputs>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
292 <tests>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
293 <test expect_num_outputs="3">
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
294 <param name="infiles" value="msidata_1.RData,msidata_2.RData,msidata_3.RData" ftype="rdata"/>
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
295 <param name="combine_method" value="xy_shifts"/>
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
296 <param name="coordinates_file" ftype="tabular" value="xy_coordinates.tabular"/>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
297 <param name="column_x" value="1"/>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
298 <param name="column_y" value="2"/>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
299 <param name="column_names" value="3"/>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
300 <param name="output_matrix" value="True"/>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
301 <output name="matrixasoutput" file="123_combined_matrix.tabular"/>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
302 <output name="msidata_combined" file="123_combined.RData" compare="sim_size" />
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
303 <output name="combining_qc" file="123_combined_QC.pdf" compare="sim_size" delta="20000"/>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
304 </test>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
305 <test expect_num_outputs="3">
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
306 <param name="infiles" value="msidata_1.RData,msidata_2.RData" ftype="rdata"/>
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
307 <param name="combine_method" value="no_shifts"/>
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
308 <param name="output_matrix" value="True"/>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
309 <output name="matrixasoutput" file="12_combined_matrix.tabular"/>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
310 <output name="msidata_combined" file="12_combined.RData" compare="sim_size" />
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
311 <output name="combining_qc" file="12_combined_QC.pdf" compare="sim_size" delta="20000"/>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
312 </test>
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
313 <test expect_num_outputs="3">
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
314 <param name="infiles" value="msidata_1.RData,msidata_2.RData" ftype="rdata"/>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
315 <param name="combine_method" value="automatic_combine"/>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
316 <param name="x_distance" value="1"/>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
317 <param name="y_distance" value="1"/>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
318 <param name="output_matrix" value="True"/>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
319 <output name="matrixasoutput" file="12_auto_combined_matrix.tabular"/>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
320 <output name="msidata_combined" file="12_auto_combined.RData" compare="sim_size" />
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
321 <output name="combining_qc" file="12_auto_combined_QC.pdf" compare="sim_size" delta="20000"/>
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
322 </test>
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
323 </tests>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
324 <help>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
325 <![CDATA[
1
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
326 This tool can combine several mass-spectrometry imaging files.
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
327 1) m/z values need to be the same across all datasets
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
328 2) pixels (defined by x and y coordinates) must be unique
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
329
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
330 1) Same m/z values/axis can be achieved with the filtering tool to get all datasets to the same m/z range and afterwards binning in the preprocessing tool to obtain the same bins for all dataset.
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
331 2) The pixels (defined by x and y coordinates) must be unique across all datasets, therefore the option "Select the way you want to combine multiple files" is helpful:
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
332
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
333 - "automatic combination": files are arranged in a grid with a distance in x and y direction which can be given by the user
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
334 - "no coordinates shift": this option can only be used if all pixels are unique across datasets
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
335 - "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
f3f6c32ab690 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents: 0
diff changeset
336 - "check pixels before combination": no combination takes place. You will only get a pdf which shows the arrangement of the pixels (with or without additional xy shifts)
0
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
337
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
338 Input data: 3 types of input data can be used:
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
339
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
340 - imzml file (upload imzml and ibd file via the "composite" function) `Introduction to the imzml format <http://ms-imaging.org/wp/introduction/>`_
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
341 - Analyze7.5 (upload hdr, img and t2m file via the "composite" function)
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
342 - Cardinal "MSImageSet" data (with variable name "msidata", saved as .RData)
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
343
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
344 The output of this tool is a Cardinal "MSImageSet" with the variable name "msidata" saved as .RData.
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
345 ]]>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
346 </help>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
347 <citations>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
348 <citation type="doi">10.1093/bioinformatics/btv146</citation>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
349 </citations>
9cbcf48bf60a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_combine commit 1e5a87e56e09f01087844f8d2c95002455b1d89d
galaxyp
parents:
diff changeset
350 </tool>