annotate msi_ion_images.xml @ 0:8ae9894fc55f draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
author galaxyp
date Mon, 27 Nov 2017 13:48:44 -0500
parents
children ce354a40c13c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
1 <tool id="mass_spectrometry_imaging_ion_images" name="MSI ion images" version="1.7.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>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
6 <requirement type="package" version="1.7.0">bioconductor-cardinal</requirement>
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="2.23-15">r-kernsmooth</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 <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
10 </requirements>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
11 <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
12 <![CDATA[
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
13 #if $infile.ext == 'imzml'
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
14 cp '${infile.extra_files_path}/imzml' infile.imzML &&
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
15 cp '${infile.extra_files_path}/ibd' infile.ibd &&
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
16 #elif $infile.ext == 'analyze75'
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
17 cp '${infile.extra_files_path}/hdr' infile.hdr &&
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
18 cp '${infile.extra_files_path}/img' infile.img &&
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
19 cp '${infile.extra_files_path}/t2m' infile.t2m &&
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
20 #else
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
21 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
22 #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
23 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
24 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
25 ]]>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
26 </command>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
27 <configfiles>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
28 <configfile name="MSI_heatmaps"><![CDATA[
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
29 ################################# load libraries and read file #########################
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(KernSmooth)
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
34 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
35
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
36 ## 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
37
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
38 #if $infile.ext == 'imzml'
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
39 msidata <- readMSIData('infile.imzML')
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
40 #elif $infile.ext == 'analyze75'
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
41 msidata <- readMSIData('infile.hdr')
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
42 #else
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
43 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
44 #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
45
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
46 #if $massfile:
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
47 ### Read tabular file with peptide masses for plots and heatmap images:
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
48 input_list = read.delim("$massfile", header = FALSE, na.strings=c("","NA", "#NUM!", "#ZAHL!"), stringsAsFactors = FALSE)
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
49 if (ncol(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
50 {
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
51 input_list = cbind(input_list, input_list)
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
52 }
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
53 #else
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
54 input_list = data.frame(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
55 #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
56 colnames(input_list)[1:2] = c("mz", "name")
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
57
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
58 ###################################### file properties in numbers ######################
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
59
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
60 ## 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
61 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
62 ## 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
63 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
64 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
65 ## 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
66 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
67 ## 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
68 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
69 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
70 ## 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
71 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
72 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
73 ## 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
74 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
75 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
76 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
77 ## 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
78 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
79 ## 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
80 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
81 ## 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
82 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
83 ## 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
84 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
85 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
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 ## 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
88 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
89 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
90
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
91 ## 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
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 ## normalization
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@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
95 normalizationinfo='FALSE'
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 {
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
97 normalizationinfo=processinginfo@normalization
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 ## smoothing
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@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
101 smoothinginfo='FALSE'
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 {
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
103 smoothinginfo=processinginfo@smoothing
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 ## baseline
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
106 if (length(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
107 baselinereductioninfo='FALSE'
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
108 } else {
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
109 baselinereductioninfo=processinginfo@baselineReduction
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
110 }
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
111 ## 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
112 if (length(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
113 peakpickinginfo='FALSE'
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
114 } else {
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
115 peakpickinginfo=processinginfo@peakPicking
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
116 }
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
117
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
118 ### calculate how many input masses are valid:
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
119 inputmasses = input_list[input_list[,1]>minmz & input_list[,1]<maxmz,]
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
120
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
121 inputmz = inputmasses[,1]
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
122 inputnames = inputmasses[,2]
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
123
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
124 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
125 "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
126 "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
127 "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
128 "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
129 "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
130 "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
131 "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
132 "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
133 "Preprocessing",
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
134 "Normalization",
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
135 "Smoothing",
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
136 "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
137 "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
138 "Centroided",
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
139 paste0("# valid masses in ", "$filename"))
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
140
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
141 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
142 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
143 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
144 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
145 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
146 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
147 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
148 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
149 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
150 paste0(" "),
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
151 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
152 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
153 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
154 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
155 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
156 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
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 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
159
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
160 ######################################## PDF #############################################
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
161 ##########################################################################################
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
162 ##########################################################################################
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
163
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
164
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
165 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
166 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
167 #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
168 #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
169 #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
170 title(main=paste("Quality control of MSI data\n\n", "Filename:", "$filename"))
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
171
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
172 ############################# 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
173 #############################################################################
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 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
176
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
177 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
178 {
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
179 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
180 {
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
181 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
182 {
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
183 print(image(msidata, mz=inputmz[mass], strip = strip.custom(bg="lightgrey", par.strip.text=list(col="black", cex=.9)),
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
184 lattice=TRUE, ylim = c(maximumy+1,minimumy-1), plusminus = $plusminusinDalton, contrast.enhance = "histogram",
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
185 main= paste0(mass, ") ", inputnames[mass], " (", round(inputmz[mass], digits = 2)," ± ", $plusminusinDalton, " Da)")))
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 } else {print("The input masses were outside the mass range")}
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 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
190
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
191 }else{
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
192 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
193 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
194 }
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
195 ]]></configfile>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
196 </configfiles>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
197 <inputs>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
198 <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
199 help="Upload composite datatype imzml (ibd+imzML) or analyze75 (hdr+img+t2m) or regular upload .RData (Cardinal MSImageSet)"/>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
200 <param name="filename" type="text" value="" label="Title" help="will appear in the quality report. If nothing given it will take the dataset name."/>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
201 <param name="massfile" type="data" optional="true" format="tabular" label="Text file with masses and names"
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
202 help="first column mass (m/z), second column mass name, tab separated file"/>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
203 <param name="plusminusinDalton" value="0.25" type="float" label="Mass range" help="plusminus mass window in Dalton"/>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
204 </inputs>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
205 <outputs>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
206 <data format="pdf" name="plots" from_work_dir="heatmaps.pdf" label = "${tool.name} on $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
207 </outputs>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
208 <tests>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
209 <test>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
210 <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
211 <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
212 <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
213 </param>
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="massfile" value="inputpeptides.csv" ftype="tabular"/>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
215 <param name="plusminusinDalton" value="0.25"/>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
216 <param name="filename" value="Testfile_imzml"/>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
217 <output name="plots" file="Heatmaps_imzml.pdf" compare="sim_size" delta="20000"/>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
218 </test>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
219
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
220 <test>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
221 <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
222 <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
223 <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
224 <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
225 </param>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
226 <param name="massfile" value="inputpeptides.txt" ftype="tabular"/>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
227 <param name="plusminusinDalton" value="0.5"/>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
228 <param name="filename" value="Testfile_analyze75"/>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
229 <output name="plots" file="Heatmaps_analyze75.pdf" compare="sim_size" delta="20000"/>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
230 </test>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
231 <test>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
232 <param name="infile" value="preprocessing_results1.RData" ftype="rdata"/>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
233 <param name="massfile" value="inputpeptides.csv" ftype="tabular"/>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
234 <param name="plusminusinDalton" value="0.1"/>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
235 <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
236 <output name="plots" file="Heatmaps_rdata.pdf" compare="sim_size" delta="20000"/>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
237 </test>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
238 <test>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
239 <param name="infile" value="LM8_file16.rdata" ftype="rdata"/>
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 name="massfile" value="inputpeptides.txt" ftype="tabular"/>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
241 <param name="plusminusinDalton" value="0.1"/>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
242 <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
243 <output name="plots" file="Heatmaps_LM8_file16.pdf" compare="sim_size" delta="20000"/>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
244 </test>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
245 </tests>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
246 <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
247
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
248 Heatmaps for different ion masses in mass-spectrometry imaging data.
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
249
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
250 Input data: 3 types of input data can be used:
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
251
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
252 - imzml file (upload imzml and ibd file via the "composite" function) `Introduction to the imzml format <http://ms-imaging.org/wp/introduction/>`_
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
253 - 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
254 - 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
255
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
256 The output of this tool contains heatmaps for every ion mass of interest as pdf.
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
257
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
258 ]]>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
259 </help>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
260 <citations>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
261 <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
262 </citations>
8ae9894fc55f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit 6d271de132f364b1e16b0222ad2d6e315586f0dd
galaxyp
parents:
diff changeset
263 </tool>