annotate segmentation_tool.xml @ 4:aec189b0c64d draft

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