annotate segmentation_tool.xml @ 7:791aedb1b8ea draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
author galaxyp
date Fri, 06 Jul 2018 14:12:15 -0400
parents b3c8c831e51a
children fa8b6f0f68d4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
1 <tool id="mass_spectrometry_imaging_segmentations" name="MSI segmentation" version="1.10.0.3">
5
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
2 <description>mass spectrometry imaging spatial clustering</description>
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
3 <requirements>
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
4 <requirement type="package" version="1.10.0">bioconductor-cardinal</requirement>
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
5 <requirement type="package" version="2.2.1">r-gridextra</requirement>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
6 <requirement type="package" version="0.20-35">r-lattice</requirement>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
7 </requirements>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
8 <command detect_errors="exit_code">
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
9 <![CDATA[
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
10
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
11 #if $infile.ext == 'imzml'
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
12 ln -s '${infile.extra_files_path}/imzml' infile.imzML &&
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
13 ln -s '${infile.extra_files_path}/ibd' infile.ibd &&
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
14 #elif $infile.ext == 'analyze75'
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
15 ln -s '${infile.extra_files_path}/hdr' infile.hdr &&
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
16 ln -s '${infile.extra_files_path}/img' infile.img &&
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
17 ln -s '${infile.extra_files_path}/t2m' infile.t2m &&
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
18 #else
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
19 ln -s $infile infile.RData &&
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
20 #end if
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
21 cat '${MSI_segmentation}' &&
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
22 echo ${MSI_segmentation} &&
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
23 Rscript '${MSI_segmentation}'
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
24
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
25 ]]>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
26 </command>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
27 <configfiles>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
28 <configfile name="MSI_segmentation"><![CDATA[
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
29
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
30
5
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
31 ################################# load libraries and read file #################
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
32
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
33 library(Cardinal)
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
34 library(gridExtra)
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
35 library(lattice)
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
36
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
37 ## Read MALDI Imaging dataset
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
38
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
39 #if $infile.ext == 'imzml'
7
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
40 #if str($processed_cond.processed_file) == "processed":
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
41 msidata <- readImzML('infile', mass.accuracy=$processed_cond.accuracy, units.accuracy = "$processed_cond.units")
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
42 #else
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
43 msidata <- readImzML('infile')
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
44 #end if
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
45 #elif $infile.ext == 'analyze75'
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
46 msidata = readAnalyze('infile')
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
47 #else
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
48 load('infile.RData')
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
49 #end if
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
50
7
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
51
6
b3c8c831e51a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents: 5
diff changeset
52 ## create full matrix to make processed imzML files compatible with segmentation
b3c8c831e51a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents: 5
diff changeset
53 iData(msidata) <- iData(msidata)[]
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
54 ###################################### file properties in numbers ##############
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
55
5
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
56 ## Number of features (m/z)
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
57 maxfeatures = length(features(msidata))
5
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
58 ## Range m/z
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
59 minmz = round(min(mz(msidata)), digits=2)
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
60 maxmz = round(max(mz(msidata)), digits=2)
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
61 ## Number of spectra (pixels)
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
62 pixelcount = length(pixels(msidata))
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
63 ## Range x coordinates
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
64 minimumx = min(coord(msidata)[,1])
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
65 maximumx = max(coord(msidata)[,1])
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
66 ## Range y coordinates
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
67 minimumy = min(coord(msidata)[,2])
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
68 maximumy = max(coord(msidata)[,2])
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
69 ## Range of intensities
7
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
70 minint = round(min(spectra(msidata)[],na.rm=TRUE), digits=2)
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
71 maxint = round(max(spectra(msidata)[],na.rm=TRUE), digits=2)
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
72 medint = round(median(spectra(msidata)[]), digits=2)
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
73 ## Number of intensities > 0
7
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
74 npeaks= sum(spectra(msidata)[]>0, na.rm=TRUE)
5
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
75 ## Spectra multiplied with m/z (potential number of peaks)
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
76 numpeaks = ncol(spectra(msidata)[])*nrow(spectra(msidata)[])
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
77 ## Percentage of intensities > 0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
78 percpeaks = round(npeaks/numpeaks*100, digits=2)
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
79 ## Number of empty TICs
7
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
80 TICs = colSums(spectra(msidata)[], na.rm=TRUE)
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
81 NumemptyTIC = sum(TICs == 0)
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
82
7
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
83
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
84
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
85 ## Processing informations
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
86 processinginfo = processingData(msidata)
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
87 centroidedinfo = processinginfo@centroided # TRUE or FALSE
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
88
5
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
89 ## if TRUE write processinginfo if FALSE write FALSE
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
90
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
91 ## normalization
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
92 if (length(processinginfo@normalization) == 0) {
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
93 normalizationinfo='FALSE'
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
94 } else {
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
95 normalizationinfo=processinginfo@normalization
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
96 }
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
97 ## smoothing
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
98 if (length(processinginfo@smoothing) == 0) {
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
99 smoothinginfo='FALSE'
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
100 } else {
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
101 smoothinginfo=processinginfo@smoothing
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
102 }
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
103 ## baseline
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
104 if (length(processinginfo@baselineReduction) == 0) {
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
105 baselinereductioninfo='FALSE'
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
106 } else {
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
107 baselinereductioninfo=processinginfo@baselineReduction
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
108 }
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
109 ## peak picking
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
110 if (length(processinginfo@peakPicking) == 0) {
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
111 peakpickinginfo='FALSE'
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
112 } else {
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
113 peakpickinginfo=processinginfo@peakPicking
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
114 }
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
115
5
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
116 properties = c("Number of m/z features",
6
b3c8c831e51a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents: 5
diff changeset
117 "Range of m/z values",
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
118 "Number of pixels",
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
119 "Range of x coordinates",
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
120 "Range of y coordinates",
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
121 "Range of intensities",
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
122 "Median of intensities",
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
123 "Intensities > 0",
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
124 "Number of zero TICs",
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
125 "Preprocessing",
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
126 "Normalization",
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
127 "Smoothing",
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
128 "Baseline reduction",
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
129 "Peak picking",
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
130 "Centroided")
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
131
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
132 values = c(paste0(maxfeatures),
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
133 paste0(minmz, " - ", maxmz),
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
134 paste0(pixelcount),
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
135 paste0(minimumx, " - ", maximumx),
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
136 paste0(minimumy, " - ", maximumy),
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
137 paste0(minint, " - ", maxint),
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
138 paste0(medint),
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
139 paste0(percpeaks, " %"),
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
140 paste0(NumemptyTIC),
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
141 paste0(" "),
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
142 paste0(normalizationinfo),
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
143 paste0(smoothinginfo),
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
144 paste0(baselinereductioninfo),
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
145 paste0(peakpickinginfo),
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
146 paste0(centroidedinfo))
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
147
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
148 property_df = data.frame(properties, values)
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
149
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
150
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
151 ######################################## PDF ###################################
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
152 ################################################################################
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
153 ################################################################################
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
154
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
155
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
156 pdf("segmentationpdf.pdf", fonts = "Times", pointsize = 12)
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
157 plot(0,type='n',axes=FALSE,ann=FALSE)
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
158
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
159 title(main=paste0("Spatial segmentation for file: \n\n", "$infile.display_name"))
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
160
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
161
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
162 ############################# I) numbers ####################################
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
163 #############################################################################
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
164 grid.table(property_df, rows= NULL)
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
165
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
166 if (npeaks > 0)
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
167 {
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
168
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
169 ######################## II) segmentation tools #############################
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
170 #############################################################################
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
171 #set $color_string = ','.join(['"%s"' % $color.feature_color for $color in $colours])
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
172 colourvector = c($color_string)
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
173
5
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
174 ### preparation for images and plots:
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
175 #if str($image_cond.image_type) == "standard_image":
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
176 print("standard image")
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
177
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
178 strip_input = TRUE
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
179 lattice_input = FALSE
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
180
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
181 #elif str($image_cond.image_type) == "lattice_image":
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
182 print("lattice image")
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
183
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
184 strip_input = strip.custom(bg="lightgrey", par.strip.text=list(col="black", cex=.9))
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
185 lattice_input = TRUE
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
186
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
187 #end if
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
188
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
189
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
190 #if str( $segm_cond.segmentationtool ) == 'pca':
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
191 print('pca')
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
192 ##pca
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
193
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
194 component_vector = character()
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
195 for (numberofcomponents in 1:$segm_cond.pca_ncomp)
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
196 {component_vector[numberofcomponents]= paste0("PC", numberofcomponents)}
6
b3c8c831e51a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents: 5
diff changeset
197 pca_result = PCA(msidata, ncomp=$segm_cond.pca_ncomp, column = component_vector, superpose = FALSE,
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
198 method = "$segm_cond.pca_method", scale = $segm_cond.pca_scale, layout = c(ncomp, 1))
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
199
6
b3c8c831e51a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents: 5
diff changeset
200 ### images in pdf file
b3c8c831e51a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents: 5
diff changeset
201 print(image(pca_result, main="PCA image", lattice=lattice_input, strip = strip_input, col=colourvector))
b3c8c831e51a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents: 5
diff changeset
202 for (PCs in 1:$segm_cond.pca_ncomp){
7
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
203 print(image(pca_result, column = c(paste0("PC",PCs)), lattice=lattice_input, superpose = FALSE, col.regions = risk.colors(100)))}
6
b3c8c831e51a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents: 5
diff changeset
204 ### plots in pdf file
b3c8c831e51a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents: 5
diff changeset
205 print(plot(pca_result, main="PCA plot", lattice=lattice_input, col= colourvector, strip = strip_input))
b3c8c831e51a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents: 5
diff changeset
206 for (PCs in 1:$segm_cond.pca_ncomp){
7
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
207 print(plot(pca_result, column = c(paste0("PC",PCs)),superpose = FALSE))}
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
208
6
b3c8c831e51a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents: 5
diff changeset
209 ### values in tabular files
b3c8c831e51a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents: 5
diff changeset
210 pcaloadings = (pca_result@resultData\$ncomp\$loadings) ### loading for each m/z value
b3c8c831e51a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents: 5
diff changeset
211 pcascores = (pca_result@resultData\$ncomp\$scores) ### scores for each pixel
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
212
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
213 write.table(pcaloadings, file="$mzfeatures", quote = FALSE, row.names = TRUE, col.names=NA, sep = "\t")
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
214 write.table(pcascores, file="$pixeloutput", quote = FALSE, row.names = TRUE, col.names=NA, sep = "\t")
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
215
5
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
216 ## optional output as .RData
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
217 #if $output_rdata:
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
218 ## save as (.RData)
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
219 save(pca, file="$segmentation_rdata")
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
220
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
221 #end if
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
222
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
223 #elif str( $segm_cond.segmentationtool ) == 'kmeans':
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
224 print('kmeans')
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
225 ##k-means
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
226
2
76d0244b1bbc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
227 skm = spatialKMeans(msidata, r=c($segm_cond.kmeans_r), k=c($segm_cond.kmeans_k), method="$segm_cond.kmeans_method")
5
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
228 print(image(skm, key=TRUE, main="K-means clustering", lattice=lattice_input, strip=strip_input, col= colourvector, layout=c(1,1)))
2
76d0244b1bbc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
229
5
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
230 print(plot(skm, main="K-means plot", lattice=lattice_input, col= colourvector, strip=strip_input, layout=c($segm_cond.kmeans_layout)))
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
231
2
76d0244b1bbc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
232 skm_clusters = data.frame(matrix(NA, nrow = pixelcount, ncol = 0))
76d0244b1bbc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
233 for (iteration in 1:length(skm@resultData)){
76d0244b1bbc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
234 skm_cluster = ((skm@resultData)[[iteration]]\$cluster)
76d0244b1bbc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
235 skm_clusters = cbind(skm_clusters, skm_cluster) }
76d0244b1bbc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
236 colnames(skm_clusters) = names((skm@resultData))
76d0244b1bbc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
237
76d0244b1bbc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
238 skm_toplabels = topLabels(skm, n=$segm_cond.kmeans_toplabels)
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
239
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
240 write.table(skm_toplabels, file="$mzfeatures", quote = FALSE, row.names = TRUE, col.names=NA, sep = "\t")
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
241 write.table(skm_clusters, file="$pixeloutput", quote = FALSE, row.names = TRUE, col.names=NA, sep = "\t")
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
242
5
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
243 ## optional output as .RData
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
244 #if $output_rdata:
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
245
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
246 ## save as (.RData)
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
247 save(skm, file="$segmentation_rdata")
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
248
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
249 #end if
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
250
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
251 #elif str( $segm_cond.segmentationtool ) == 'centroids':
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
252 print('centroids')
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
253 ##centroids
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
254
2
76d0244b1bbc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
255 ssc = spatialShrunkenCentroids(msidata, r=c($segm_cond.centroids_r), k=c($segm_cond.centroids_k), s=c($segm_cond.centroids_s), method="$segm_cond.centroids_method")
5
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
256 print(image(ssc, key=TRUE, main="Spatial shrunken centroids", lattice=lattice_input, strip = strip_input, col= colourvector,layout=c(1,1)))
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
257 print(plot(ssc, main="Spatial shrunken centroids plot", lattice=lattice_input, col= colourvector, strip = strip_input,layout=c($segm_cond.centroids_layout)))
6
b3c8c831e51a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents: 5
diff changeset
258 print(plot(ssc, mode = "tstatistics",key = TRUE, lattice=lattice_input, layout = c($segm_cond.centroids_layout), main="t-statistics", col=colourvector))
7
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
259 plot(summary(ssc), main = "Number of segments")
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
260
2
76d0244b1bbc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
261 ssc_classes = data.frame(matrix(NA, nrow = pixelcount, ncol = 0))
76d0244b1bbc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
262 for (iteration in 1:length(ssc@resultData)){
76d0244b1bbc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
263 ssc_class = ((ssc@resultData)[[iteration]]\$classes)
76d0244b1bbc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
264 ssc_classes = cbind(ssc_classes, ssc_class) }
6
b3c8c831e51a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents: 5
diff changeset
265 colnames(ssc_classes) = names((ssc@resultData))
2
76d0244b1bbc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
266
76d0244b1bbc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
267 ssc_toplabels = topLabels(ssc, n=$segm_cond.centroids_toplabels)
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
268
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
269 write.table(ssc_toplabels, file="$mzfeatures", quote = FALSE, row.names = TRUE, col.names=NA, sep = "\t")
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
270 write.table(ssc_classes, file="$pixeloutput", quote = FALSE, row.names = TRUE, col.names=NA, sep = "\t")
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
271
5
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
272 ## optional output as .RData
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
273 #if $output_rdata:
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
274
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
275 ## save as (.RData)
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
276 save(ssc, file="$segmentation_rdata")
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
277
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
278 #end if
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
279
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
280 #end if
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
281
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
282 dev.off()
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
283
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
284 }else{
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
285 print("Inputfile has no intensities > 0")
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
286 dev.off()
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
287 }
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
288
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
289 ]]></configfile>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
290 </configfiles>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
291 <inputs>
6
b3c8c831e51a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents: 5
diff changeset
292 <param name="infile" type="data" format="imzml,rdata,analyze75"
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
293 label="Inputfile as imzML, Analyze7.5 or Cardinal MSImageSet saved as RData"
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
294 help="Upload composite datatype imzml (ibd+imzML) or analyze75 (hdr+img+t2m) or regular upload .RData (Cardinal MSImageSet)"/>
7
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
295 <conditional name="processed_cond">
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
296 <param name="processed_file" type="select" label="Is the input file a processed imzML file ">
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
297 <option value="no_processed" selected="True">not a processed imzML</option>
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
298 <option value="processed">processed imzML</option>
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
299 </param>
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
300 <when value="no_processed"/>
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
301 <when value="processed">
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
302 <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"/>
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
303 <param name="units" display="radio" type="select" label="Unit of the mass accuracy" help="either m/z or ppm">
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
304 <option value="mz" >mz</option>
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
305 <option value="ppm" selected="True" >ppm</option>
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
306 </param>
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
307 </when>
791aedb1b8ea planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents: 6
diff changeset
308 </conditional>
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
309 <conditional name="segm_cond">
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
310 <param name="segmentationtool" type="select" label="Select the tool for spatial clustering">
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
311 <option value="pca" selected="True">pca</option>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
312 <option value="kmeans">k-means</option>
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
313 <option value="centroids">spatial shrunken centroids</option>
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
314 </param>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
315 <when value="pca">
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
316 <param name="pca_ncomp" type="integer" value="2"
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
317 label="The number of principal components to calculate"/>
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
318 <param name="pca_method" type="select"
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
319 label="The function used to calculate the singular value decomposition">
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
320 <option value="irlba" selected="True">irlba</option>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
321 <option value="svd">svd</option>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
322 </param>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
323 <param name="pca_scale" type="select" display="radio" optional="False"
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
324 label="Scaling of data before analysis">
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
325 <option value="TRUE">yes</option>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
326 <option value="FALSE" selected="True">no</option>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
327 </param>
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
328 </when>
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
329
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
330 <when value="kmeans">
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
331 <param name="kmeans_r" type="text" value="2"
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
332 label="The spatial neighborhood radius of nearby pixels to consider (r)" help="Multiple values are allowed (e.g. 1,2,3 or 2:5)"/>
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
333 <param name="kmeans_k" type="text" value="3"
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
334 label="The number of clusters (k)" help="Multiple values are allowed (e.g. 1,2,3 or 2:5)"/>
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
335 <param name="kmeans_method" type="select" display="radio"
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
336 label="The method to use to calculate the spatial smoothing kernels for the embedding. The 'gaussian' method refers to spatially-aware (SA) clustering, and 'adaptive' refers to spatially-aware structurally-adaptive (SASA) clustering">
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
337 <option value="gaussian">gaussian</option>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
338 <option value="adaptive" selected="True">adaptive</option>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
339 </param>
2
76d0244b1bbc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
340 <param name="kmeans_toplabels" type="integer" value="500"
5
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
341 label="Number of toplabels (m/z) which should be written in tabular output"/>
2
76d0244b1bbc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
342 <param name="kmeans_layout" type="text" value="1,1"
76d0244b1bbc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
343 label="Number of rows and columns to plot pictures in pdf output" help="e.g. 1,1 means 1 plot per page; 2,3 means 2 rows with 3 plots each = 6 plots per page"/>
76d0244b1bbc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
344 </when>
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
345
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
346 <when value="centroids">
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
347 <param name="centroids_r" type="text" value="2"
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
348 label="The spatial neighborhood radius of nearby pixels to consider (r)" help="Multiple values are allowed (e.g. 1,2,3 or 2:5)"/>
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
349 <param name="centroids_k" type="text" value="5"
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
350 label="The initial number of clusters (k)" help="Multiple values are allowed (e.g. 1,2,3 or 2:5)"/>
2
76d0244b1bbc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
351 <param name="centroids_s" type="text" value="2"
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
352 label="The sparsity thresholding parameter by which to shrink the t-statistics (s)"
5
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
353 help="As s increases, fewer m/z features (m/z values) will be used in the spatial segmentation, and only the informative m/z features will be retained. Multiple values are allowed (e.g. 1,2,3 or 2:5)"/>
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
354 <param name="centroids_method" type="select" display="radio" label = "The method to use to calculate the spatial smoothing kernels for the embedding. The 'gaussian' method refers to spatially-aware (SA) weights, and 'adaptive' refers to spatially-aware structurally-adaptive (SASA) weights">
6
b3c8c831e51a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents: 5
diff changeset
355 <option value="gaussian">gaussian</option>
b3c8c831e51a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents: 5
diff changeset
356 <option value="adaptive" selected="True">adaptive</option>
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
357 </param>
2
76d0244b1bbc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
358 <param name="centroids_toplabels" type="integer" value="500"
5
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
359 label="Number of toplabels (m/z) which should be written in tabular output"/>
2
76d0244b1bbc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
360 <param name="centroids_layout" type="text" value="1,1"
76d0244b1bbc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
361 label="Number of rows and columns to plot pictures in pdf output" help="e.g. 1,1 means 1 plot per page; 2,3 means 2 rows with 3 plots each = 6 plots per page"/>
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
362 </when>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
363 </conditional>
5
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
364 <conditional name="image_cond">
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
365 <param name="image_type" type="select" label="Select the image type">
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
366 <option value="standard_image" selected="True">standard</option>
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
367 <option value="lattice_image">lattice</option>
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
368 </param>
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
369 <when value="standard_image"/>
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
370 <when value="lattice_image"/>
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
371 </conditional>
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
372 <repeat name="colours" title="Colours for the plots" min="1" max="50">
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
373 <param name="feature_color" type="color" label="Colours" value="#ff00ff" help="Numbers of columns should be the same as number of components">
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
374 <sanitizer>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
375 <valid initial="string.letters,string.digits">
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
376 <add value="#" />
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
377 </valid>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
378 </sanitizer>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
379 </param>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
380 </repeat>
5
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
381 <param name="output_rdata" type="boolean" display="radio" label="Results as .RData output"/>
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
382 </inputs>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
383 <outputs>
5
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
384 <data format="pdf" name="segmentationimages" from_work_dir="segmentationpdf.pdf" label = "$infile.display_name segmentation"/>
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
385 <data format="tabular" name="mzfeatures" label="$infile.display_name m/z features"/>
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
386 <data format="tabular" name="pixeloutput" label="$infile.display_name pixels"/>
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
387 <data format="rdata" name="segmentation_rdata" label="$infile.display_name segmentation">
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
388 <filter>output_rdata</filter>
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
389 </data>
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
390 </outputs>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
391 <tests>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
392 <test>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
393 <param name="infile" value="" ftype="imzml">
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
394 <composite_data value="Example_Continuous.imzML"/>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
395 <composite_data value="Example_Continuous.ibd"/>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
396 </param>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
397 <param name="segmentationtool" value="pca"/>
5
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
398 <param name="image_type" value="lattice_image"/>
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
399 <repeat name="colours">
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
400 <param name="feature_color" value="#ff00ff"/>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
401 </repeat>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
402 <repeat name="colours">
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
403 <param name="feature_color" value="#0000FF"/>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
404 </repeat>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
405 <output name="segmentationimages" file="pca_imzml.pdf" compare="sim_size" delta="20000"/>
1
942c11934f50 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
406 <output name="mzfeatures" file="loadings_pca.tabular" compare="sim_size"/>
942c11934f50 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
407 <output name="pixeloutput" file="scores_pca.tabular" compare="sim_size"/>
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
408 </test>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
409 <test>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
410 <param name="infile" value="" ftype="analyze75">
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
411 <composite_data value="Analyze75.hdr" />
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
412 <composite_data value="Analyze75.img" />
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
413 <composite_data value="Analyze75.t2m" />
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
414 </param>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
415 <param name="segmentationtool" value="kmeans"/>
2
76d0244b1bbc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
416 <param name="kmeans_r" value="1:3"/>
76d0244b1bbc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
417 <param name="kmeans_k" value="2,3"/>
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
418 <param name="kmeans_toplabels" value="20"/>
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
419 <repeat name="colours">
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
420 <param name="feature_color" value="#ff00ff"/>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
421 </repeat>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
422 <repeat name="colours">
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
423 <param name="feature_color" value="#0000FF"/>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
424 </repeat>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
425 <repeat name="colours">
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
426 <param name="feature_color" value="#00C957"/>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
427 </repeat>
5
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
428 <param name="output_rdata" value="True"/>
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
429 <output name="segmentationimages" file="kmeans_analyze.pdf" compare="sim_size" delta="20000"/>
1
942c11934f50 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
430 <output name="mzfeatures" file="toplabels_skm.tabular" compare="sim_size"/>
942c11934f50 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
431 <output name="pixeloutput" file="cluster_skm.tabular" compare="sim_size"/>
5
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
432 <output name="pixeloutput" file="cluster_skm.tabular" compare="sim_size"/>
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
433 <output name="segmentation_rdata" file="cluster_skm.RData" compare="sim_size"/>
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
434 </test>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
435 <test>
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
436 <param name="infile" value="preprocessed.RData" ftype="rdata"/>
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
437 <param name="segmentationtool" value="centroids"/>
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
438 <param name="centroids_r" value="1,2"/>
6
b3c8c831e51a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents: 5
diff changeset
439 <param name="centroids_k" value="3"/>
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
440 <param name="centroids_toplabels" value="50"/>
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
441 <repeat name="colours">
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
442 <param name="feature_color" value="#0000FF"/>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
443 </repeat>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
444 <repeat name="colours">
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
445 <param name="feature_color" value="#00C957"/>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
446 </repeat>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
447 <repeat name="colours">
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
448 <param name="feature_color" value="#B0171F"/>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
449 </repeat>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
450 <repeat name="colours">
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
451 <param name="feature_color" value="#FFD700"/>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
452 </repeat>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
453 <repeat name="colours">
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
454 <param name="feature_color" value="#848484"/>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
455 </repeat>
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
456 <output name="segmentationimages" file="centroids_rdata.pdf" compare="sim_size" delta="20000"/>
1
942c11934f50 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
457 <output name="mzfeatures" file="toplabels_ssc.tabular" compare="sim_size"/>
942c11934f50 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
458 <output name="pixeloutput" file="classes_ssc.tabular" compare="sim_size"/>
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
459 </test>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
460 </tests>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
461 <help>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
462 <![CDATA[
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
463
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
464 Cardinal is an R package that implements statistical & computational tools for analyzing mass spectrometry imaging datasets. `More information on Cardinal <http://cardinalmsi.org//>`_
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
465
5
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
466 This tool provides three different Cardinal functions for unsupervised clustering/spatial segmentation of mass spectrometry imaging data.
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
467
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
468 Input data: 3 types of input data can be used:
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
469
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
470 - imzml file (upload imzml and ibd file via the "composite" function) `Introduction to the imzml format <https://ms-imaging.org/wp/imzml/>`_
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
471 - Analyze7.5 (upload hdr, img and t2m file via the "composite" function)
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
472 - Cardinal "MSImageSet" data (with variable name "msidata", saved as .RData)
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
473
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
474 Options:
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
475
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
476 - PCA: principal component analysis
6
b3c8c831e51a planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents: 5
diff changeset
477 - k-means: spatially-aware k-means clustering
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
478 - spatial shrunken centroids: Allows the number of segments to decrease according to the data. This allows automatic selection of the number of clusters
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
479
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
480 Output:
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
481
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
482 - Pdf with the heatmaps and plots for the segmentation
5
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
483 - Tabular file with information on m/z and pixels: loadings/scores (PCA), toplabels/clusters (k-means), toplabels/classes (spatial shrunken centroids)
25e1e84cfe1b planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents: 4
diff changeset
484 - Optional .RData file which contains the segmentation results and can be used for further exploration in R
4
38afc994e3cc planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
485
0
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
486 ]]>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
487 </help>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
488 <citations>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
489 <citation type="doi">10.1093/bioinformatics/btv146</citation>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
490 </citations>
71eaa6d9d057 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
491 </tool>