annotate msi_qualitycontrol.xml @ 0:845073d506a8 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
author galaxyp
date Tue, 31 Oct 2017 06:00:03 -0400
parents
children c6bc77c4731d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
1 <tool id="Mass_spectrometry_imaging_QC" name="MSI Qualitycontrol" version="1.7.0">
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
2 <description>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
3 mass spectrometry imaging QC
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
4 </description>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
5 <requirements>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
6 <requirement type="package" version="1.7.0">bioconductor-cardinal</requirement>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
7 <requirement type="package" version="2.2.1">r-ggplot2</requirement>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
8 <requirement type="package" version="1.1_2">r-rcolorbrewer</requirement>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
9 <requirement type="package" version="2.2.1"> r-gridextra</requirement>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
10 <requirement type="package" version="2.23_15">r-kernsmooth</requirement>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
11 </requirements>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
12 <command detect_errors="exit_code">
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
13 <![CDATA[
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
14
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
15 #if $infile.ext == 'imzml'
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
16 cp '${infile.extra_files_path}/imzml' infile.imzML &&
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
17 cp '${infile.extra_files_path}/ibd' infile.ibd &&
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
18 #elif $infile.ext == 'analyze75'
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
19 cp '${infile.extra_files_path}/hdr' infile.hdr &&
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
20 cp '${infile.extra_files_path}/img' infile.img &&
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
21 cp '${infile.extra_files_path}/t2m' infile.t2m &&
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
22 #else
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
23 ln -s '$infile' infile.RData &&
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
24 #end if
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
25 cat '${cardinal_qualitycontrol_script}' &&
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
26 Rscript '${cardinal_qualitycontrol_script}'
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
27 ]]>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
28 </command>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
29 <configfiles>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
30 <configfile name="cardinal_qualitycontrol_script"><![CDATA[
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
31
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
32 ################################# load libraries and read file #########################
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
33 library(Cardinal)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
34 library(ggplot2)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
35 library(RColorBrewer)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
36 library(gridExtra)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
37 library(KernSmooth)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
38
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
39 ## Read MALDI Imagind dataset
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
40
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
41 #if $infile.ext == 'imzml'
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
42 msidata <- readMSIData('infile.imzML')
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
43 #elif $infile.ext == 'analyze75'
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
44 msidata <- readMSIData('infile.hdr')
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
45
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
46 #else
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
47 load('infile.RData')
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
48 #end if
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
49
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
50 #if $inputpeptidefile:
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
51 ## Read tabular file with peptide masses for plots and heatmap images:
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
52 input_list = read.delim("$inputpeptidefile", header = FALSE, na.strings=c("","NA", "#NUM!", "#ZAHL!"), stringsAsFactors = FALSE)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
53 #else
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
54 input_list = data.frame(0, 0)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
55 #end if
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
56
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
57 ###################################### file properties in numbers ######################
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
58
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
59 ## Number of features (mz)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
60 maxfeatures = length(features(msidata))
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
61 ## Range mz
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
62 minmz = round(min(mz(msidata)), digits=2)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
63 maxmz = round(max(mz(msidata)), digits=2)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
64 ## Number of spectra (pixels)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
65 pixelcount = length(pixels(msidata))
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
66 ## Range x coordinates
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
67 minimumx = min(coord(msidata)[,1])
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
68 maximumx = max(coord(msidata)[,1])
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
69 ## Range y coordinates
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
70 minimumy = min(coord(msidata)[,2])
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
71 maximumy = max(coord(msidata)[,2])
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
72 ## Range of intensities
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
73 minint = round(min(spectra(msidata)[]), digits=2)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
74 maxint = round(max(spectra(msidata)[]), digits=2)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
75 medint = round(median(spectra(msidata)[]), digits=2)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
76 ## Number of intensities > 0
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
77 npeaks= sum(spectra(msidata)[]>0)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
78 ## Spectra multiplied with mz (potential number of peaks)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
79 numpeaks = ncol(spectra(msidata)[])*nrow(spectra(msidata)[])
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
80 ## Percentage of intensities > 0
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
81 percpeaks = round(npeaks/numpeaks*100, digits=2)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
82 ## Number of empty TICs
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
83 TICs = colSums(spectra(msidata)[])
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
84 NumemptyTIC = sum(TICs == 0)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
85
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
86 ## Processing informations
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
87 processinginfo = processingData(msidata)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
88 centroidedinfo = processinginfo@centroided # TRUE or FALSE
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
89
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
90 ## if TRUE write processinginfo if no write FALSE
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
91
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
92 ## normalization
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
93 if (length(processinginfo@normalization) == 0) {
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
94 normalizationinfo='FALSE'
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
95 } else {
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
96 normalizationinfo=processinginfo@normalization
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
97 }
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
98 ## smoothing
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
99 if (length(processinginfo@smoothing) == 0) {
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
100 smoothinginfo='FALSE'
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
101 } else {
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
102 smoothinginfo=processinginfo@smoothing
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
103 }
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
104 ## baseline
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
105 if (length(processinginfo@baselineReduction) == 0) {
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
106 baselinereductioninfo='FALSE'
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
107 } else {
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
108 baselinereductioninfo=processinginfo@baselineReduction
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
109 }
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
110 ## peak picking
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
111 if (length(processinginfo@peakPicking) == 0) {
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
112 peakpickinginfo='FALSE'
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
113 } else {
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
114 peakpickinginfo=processinginfo@peakPicking
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
115 }
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
116
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
117
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
118 ## calculate how many input peptide masses are valid:
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
119 inputpeptides = input_list[input_list[,1]>minmz & input_list[,1]<maxmz,]
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
120 inputmasses = inputpeptides[,1]
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
121 inputnames = inputpeptides[,2]
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
122
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
123 #############################################################################
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
124
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
125 properties = c("Number of mz features",
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
126 "Range of mz values [Da]",
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
127 "Number of pixels",
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
128 "Range of x coordinates",
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
129 "Range of y coordinates",
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
130 "Range of intensities",
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
131 "Median of intensities",
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
132 "Intensities > 0",
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
133 "Number of zero TICs",
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
134 "Preprocessing",
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
135 "Normalization",
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
136 "Smoothing",
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
137 "Baseline reduction",
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
138 "Peak picking",
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
139 "Centroided",
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
140 "# valid peptidemasses")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
141
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
142 values = c(paste0(maxfeatures),
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
143 paste0(minmz, " - ", maxmz),
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
144 paste0(pixelcount),
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
145 paste0(minimumx, " - ", maximumx),
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
146 paste0(minimumy, " - ", maximumy),
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
147 paste0(minint, " - ", maxint),
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
148 paste0(medint),
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
149 paste0(percpeaks, " %"),
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
150 paste0(NumemptyTIC),
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
151 paste0(" "),
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
152 paste0(normalizationinfo),
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
153 paste0(smoothinginfo),
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
154 paste0(baselinereductioninfo),
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
155 paste0(peakpickinginfo),
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
156 paste0(centroidedinfo),
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
157 paste0(length(inputmasses)))
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
158
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
159
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
160 property_df = data.frame(properties, values)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
161
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
162
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
163 ## Variables for plots
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
164 xrange = 1
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
165 yrange = 1
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
166 maxx = max(coord(msidata)[,1])+xrange
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
167 minx = min(coord(msidata)[,1])-xrange
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
168 maxy = max(coord(msidata)[,2])+yrange
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
169 miny = min(coord(msidata)[,2])-yrange
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
170
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
171
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
172 ####################################### Preparation of images #########################
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
173
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
174 ## Acquisitionorder
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
175
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
176 pixelnumber = 1:pixelcount
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
177 pixelxyarray=cbind(coord(msidata),pixelnumber)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
178
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
179
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
180 ## Number of peaks per pixel
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
181 peaksperpixel = colSums(spectra(msidata)[]> 0)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
182 peakscoordarray=cbind(coord(msidata), peaksperpixel)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
183
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
184 ## Most abundant mz
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
185
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
186 highestmz = apply(spectra(msidata)[],2,which.max)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
187 highestmz_matrix = cbind(coord(msidata),mz(msidata)[highestmz])
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
188 colnames(highestmz_matrix)[3] = "highestmzinDa"
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
189
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
190 ###################################### Preparation of plots ############################
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
191
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
192 ## function without xaxt for plots with automatic x axis
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
193 plot_colorByDensity = function(x1,x2,
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
194 ylim=c(min(x2),max(x2)),
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
195 xlim=c(min(x1),max(x1)),
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
196 xlab="",ylab="",main="") {
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
197
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
198 df <- data.frame(x1,x2)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
199 x <- densCols(x1,x2, colramp=colorRampPalette(c("black", "white")))
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
200 df\$dens <- col2rgb(x)[1,] + 1L
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
201 cols <- colorRampPalette(c("#000099", "#00FEFF", "#45FE4F","#FCFF00", "#FF9400", "#FF3100"))(256)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
202 df\$col <- cols[df\$dens]
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
203 plot(x2~x1, data=df[order(df\$dens),],
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
204 ylim=ylim,xlim=xlim,pch=20,col=col,
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
205 cex=1,xlab=xlab,ylab=ylab,las=1,
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
206 main=main)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
207 }
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
208
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
209 ## Number of peaks per mz - number across all pixel
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
210 peakspermz = rowSums(spectra(msidata)[] > 0 )
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
211
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
212 ## Sum of all intensities for each mz (like TIC, but for mz instead of pixel)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
213 mzTIC = rowSums(spectra(msidata)[]) # calculate intensity sum for each mz
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
214
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
215
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
216
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
217 ######################################## PDF #############################################
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
218 ##########################################################################################
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
219 ##########################################################################################
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
220
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
221
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
222 pdf("qualitycontrol.pdf", fonts = "Times", pointsize = 12)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
223 plot(0,type='n',axes=FALSE,ann=FALSE)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
224 #if not $filename:
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
225 #set $filename = $infile.display_name
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
226 #end if
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
227 title(main=paste("Quality control of MSI data\n\n", "Filename:", "$filename"))
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
228
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
229 ############################# I) numbers ####################################
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
230 #############################################################################
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
231 grid.table(property_df, rows= NULL)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
232
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
233 ############################# II) ion images #################################
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
234 ##############################################################################
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
235
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
236 ## 1) Acquisition image
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
237 (ggplot(pixelxyarray, aes(x=x, y=y, fill=pixelnumber))
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
238 +scale_y_reverse() + geom_tile() + coord_fixed()
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
239 + ggtitle("1) Order of Acquisition")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
240 +theme_bw()
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
241 + scale_fill_gradientn(colours = c("blue", "purple" , "red","orange"),
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
242 space = "Lab", na.value = "black", name = "Acq"))
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
243
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
244 ## 2) Calibrant images:
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
245
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
246
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
247
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
248 if (length(inputmasses) != 0)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
249 { for (mass in 1:length(inputmasses))
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
250
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
251 {
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
252 image(msidata, mz=inputmasses[mass], plusminus=$plusminusinDalton,
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
253 main= paste0("2",LETTERS[mass], ") ", inputnames[mass], " (", round(inputmasses[mass], digits = 2), " Da)"),
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
254 contrast.enhance = "histogram")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
255 }
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
256 } else {print("The inputpeptide masses were outside the mass range")}
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
257
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
258 ## 3) Number of peaks per pixel - image
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
259
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
260 (ggplot(peakscoordarray, aes(x=x, y=y, fill=peaksperpixel), colour=colo)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
261 +scale_y_reverse(lim=c(maxy,miny)) + geom_tile() + coord_fixed()
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
262 + ggtitle("3) Number of peaks per pixel")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
263 + theme_bw()
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
264 + theme(text=element_text(family="ArialMT", face="bold", size=12))
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
265 + scale_fill_gradientn(colours = c("blue", "purple" , "red","orange")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
266 ,space = "Lab", na.value = "black", name = "# peaks"))
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
267
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
268
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
269 ## 4) TIC image
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
270 TICcoordarray=cbind(coord(msidata), TICs)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
271 colo <- colorRampPalette(
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
272 c('blue', 'cyan', 'green', 'yellow','red'))
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
273 (ggplot(TICcoordarray, aes(x=x, y=y, fill=TICs), colour=colo)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
274 +scale_y_reverse(lim=c(maxy,miny)) + geom_tile() + coord_fixed()
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
275 + ggtitle("4) Total Ion Chromatogram")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
276 + theme_bw()
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
277 + theme(text=element_text(family="ArialMT", face="bold", size=12))
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
278 + scale_fill_gradientn(colours = c("blue", "purple" , "red","orange")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
279 ,space = "Lab", na.value = "black", name = "TIC"))
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
280
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
281 ## 5) Most abundant mass image
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
282
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
283 (ggplot(highestmz_matrix, aes(x=x, y=y, fill=highestmzinDa))
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
284 +scale_y_reverse(lim=c(maxy,miny)) + geom_tile() + coord_fixed()
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
285 + ggtitle("5) Most abundant m/z in each pixel")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
286 + theme_bw()
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
287 + scale_fill_gradientn(colours = c("blue", "purple" , "red","orange"), space = "Lab", na.value = "black", name = "m/z",
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
288 labels = as.character(pretty(highestmz_matrix\$highestmzinDa)[c(1,3,5,7)]),
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
289 breaks = pretty(highestmz_matrix\$highestmzinDa)[c(1,3,5,7)], limits=c(min(highestmz_matrix\$highestmzinDa), max(highestmz_matrix\$highestmzinDa)))
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
290 + theme(text=element_text(family="ArialMT", face="bold", size=12)))
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
291
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
292 ## which mz are highest
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
293 highestmz_peptides = names(sort(table(round(highestmz_matrix\$highestmzinDa, digits=0)), decreasing=TRUE)[1])
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
294 highestmz_pixel = which(round(highestmz_matrix\$highestmzinDa, digits=0) == highestmz_peptides)[1]
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
295
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
296 secondhighestmz = names(sort(table(round(highestmz_matrix\$highestmzinDa, digits=0)), decreasing=TRUE)[2])
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
297 secondhighestmz_pixel = which(round(highestmz_matrix\$highestmzinDa, digits=0) == secondhighestmz)[1]
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
298
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
299
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
300
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
301 ## 6) pca image for two components
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
302 pca <- PCA(msidata, ncomp=2)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
303 par(mfrow = c(2,1))
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
304 plot(pca, col=c("black", "darkgrey"), main="6) PCA for two components")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
305 image(pca, ylim = c(-1, maxy), col=c("black", "white"))
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
306
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
307
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
308 ############################# III) properties over acquisition (spectra index)##########
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
309 ##############################################################################
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
310
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
311 par(mfrow = c(2,1), mar=c(5,6,4,2))
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
312
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
313 ## 7a) number of peaks per spectrum - scatterplot
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
314 plot_colorByDensity(pixels(msidata), peaksperpixel, ylab = "", xlab = "", main="7a) Number of peaks per spectrum")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
315 title(xlab="Spectra index \n (= Acquisition time)", line=3)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
316 title(ylab="Number of peaks", line=4)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
317
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
318 ## 7b) number of peaks per spectrum - histogram
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
319 hist(peaksperpixel, main="", las=1, xlab = "Number of peaks per spectrum", ylab="")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
320 title(main="7b) Number of peaks per spectrum", line=2)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
321 title(ylab="Frequency = # spectra", line=4)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
322 abline(v=median(peaksperpixel), col="blue")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
323
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
324 ## 8a) TIC per spectrum - density scatterplot
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
325 zero=0
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
326 par(mfrow = c(2,1), mar=c(5,6,4,2))
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
327 plot_colorByDensity(pixels(msidata), TICs, ylab = "", xlab = "", main="8a) TIC per pixel")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
328 title(xlab="Spectra index \n (= Acquisition time)", line=3)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
329 title(ylab = "Total ion chromatogram intensity", line=4)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
330
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
331 ## 8b) TIC per spectrum - histogram
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
332 hist(log(TICs), main="", las=1, xlab = "log(TIC per spectrum)", ylab="")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
333 title(main= "8b) TIC per spectrum", line=2)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
334 title(ylab="Frequency = # spectra", line=4)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
335 abline(v=median(log(TICs[TICs>0])), col="blue")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
336
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
337
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
338 ## 9) intensity of chosen peptides over acquisition (pixel index)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
339
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
340 if (length(inputmasses) != 0)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
341 {
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
342
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
343 par(mfrow = c(3, 2))
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
344 intensityvector = vector()
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
345 for (mass in 1:length(inputmasses))
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
346 {
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
347 mznumber = features(msidata, mz = inputmasses[mass])
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
348 intensityvector = spectra(msidata)[][mznumber,]
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
349 plot(intensityvector, main=inputnames[mass], xlab="Spectra index \n (= Acquisition time)")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
350 }
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
351 } else {print("The inputpeptide masses were outside the mass range")}
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
352
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
353 ################################## IV) changes over mz ############################
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
354 ###################################################################################
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
355
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
356 ## 10) Number of peaks per mz
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
357
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
358 par(mfrow = c(2,1), mar=c(5,6,4,4.5))
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
359 ## 10a) Number of peaks per mz - scatterplot
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
360 plot_colorByDensity(mz(msidata),peakspermz, main= "10a) Number of peaks for each mz", ylab ="")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
361 title(xlab="mz in Dalton", line=2.5)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
362 title(ylab = "Number of peaks", line=4)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
363 axis(4, at=pretty(peakspermz),labels=as.character(round((pretty(peakspermz)/pixelcount*100), digits=1)), las=1)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
364 mtext("Coverage of spectra [%]", 4, line=3, adj=1)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
365
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
366 # make plot smaller to fit axis and labels, add second y axis with %
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
367 ## 10b) Number of peaks per mz - histogram
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
368 hist(peakspermz, main="", las=1, ylab="", xlab="")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
369 title(ylab = "Frequency", line=4)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
370 title(main="10b) Number of peaks per mz", xlab = "Number of peaks per mz", line=2)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
371 abline(v=median(peakspermz), col="blue")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
372
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
373
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
374 ## 11) Sum of intensities per mz
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
375
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
376 par(mfrow = c(2,1), mar=c(5,6,4,2))
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
377 # 11a) sum of intensities per mz - scatterplot
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
378 plot_colorByDensity(mz(msidata),mzTIC, main= "11a) Sum of all peak intensities for each mz", ylab ="")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
379 title(xlab="mz in Dalton", line=2.5)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
380 title(ylab="Intensity sum", line=4)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
381 # 11b) sum of intensities per mz - histogram
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
382 hist(log(mzTIC), main="", xlab = "", las=1, ylab="")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
383 title(main="11b) Sum of intensities per mz", line=2, ylab="")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
384 title(xlab = "log (sum of intensities per mz)")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
385 title(ylab = "Frequency", line=4)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
386 abline(v=median(log(mzTIC[mzTIC>0])), col="blue")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
387
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
388
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
389
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
390 ################################## V) general plots ############################
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
391 ###################################################################################
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
392
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
393
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
394 ## 12) Intensity distribution
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
395
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
396 par(mfrow = c(2,1), mar=c(5,6,4,2))
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
397
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
398 ## 12a) Intensity histogram:
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
399 hist(log2(spectra(msidata)[]), main="", xlab = "", ylab="", las=1)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
400 title(main="12a) Log2-transformed intensities", line=2)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
401 title(xlab="log2 intensities")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
402 title(ylab="Frequency", line=4)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
403 abline(v=median(log2(spectra(msidata)[(spectra(msidata)>0)])), col="blue")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
404
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
405 ## 12b) Median intensity over spectra
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
406 medianint_spectra = apply(spectra(msidata), 2, median)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
407 plot(medianint_spectra, main="12b) Median intensity per spectrum",las=1, xlab="Spectra index \n (= Acquisition time)", ylab="")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
408 title(ylab="Median spectrum intensity", line=4)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
409
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
410 ## 13) Mass spectra
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
411
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
412 par(mfrow = c(2, 2))
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
413 plot(msidata, pixel = 1:length(pixelnumber), main= "Average spectrum")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
414 plot(msidata, pixel =round(length(pixelnumber)/2, digits=0), main="Spectrum in middle of acquisition")
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
415 plot(msidata, pixel = highestmz_pixel, main= paste0("Spectrum at ", rownames(coord(msidata)[highestmz_pixel,])))
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
416 plot(msidata, pixel = secondhighestmz_pixel, main= paste0("Spectrum at ", rownames(coord(msidata)[secondhighestmz_pixel,])))
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
417
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
418 dev.off()
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
419
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
420 ]]></configfile>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
421 </configfiles>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
422 <inputs>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
423 <param name="infile" type="data" format="imzml, rdata, analyze75" label="Inputfile as imzML, Analyze7.5 or Cardinal MSImageSet saved as RData"
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
424 help="Upload composite datatype imzml (ibd+imzML) or analyze75 (hdr+img+t2m) or regular upload .RData (Cardinal MSImageSet)"/>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
425 <param name="filename" type="text" value="" optional="true" label="Title" help="will appear in the quality report. If nothing given it will take the dataset name."/>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
426 <param name="inputpeptidefile" type="data" optional="true" format="txt, csv" label="Text file with peptidemasses and names"
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
427 help="first column peptide m/z, second column peptide name, tab separated file"/>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
428 <param name="plusminusinDalton" value="0.25" type="text" label="Mass range" help="plusminus mass window in Dalton"/>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
429 </inputs>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
430 <outputs>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
431 <data format="pdf" name="plots" from_work_dir="qualitycontrol.pdf" label="${tool.name} on $infile.display_name"/>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
432 </outputs>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
433 <tests>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
434 <test>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
435 <param name="infile" value="" ftype="imzml">
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
436 <composite_data value="Example_Continuous.imzML" ftype="imzml"/>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
437 <composite_data value="Example_Continuous.ibd" ftype="ibd"/>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
438 </param>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
439 <param name="inputpeptidefile" value="inputpeptides.csv" ftype="csv"/>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
440 <param name="plusminusinDalton" value="0.25"/>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
441 <param name="filename" value="Testfile_imzml"/>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
442 <output name="plots" file="Testfile_qualitycontrol_imzml.pdf" compare="sim_size" delta="20000"/>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
443 </test>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
444 <test>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
445 <param name="infile" value="" ftype="analyze75">
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
446 <composite_data value="Analyze75.hdr" ftype="hdr"/>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
447 <composite_data value="Analyze75.img" ftype="img"/>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
448 <composite_data value="Analyze75.t2m" ftype="t2m"/>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
449 </param>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
450 <param name="inputpeptidefile" value="inputpeptides.txt" ftype="txt"/>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
451 <param name="plusminusinDalton" value="0.5"/>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
452 <param name="filename" value="Testfile_analyze75"/>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
453 <output name="plots" file="Testfile_qualitycontrol_analyze75.pdf" compare="sim_size" delta="20000"/>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
454 </test>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
455 <test>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
456 <param name="infile" value="example_continousS042.RData" ftype="rdata"/>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
457 <param name="inputpeptidefile" value="inputpeptides.csv" ftype="txt"/>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
458 <param name="plusminusinDalton" value="0.1"/>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
459 <param name="filename" value="Testfile_rdata"/>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
460 <output name="plots" file="Testfile_qualitycontrol_rdata.pdf" compare="sim_size" delta="20000"/>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
461 </test>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
462 </tests>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
463 <help>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
464 <![CDATA[
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
465 Quality control for maldi imaging mass spectrometry data.
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
466
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
467 Input data: 3 types of input data can be used:
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
468
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
469 - imzml file (upload imzml and ibd file via the "composite" function) `Introduction to the imzml format <http://ms-imaging.org/wp/introduction/>`_
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
470 - Analyze7.5 (upload hdr, img and t2m file via the "composite" function)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
471 - Cardinal "MSImageSet" data (with variable name "msidata", saved as .RData)
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
472
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
473 Only for continuous imzML so far.
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
474
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
475 The output of this tool contains key values and plots of the imaging data as pdf.
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
476
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
477 ]]>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
478 </help>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
479 <citations>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
480 <citation type="doi">10.1093/bioinformatics/btv146</citation>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
481 </citations>
845073d506a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff changeset
482 </tool>