annotate msi_ion_images.xml @ 4:729a8bf3ffa9 draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
author galaxyp
date Mon, 28 May 2018 12:34:05 -0400
parents e045a8d295eb
children a851b4e8fba7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
1 <tool id="mass_spectrometry_imaging_ion_images" name="MSI ion images" version="1.10.0.0">
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
2 <description>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
3 mass spectrometry imaging heatmaps
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
4 </description>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
5 <requirements>
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
6 <requirement type="package" version="1.10.0">bioconductor-cardinal</requirement>
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
7 <requirement type="package" version="2.2.1">r-gridextra</requirement>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
8 <requirement type="package" version="0.20-35">r-lattice</requirement>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
9 </requirements>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
10 <command detect_errors="aggressive">
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
11 <![CDATA[
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
12 #if $infile.ext == 'imzml'
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
13 ln -s '${infile.extra_files_path}/imzml' infile.imzML &&
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
14 ln -s '${infile.extra_files_path}/ibd' infile.ibd &&
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
15 #elif $infile.ext == 'analyze75'
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
16 ln -s '${infile.extra_files_path}/hdr' infile.hdr &&
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
17 ln -s '${infile.extra_files_path}/img' infile.img &&
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
18 ln -s '${infile.extra_files_path}/t2m' infile.t2m &&
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
19 #else
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
20 ln -s $infile infile.RData &&
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
21 #end if
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
22 cat '${MSI_heatmaps}' &&
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
23 Rscript '${MSI_heatmaps}'
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
24 ]]>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
25 </command>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
26 <configfiles>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
27 <configfile name="MSI_heatmaps"><![CDATA[
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
28
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
29 ################################# load libraries and read file #################
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
30
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
31 library(Cardinal)
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
32 library(gridExtra)
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
33 library(lattice)
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
34
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
35 ## Read MALDI Imaging dataset
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
36
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
37 #if $infile.ext == 'imzml'
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
38 msidata = readImzML('infile')
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
39 #elif $infile.ext == 'analyze75'
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
40 msidata = readAnalyze('infile')
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
41 #else
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
42 load('infile.RData')
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
43 #end if
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
44
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
45
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
46 ###################################### file properties in numbers ##############
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
47
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
48 ## Number of features (mz)
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
49 maxfeatures = length(features(msidata))
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
50 ## Range mz
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
51 minmz = round(min(mz(msidata)), digits=2)
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
52 maxmz = round(max(mz(msidata)), digits=2)
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
53 ## Number of spectra (pixels)
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
54 pixelcount = length(pixels(msidata))
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
55 ## Range x coordinates
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
56 minimumx = min(coord(msidata)[,1])
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
57 maximumx = max(coord(msidata)[,1])
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
58 ## Range y coordinates
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
59 minimumy = min(coord(msidata)[,2])
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
60 maximumy = max(coord(msidata)[,2])
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
61 ## Range of intensities
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
62 minint = round(min(spectra(msidata)[]), digits=2)
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
63 maxint = round(max(spectra(msidata)[]), digits=2)
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
64 medint = round(median(spectra(msidata)[]), digits=2)
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
65 ## Number of intensities > 0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
66 npeaks= sum(spectra(msidata)[]>0)
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
67 ## Spectra multiplied with mz (potential number of peaks)
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
68 numpeaks = ncol(spectra(msidata)[])*nrow(spectra(msidata)[])
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
69 ## Percentage of intensities > 0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
70 percpeaks = round(npeaks/numpeaks*100, digits=2)
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
71 ## Number of empty TICs
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
72 TICs = colSums(spectra(msidata)[])
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
73 NumemptyTIC = sum(TICs == 0)
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
74
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
75 ## Processing informations
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
76 processinginfo = processingData(msidata)
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
77 centroidedinfo = processinginfo@centroided # TRUE or FALSE
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
78
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
79 ## if TRUE write processinginfo if no write FALSE
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
80
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
81 ## normalization
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
82 if (length(processinginfo@normalization) == 0) {
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
83 normalizationinfo='FALSE'
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
84 } else {
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
85 normalizationinfo=processinginfo@normalization
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
86 }
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
87 ## smoothing
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
88 if (length(processinginfo@smoothing) == 0) {
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
89 smoothinginfo='FALSE'
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
90 } else {
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
91 smoothinginfo=processinginfo@smoothing
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
92 }
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
93 ## baseline
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
94 if (length(processinginfo@baselineReduction) == 0) {
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
95 baselinereductioninfo='FALSE'
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
96 } else {
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
97 baselinereductioninfo=processinginfo@baselineReduction
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
98 }
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
99 ## peak picking
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
100 if (length(processinginfo@peakPicking) == 0) {
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
101 peakpickinginfo='FALSE'
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
102 } else {
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
103 peakpickinginfo=processinginfo@peakPicking
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
104 }
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
105
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
106 ##################################### read and filter input masses ##############
2
3ab8917d59cb planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
107
3ab8917d59cb planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
108 input_list = read.delim("$massfile", header = FALSE, stringsAsFactors = FALSE)
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
109
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
110 ### in case input file had only one column with mz values but not names, duplicate mz values and use as names:
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
111
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
112 if (ncol(input_list) == 1)
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
113 {
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
114 input_list = cbind(input_list, input_list)
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
115 }
2
3ab8917d59cb planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
116
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
117 ### calculate how many input masses are valid:
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
118 inputmasses = input_list[input_list[,1]>minmz & input_list[,1]<maxmz,]
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
119
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
120 inputmz = inputmasses[,1]
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
121 inputnames = inputmasses[,2]
1
ce354a40c13c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
122
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
123 if (length(inputmz) == 1)
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
124 {
2
3ab8917d59cb planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
125 countpixels = sum(spectra(msidata)[features(msidata, mz = inputmz), ] >0)
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
126 percentpixels = round(countpixels/pixelcount*100, digits=1)
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
127 valuesdataframe = cbind(inputmz, cbind(countpixels, percentpixels))
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
128 write.table(valuesdataframe, file="$pixel_count", quote = FALSE, row.names = FALSE, col.names=TRUE, sep = "\t")
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
129 }else if (length(inputmz) >1) {
2
3ab8917d59cb planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
130 countpixels = rowSums(spectra(msidata)[features(msidata, mz=inputmz),] >0)
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
131 percentpixels = round(countpixels/pixelcount*100, digits=1)
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
132 valuesdataframe = cbind(inputmz, cbind(countpixels, percentpixels))
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
133 write.table(valuesdataframe, file="$pixel_count", quote = FALSE, row.names = FALSE, col.names=TRUE, sep = "\t")
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
134 }else{
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
135 valuesdataframe = data.frame(0,0)
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
136 write.table(valuesdataframe, file="$pixel_count", quote = FALSE, row.names = FALSE, col.names=TRUE, sep = "\t")
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
137 }
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
138
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
139 ############################ summarize file properties in numbers ##############
1
ce354a40c13c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
140
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
141 properties = c("Number of mz features",
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
142 "Range of mz values [Da]",
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
143 "Number of pixels",
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
144 "Range of x coordinates",
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
145 "Range of y coordinates",
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
146 "Range of intensities",
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
147 "Median of intensities",
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
148 "Intensities > 0",
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
149 "Number of zero TICs",
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
150 "Preprocessing",
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
151 "Normalization",
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
152 "Smoothing",
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
153 "Baseline reduction",
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
154 "Peak picking",
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
155 "Centroided",
2
3ab8917d59cb planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
156 paste0("# valid masses in \n", "$massfile.display_name"))
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
157
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
158 values = c(paste0(maxfeatures),
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
159 paste0(minmz, " - ", maxmz),
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
160 paste0(pixelcount),
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
161 paste0(minimumx, " - ", maximumx),
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
162 paste0(minimumy, " - ", maximumy),
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
163 paste0(minint, " - ", maxint),
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
164 paste0(medint),
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
165 paste0(percpeaks, " %"),
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
166 paste0(NumemptyTIC),
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
167 paste0(" "),
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
168 paste0(normalizationinfo),
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
169 paste0(smoothinginfo),
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
170 paste0(baselinereductioninfo),
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
171 paste0(peakpickinginfo),
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
172 paste0(centroidedinfo),
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
173 paste0(length(inputmz), "/", length(input_list[,1])))
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
174
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
175 property_df = data.frame(properties, values)
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
176
1
ce354a40c13c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
177
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
178 ############################## PDF #############################################
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
179
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
180 pdf("heatmaps.pdf", fonts = "Times", pointsize = 12)
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
181 plot(0,type='n',axes=FALSE,ann=FALSE)
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
182 #if not $filename:
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
183 #set $filename = $infile.display_name
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
184 #end if
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
185 title(main=paste("\nHeatmap images\n\n", "Filename:\n", "$filename"))
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
186
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
187 ############################# I) numbers ####################################
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
188
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
189 grid.table(property_df, rows= NULL)
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
190
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
191 ############################# II) images ####################################
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
192
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
193 ### only plot images when file has peaks and valid input mz:
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
194
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
195 if (npeaks > 0)
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
196 {
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
197 if (length(inputmz) != 0)
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
198 {
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
199 for (mass in 1:length(inputmz))
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
200 {
1
ce354a40c13c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
201 print(image(msidata, mz=inputmz[mass], strip = strip.custom(bg="lightgrey", par.strip.text=list(col="black", cex=.9)),
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
202 lattice=TRUE, plusminus = $plusminus_dalton, contrast.enhance = "$image_contrast", smooth.image = "$image_smoothing",
1
ce354a40c13c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
203 main= paste0(mass, ") ", inputnames[mass], " (", round(inputmz[mass], digits = 2)," ± ", $plusminus_dalton, " Da)")))
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
204 }
1
ce354a40c13c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
205 } else {print("The input masses were invalid")}
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
206 dev.off()
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
207 }else{
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
208 print("inputfile has no intensities > 0")
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
209 dev.off()
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
210 }
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
211 ]]></configfile>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
212 </configfiles>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
213 <inputs>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
214 <param name="infile" type="data" format="imzml,rdata,analyze75" label="Inputfile as imzML, Analyze7.5 or Cardinal MSImageSet saved as RData"
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
215 help="Upload composite datatype imzml (ibd+imzML) or analyze75 (hdr+img+t2m) or regular upload .RData (Cardinal MSImageSet)"/>
2
3ab8917d59cb planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
216 <param name="filename" type="text" value="" label="Title" help="will appear in the quality report. If nothing given it will take the dataset name"/>
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
217 <param name="massfile" type="data" format="tabular" label="Tabular file with masses and names"
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
218 help="first column mass (m/z), second column mass name, tab separated file"/>
2
3ab8917d59cb planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
219 <param name="image_contrast" type="select" label="Select a contrast enhancement function for the heatmap images" help="The 'histogram' equalization method flatterns the distribution of intensities. The hotspot 'suppression' method uses thresholding to reduce the intensities of hotspots">
1
ce354a40c13c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
220 <option value="none" selected="True">none</option>
ce354a40c13c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
221 <option value="suppression">suppression</option>
ce354a40c13c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
222 <option value="histogram">histogram</option>
ce354a40c13c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
223 </param>
2
3ab8917d59cb planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
224 <param name="image_smoothing" type="select" label="Select an image smoothing function for the heatmap images" help="The 'gaussian' smoothing method smooths images with a simple gaussian kernel. The 'adaptive' method uses bilateral filtering to preserve edges">
1
ce354a40c13c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
225 <option value="none" selected="True">none</option>
ce354a40c13c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
226 <option value="gaussian">gaussian</option>
ce354a40c13c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
227 <option value="adaptive">adaptive</option>
ce354a40c13c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
228 </param>
ce354a40c13c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
229 <param name="plusminus_dalton" value="0.25" type="float" label="Mass range" help="plusminus mass window in Dalton"/>
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
230 </inputs>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
231 <outputs>
3
e045a8d295eb planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents: 2
diff changeset
232 <data format="pdf" name="plots" from_work_dir="heatmaps.pdf" label = "${tool.name} ${on_string}"/>
e045a8d295eb planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents: 2
diff changeset
233 <data format="tabular" name="pixel_count" label="Number of peaks (intensity > 0) per mz"/>
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
234 </outputs>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
235 <tests>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
236 <test>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
237 <param name="infile" value="" ftype="imzml">
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
238 <composite_data value="Example_Continuous.imzML"/>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
239 <composite_data value="Example_Continuous.ibd"/>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
240 </param>
1
ce354a40c13c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
241 <param name="massfile" value="inputpeptides.tabular" ftype="tabular"/>
ce354a40c13c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
242 <param name="plusminus_dalton" value="0.25"/>
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
243 <param name="filename" value="Testfile_imzml"/>
1
ce354a40c13c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
244 <param name="image_contrast" value="histogram"/>
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
245 <output name="plots" file="Heatmaps_imzml.pdf" compare="sim_size" delta="20000"/>
2
3ab8917d59cb planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
246 <output name="pixel_count" file="tabular_imzml.tabular"/>
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
247 </test>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
248 <test>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
249 <param name="infile" value="" ftype="analyze75">
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
250 <composite_data value="Analyze75.hdr"/>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
251 <composite_data value="Analyze75.img"/>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
252 <composite_data value="Analyze75.t2m"/>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
253 </param>
1
ce354a40c13c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
254 <param name="massfile" value="inputpeptides2.tabular" ftype="tabular"/>
ce354a40c13c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
255 <param name="plusminus_dalton" value="0.5"/>
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
256 <param name="filename" value="Testfile_analyze75"/>
1
ce354a40c13c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
257 <param name="image_smoothing" value="gaussian"/>
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
258 <output name="plots" file="Heatmaps_analyze75.pdf" compare="sim_size" delta="20000"/>
2
3ab8917d59cb planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
259 <output name="pixel_count" file="tabular_analyze75.tabular"/>
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
260 </test>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
261 <test>
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
262 <param name="infile" value="preprocessed.rdata" ftype="rdata"/>
1
ce354a40c13c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
263 <param name="massfile" value="inputpeptides.tabular" ftype="tabular"/>
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
264 <param name="plusminus_dalton" value="0.5"/>
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
265 <param name="filename" value="Testfile_rdata"/>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
266 <output name="plots" file="Heatmaps_rdata.pdf" compare="sim_size" delta="20000"/>
2
3ab8917d59cb planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
267 <output name="pixel_count" file="tabular_rdata.tabular"/>
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
268 </test>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
269 <test>
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
270 <param name="infile" value="empty_spectra.rdata" ftype="rdata"/>
1
ce354a40c13c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
271 <param name="massfile" value="inputpeptides2.tabular" ftype="tabular"/>
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
272 <param name="plusminus_dalton" value="0.5"/>
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
273 <param name="filename" value="Testfile_rdata"/>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
274 <output name="plots" file="Heatmaps_LM8_file16.pdf" compare="sim_size" delta="20000"/>
2
3ab8917d59cb planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
275 <output name="pixel_count" file="tabular_LM8file16.tabular"/>
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
276 </test>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
277 </tests>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
278 <help><![CDATA[
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
279
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
280
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
281 Cardinal is an R package that implements statistical & computational tools for analyzing mass spectrometry imaging datasets. `More information on Cardinal <http://cardinalmsi.org//>`_
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
282
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
283 This tool uses the Cardinal image function to plot the intensity distribution of interesting masses of mass-spectrometry imaging data.
1
ce354a40c13c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
284 Input data:
ce354a40c13c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
285
ce354a40c13c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
286 3 types of mass-spectrometry imaging data can be used:
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
287
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
288 - imzml file (upload imzml and ibd file via the "composite" function) `Introduction to the imzml format <https://ms-imaging.org/wp/imzml/>`_
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
289 - Analyze7.5 (upload hdr, img and t2m file via the "composite" function)
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
290 - Cardinal "MSImageSet" data (with variable name "msidata", saved as .RData)
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
291
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
292 Tabular file with masses:
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
293
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
294 - tab separated file (.tabular), datatype in Galaxy must be tabular otherwise file will not appear in selection window (if Galaxy auto-detection was wrong, datatype can be changed by pressing button with the pen (edit attributes))
2
3ab8917d59cb planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
295 - first column must contain masses (separate point numbers by point, not comma)
3ab8917d59cb planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents: 1
diff changeset
296 - optionally a second column with names for the masses can be provided
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
297 - no empty fields or letters are allowed in the first column
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
298
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
299 Output:
1
ce354a40c13c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
300
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
301 - Pdf with the heatmap images
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
302 - Tabular with masses that were in the mass range and their occurence over all pixels (absolute and in %)
1
ce354a40c13c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents: 0
diff changeset
303
4
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
304 Troubleshooting:
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
305
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
306 - no heatmaps are plotted when tabular file doesn't fulfill the criteria described above
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
307 - no heatmaps are plotted when the input mass spectrometry imaging file has no intensities > 0
729a8bf3ffa9 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents: 3
diff changeset
308 - out of thetabular file only masses with > 1.5-2% pixel coverage can be used with the contrast enhance and image smoothing functions, as both crash when a mass has not enough intensity values
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
309
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
310 ]]>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
311 </help>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
312 <citations>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
313 <citation type="doi">10.1093/bioinformatics/btv146</citation>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
314 </citations>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
315 </tool>