annotate segmentation_tool.xml @ 0:0c1a9b68f436 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
author galaxyp
date Sat, 24 Feb 2018 13:51:32 -0500
parents
children d4158c9955ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
1 <tool id="mass_spectrometry_imaging_segmentations" name="MSI segmentation" version="1.7.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>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
4 <requirement type="package" version="1.7.0">bioconductor-cardinal</requirement>
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="2.23-15">r-kernsmooth</requirement>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
7 <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
8 </requirements>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
9 <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
10 <![CDATA[
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
11
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
12 #if $infile.ext == 'imzml'
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
13 cp '${infile.extra_files_path}/imzml' infile.imzML &&
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
14 cp '${infile.extra_files_path}/ibd' infile.ibd &&
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
15 #elif $infile.ext == 'analyze75'
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
16 cp '${infile.extra_files_path}/hdr' infile.hdr &&
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
17 cp '${infile.extra_files_path}/img' infile.img &&
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
18 cp '${infile.extra_files_path}/t2m' infile.t2m &&
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
19 #else
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
20 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
21 #end if
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
22 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
23 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
24 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
25
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
26 ]]>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
27 </command>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
28 <configfiles>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
29 <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
30
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
31
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
32 ################################# 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
33
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
34
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
35 library(Cardinal)
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
36 library(gridExtra)
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
37 library(KernSmooth)
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
38 library(lattice)
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 ## 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
41
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
42 #if $infile.ext == 'imzml'
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
43 msidata <- readMSIData('infile.imzML')
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
44 #elif $infile.ext == 'analyze75'
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
45 msidata <- readMSIData('infile.hdr')
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
46 #else
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
47 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
48 #end if
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 ###################################### file properties in numbers ######################
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
51
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
52 ## 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
53 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
54 ## Range mz
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
55 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
56 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
57 ## 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
58 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
59 ## 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
60 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
61 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
62 ## 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
63 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
64 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
65 ## 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
66 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
67 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
68 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
69 ## 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
70 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
71 ## 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
72 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
73 ## 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
74 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
75 ## 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
76 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
77 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
78
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
79
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
80 ## Processing informations
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
81 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
82 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
83
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
84 ## 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
85
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
86 ## normalization
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
87 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
88 normalizationinfo='FALSE'
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
89 } else {
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
90 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
91 }
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
92 ## smoothing
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
93 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
94 smoothinginfo='FALSE'
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
95 } else {
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
96 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
97 }
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
98 ## baseline
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
99 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
100 baselinereductioninfo='FALSE'
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
101 } else {
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
102 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
103 }
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
104 ## peak picking
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
105 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
106 peakpickinginfo='FALSE'
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
107 } else {
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
108 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
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 #############################################################################
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
112
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
113 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
114 "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
115 "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
116 "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
117 "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
118 "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
119 "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
120 "Intensities > 0",
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
121 "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
122 "Preprocessing",
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
123 "Normalization",
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
124 "Smoothing",
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
125 "Baseline reduction",
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
126 "Peak picking",
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
127 "Centroided")
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
128
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
129 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
130 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
131 paste0(pixelcount),
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
132 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
133 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
134 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
135 paste0(medint),
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
136 paste0(percpeaks, " %"),
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
137 paste0(NumemptyTIC),
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
138 paste0(" "),
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
139 paste0(normalizationinfo),
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
140 paste0(smoothinginfo),
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
141 paste0(baselinereductioninfo),
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
142 paste0(peakpickinginfo),
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
143 paste0(centroidedinfo))
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 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
146
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
147
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
148 ######################################## PDF #############################################
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
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
152
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
153 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
154 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
155
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
156 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
157
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 ############################# I) numbers ####################################
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 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
162
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
163 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
164 {
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
165
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 ######################## 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
168 #############################################################################
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
169 #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
170 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
171
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
172
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
173 #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
174 print('pca')
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
175 ##pca
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
176
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 = character()
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
178 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
179 {component_vector[numberofcomponents]= paste0("PC", numberofcomponents)}
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
180 pca <- PCA(msidata, ncomp=$segm_cond.pca_ncomp, column = component_vector, superpose = FALSE,
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
181 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
182
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
183 print(image(pca, main="PCA image", lattice=TRUE, strip = strip.custom(bg="lightgrey", par.strip.text=list(col="black", cex=.9)), contrast.enhance = "$segm_cond.pca_imagecontrast", smooth.image = "$segm_cond.pca_imagesmoothing", col=colourvector))
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
184 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
185
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
186
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
187 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
188 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
189
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
190 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
191 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
192
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
193 #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
194 print('kmeans')
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
195 ##k-means
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
196
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
197 skm <- spatialKMeans(msidata, r=$segm_cond.kmeans_r, k=$segm_cond.kmeans_k, method="$segm_cond.kmeans_method")
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
198 print(image(skm, key=TRUE, main="K-means clustering", lattice=TRUE, strip = strip.custom(bg="lightgrey", par.strip.text=list(col="black", cex=.9)), contrast.enhance = "$segm_cond.kmeans_imagecontrast", col= colourvector, smooth.image = "$segm_cond.kmeans_imagesmoothing"))
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
199 print(plot(skm, main="K-means 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
200
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
201
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
202 skm_clusters = (skm@resultData\$r\$cluster)
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
203 skm_toplabels = topLabels(skm, n=500)
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
204
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
205 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
206 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
207
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 #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
210 print('centroids')
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
211 ##centroids
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 ssc <- spatialShrunkenCentroids(msidata, r=$segm_cond.centroids_r, k=$segm_cond.centroids_k, s=$segm_cond.centroids_s, method="$segm_cond.centroids_method")
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
214 print(image(ssc, key=TRUE, main="Spatial shrunken centroids", lattice=TRUE, strip = strip.custom(bg="lightgrey", par.strip.text=list(col="black", cex=.9)), contrast.enhance = "$segm_cond.centroids_imagecontrast", col= colourvector, smooth.image = "$segm_cond.centroids_imagesmoothing"))
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
215 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))))
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
216
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
217 ssc_classes = (ssc@resultData\$r\$classes)
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
218 ssc_toplabels = topLabels(ssc, n=500)
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
219
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
220 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
221 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
222
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
223
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
224 #end if
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
225
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
226 dev.off()
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
227
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
228 }else{
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
229 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
230 dev.off()
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 ]]></configfile>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
234 </configfiles>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
235 <inputs>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
236 <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
237 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
238 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
239 <conditional name="segm_cond">
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
240 <param name="segmentationtool" type="select" label="Select the tool for spatial clustering.">
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
241 <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
242 <option value="kmeans">k-means</option>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
243 <option value="centroids">shrunken centroids</option>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
244 </param>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
245 <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
246 <param name="pca_ncomp" type="integer" value="2"
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
247 label="The number of principal components to calculate."/>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
248 <param name="pca_method" type="select"
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
249 label="The function used to calculate the singular value decomposition.">
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="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
251 <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
252 </param>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
253 <param name="pca_scale" type="select" display="radio" optional="False"
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
254 label="Shoud the data be scaled first?">
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
255 <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
256 <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
257 </param>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
258 <param name="pca_imagecontrast" type="select" label="Select a contrast enhancement function." help="The 'histogram' equalization method flatterns the distribution of intensities. The hotspot 'suppression' method uses thresholding to reduce the intensities of hotspots">
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="none" selected="True">none</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="suppression">suppression</option>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
261 <option value="histogram">histogram</option>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
262 </param>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
263 <param name="pca_imagesmoothing" type="select" label="Select an image smoothing function." help="The 'gaussian' smoothing method smooths images with a simple gaussian kernel. The 'adaptive' method uses bilateral filtering to preserve edges.">
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="none" selected="True">none</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="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
266 <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
267 </param>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
268 </when>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
269
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
270 <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
271 <param name="kmeans_r" type="text" value="2"
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
272 label="The spatial neighborhood radius of nearby pixels to consider (r)."/>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
273 <param name="kmeans_k" type="text" value="3"
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
274 label="The number of clusters (k)."/>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
275 <param name="kmeans_method" type="select" display="radio"
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
276 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.">
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="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
278 <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
279 </param>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
280 <param name="kmeans_imagecontrast" type="select" label="Select a contrast enhancement function." help="The 'histogram' equalization method flatterns the distribution of intensities. The hotspot 'suppression' method uses thresholding to reduce the intensities of hotspots">
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
281 <option value="none" selected="True">none</option>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
282 <option value="suppression">suppression</option>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
283 <option value="histogram">histogram</option>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
284 </param>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
285 <param name="kmeans_imagesmoothing" type="select" label="Select an image smoothing function." help="The 'gaussian' smoothing method smooths images with a simple gaussian kernel. The 'adaptive' method uses bilateral filtering to preserve edges.">
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
286 <option value="none" selected="True">none</option>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
287 <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
288 <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
289 </param>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
290 </when>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
291
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
292 <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
293 <param name="centroids_r" type="text" value="2"
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
294 label="The spatial neighborhood radius of nearby pixels to consider (r)."/>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
295 <param name="centroids_k" type="text" value="5"
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
296 label="The initial number of clusters (k)."/>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
297 <param name="centroids_s" type="integer" value="2"
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
298 label="The sparsity thresholding parameter by which to shrink the t-statistics (s)."
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
299 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."/>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
300 <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.">
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
301 <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
302 <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
303 </param>
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="centroids_imagecontrast" type="select" label="Select a contrast enhancement function." help="The 'histogram' equalization method flatterns the distribution of intensities. The hotspot 'suppression' method uses thresholding to reduce the intensities of hotspots">
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
305 <option value="none" selected="True">none</option>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
306 <option value="suppression">suppression</option>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
307 <option value="histogram">histogram</option>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
308 </param>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
309 <param name="centroids_imagesmoothing" type="select" label="Select an image smoothing function." help="The 'gaussian' smoothing method smooths images with a simple gaussian kernel. The 'adaptive' method uses bilateral filtering to preserve edges.">
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
310 <option value="none" selected="True">none</option>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
311 <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
312 <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
313 </param>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
314 </when>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
315 </conditional>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
316 <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
317 <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
318 <sanitizer>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
319 <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
320 <add value="#" />
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
321 </valid>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
322 </sanitizer>
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 </repeat>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
325 </inputs>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
326 <outputs>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
327 <data format="pdf" name="segmentationimages" from_work_dir="segmentationpdf.pdf" label = "${tool.name} on $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
328 <data format="tabular" name="mzfeatures" label="mzfeatures ${tool.name} on $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
329 <data format="tabular" name="pixeloutput" label="pixels ${tool.name} on $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
330 </outputs>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
331 <tests>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
332 <test>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
333 <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
334 <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
335 <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
336 </param>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
337 <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
338 <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
339 <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
340 </repeat>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
341 <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
342 <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
343 </repeat>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
344 <output name="segmentationimages" file="pca_imzml.pdf" compare="sim_size" delta="20000"/>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
345 <output name="mzfeatures" file="pcaloadings_results1.txt" compare="sim_size"/>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
346 <output name="pixeloutput" file="pcascores_results1.txt" compare="sim_size"/>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
347 </test>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
348 <test>
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="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
350 <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
351 <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
352 <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
353 </param>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
354 <param name="segmentationtool" value="kmeans"/>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
355 <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
356 <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
357 </repeat>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
358 <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
359 <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
360 </repeat>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
361 <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
362 <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
363 </repeat>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
364 <output name="segmentationimages" file="kmeans_imzml.pdf" compare="sim_size" delta="20000"/>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
365 <output name="mzfeatures" file="toplabels_results1.txt" compare="sim_size"/>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
366 <output name="pixeloutput" file="cluster_results1.txt" compare="sim_size"/>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
367 </test>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
368 <test>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
369 <param name="infile" value="preprocessing_results1.RData" ftype="rdata"/>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
370 <param name="segmentationtool" value="centroids"/>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
371 <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
372 <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
373 </repeat>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
374 <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
375 <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
376 </repeat>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
377 <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
378 <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
379 </repeat>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
380 <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
381 <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
382 </repeat>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
383 <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
384 <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
385 </repeat>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
386 <output name="segmentationimages" file="centroids_imzml.pdf" compare="sim_size" delta="20000"/>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
387 <output name="mzfeatures" file="toplabels_results1.txt" compare="sim_size"/>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
388 <output name="pixeloutput" file="classes_results1.txt" compare="sim_size"/>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
389 </test>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
390 </tests>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
391 <help>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
392 <![CDATA[
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
393
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
394 Spatially aware segmentation of mass-spectrometry imaging data by unsupervised clustering algorithms. Underlying structures can be identified with the following tools: pca, k-means clustering and spatial shrunken centroids. The spatialShrunkenCentroids method allows the number of segments to decrease according to the data. This allows automatic selection of the number
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
395 of clusters.
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
396
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
397 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
398
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
399 - imzml file (upload imzml and ibd file via the "composite" function) `Introduction to the imzml format <http://ms-imaging.org/wp/introduction/>`_
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
400 - 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
401 - 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
402
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
403 The output of this tool contains a pdf with plots from the segmentation tools.
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
404 ]]>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
405 </help>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
406 <citations>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
407 <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
408 </citations>
0c1a9b68f436 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit da5a0723327f7cce689b230ccd69f3edecb1bc6b
galaxyp
parents:
diff changeset
409 </tool>