Mercurial > repos > galaxyp > msi_qualitycontrol
annotate msi_qualitycontrol.xml @ 14:7c7c39b9ec4a draft
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
author | galaxyp |
---|---|
date | Tue, 24 Jul 2018 04:53:25 -0400 |
parents | 88e12d270e35 |
children | 2d69460669ae |
rev | line source |
---|---|
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1 <tool id="mass_spectrometry_imaging_qc" name="MSI Qualitycontrol" version="1.10.0.5"> |
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> |
8
52ef77866de8
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
7
diff
changeset
|
6 <requirement type="package" version="1.10.0">bioconductor-cardinal</requirement> |
0
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> |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
9 <requirement type="package" version="2.2.1">r-gridextra</requirement> |
0
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> |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
11 <requirement type="package" version="0.5.0">r-scales</requirement> |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
12 </requirements> |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
13 <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
|
14 <![CDATA[ |
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' |
8
52ef77866de8
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
7
diff
changeset
|
16 ln -s '${infile.extra_files_path}/imzml' infile.imzML && |
52ef77866de8
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
7
diff
changeset
|
17 ln -s '${infile.extra_files_path}/ibd' infile.ibd && |
0
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' |
8
52ef77866de8
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
7
diff
changeset
|
19 ln -s '${infile.extra_files_path}/hdr' infile.hdr && |
52ef77866de8
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
7
diff
changeset
|
20 ln -s '${infile.extra_files_path}/img' infile.img && |
52ef77866de8
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
7
diff
changeset
|
21 ln -s '${infile.extra_files_path}/t2m' infile.t2m && |
0
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 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
32 ################################# load libraries and read file ################# |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
33 |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
34 library(Cardinal) |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
35 library(ggplot2) |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
36 library(RColorBrewer) |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
37 library(gridExtra) |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
38 library(KernSmooth) |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
39 library(scales) |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
40 |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
41 |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
42 #if $infile.ext == 'imzml' |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
43 #if str($processed_cond.processed_file) == "processed": |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
44 msidata <- readImzML('infile', mass.accuracy=$processed_cond.accuracy, units.accuracy = "$processed_cond.units") |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
45 #else |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
46 msidata <- readImzML('infile') |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
47 #end if |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
48 #elif $infile.ext == 'analyze75' |
8
52ef77866de8
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
7
diff
changeset
|
49 msidata = readAnalyze('infile') |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
50 #else |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
51 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
|
52 #end if |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
53 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
54 ## create full matrix to make processed imzML files compatible with segmentation and other steps |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
55 iData(msidata) <- iData(msidata)[] |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
56 |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
57 ## remove duplicated coordinates |
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
58 print(paste0(sum(duplicated(coord(msidata))), " duplicated coordinates were removed")) |
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
59 msidata <- msidata[,!duplicated(coord(msidata))] |
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
60 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
61 ## optional annotation from tabular file to obtain pixel groups (otherwise all pixels are considered to be one sample) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
62 |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
63 #if str($tabular_annotation.load_annotation) == 'yes_annotation': |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
64 |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
65 ## read and extract x,y,annotation information |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
66 input_tabular = read.delim("$tabular_annotation.annotation_file", header = TRUE, stringsAsFactors = FALSE) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
67 annotation_input = input_tabular[,c($tabular_annotation.column_x, $tabular_annotation.column_y, $tabular_annotation.column_names)] |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
68 annotation_name = colnames(annotation_input)[3] ##extract header for annotations to later export tabular with same name |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
69 colnames(annotation_input) = c("x", "y", "annotation") ## rename annotations header to default name "annotation" |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
70 |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
71 ## merge with coordinate information of msidata |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
72 msidata_coordinates = cbind(coord(msidata)[,1:2], c(1:ncol(msidata))) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
73 colnames(msidata_coordinates)[3] = "pixel_index" |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
74 merged_annotation = merge(msidata_coordinates, annotation_input, by=c("x", "y"), all.x=TRUE) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
75 merged_annotation[is.na(merged_annotation)] = "NA" |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
76 merged_annotation = merged_annotation[order(merged_annotation\$pixel_index),] |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
77 msidata\$annotation = as.factor(merged_annotation[,4]) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
78 |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
79 #end if |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
80 |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
81 ###################################### 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
|
82 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
83 ## Number of features (m/z) |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
84 maxfeatures = length(features(msidata)) |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
85 ## Range m/z |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
86 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
|
87 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
|
88 ## 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
|
89 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
|
90 ## 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
|
91 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
|
92 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
|
93 ## 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
|
94 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
|
95 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
|
96 ## Range of intensities |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
97 minint = round(min(spectra(msidata)[], na.rm=TRUE), digits=2) |
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
98 maxint = round(max(spectra(msidata)[], na.rm=TRUE), digits=2) |
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
99 medint = round(median(spectra(msidata)[], na.rm=TRUE), digits=2) |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
100 ## Number of intensities > 0 |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
101 npeaks= sum(spectra(msidata)[]>0, na.rm=TRUE) |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
102 ## Spectra multiplied with m/z (potential number of peaks) |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
103 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
|
104 ## 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
|
105 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
|
106 ## Number of empty TICs |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
107 TICs = colSums(spectra(msidata)[], na.rm=TRUE) |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
108 NumemptyTIC = sum(TICs == 0) |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
109 ## Median TIC |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
110 medTIC = round(median(TICs), digits=2) |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
111 ## Median peaks per spectrum |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
112 medpeaks = median(colSums(spectra(msidata)[]>0, na.rm=TRUE), na.rm=TRUE) |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
113 print(cor(TICs,colSums(spectra(msidata)[]>0), method="pearson")) |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
114 |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
115 ## Processing informations |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
116 processinginfo = processingData(msidata) |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
117 centroidedinfo = processinginfo@centroided |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
118 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
119 ## if TRUE write processinginfo if FALSE write FALSE |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
120 |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
121 ## normalization |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
122 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
|
123 normalizationinfo='FALSE' |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
124 } else { |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
125 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
|
126 } |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
127 ## smoothing |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
128 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
|
129 smoothinginfo='FALSE' |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
130 } else { |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
131 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
|
132 } |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
133 ## baseline |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
134 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
|
135 baselinereductioninfo='FALSE' |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
136 } else { |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
137 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
|
138 } |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
139 ## peak picking |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
140 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
|
141 peakpickinginfo='FALSE' |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
142 } else { |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
143 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
|
144 } |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
145 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
146 ############## Read and filter tabular file with m/z ########################### |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
147 |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
148 ### reading calibrant file: |
4
fef8bd551236
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents:
3
diff
changeset
|
149 |
fef8bd551236
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents:
3
diff
changeset
|
150 #if $calibrant_file: |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
151 |
4
fef8bd551236
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents:
3
diff
changeset
|
152 calibrant_list = read.delim("$calibrant_file", header = FALSE, na.strings=c("","NA"), stringsAsFactors = FALSE) |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
153 if (ncol(calibrant_list) == 1) |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
154 {calibrant_list = cbind(calibrant_list, calibrant_list)} ## if there is just one column dublicate it to have a names column |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
155 |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
156 ### calculate how many input calibrant m/z are valid: |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
157 |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
158 inputcalibrants = calibrant_list[calibrant_list[,1]>minmz & calibrant_list[,1]<maxmz,] |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
159 number_calibrants_in = length(calibrant_list[,1]) |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
160 number_calibrants_valid = length(inputcalibrants[,1]) |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
161 |
4
fef8bd551236
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents:
3
diff
changeset
|
162 #else |
5
ac786240ef07
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents:
4
diff
changeset
|
163 |
ac786240ef07
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents:
4
diff
changeset
|
164 inputcalibrants = as.data.frame(matrix(, nrow = 0, ncol = 2)) |
4
fef8bd551236
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents:
3
diff
changeset
|
165 number_calibrants_in = 0 |
fef8bd551236
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents:
3
diff
changeset
|
166 number_calibrants_valid = 0 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
167 |
4
fef8bd551236
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents:
3
diff
changeset
|
168 #end if |
fef8bd551236
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents:
3
diff
changeset
|
169 |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
170 ## rename input dataframe and extract m/z |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
171 colnames(inputcalibrants) = c("m/z", "name") |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
172 inputcalibrantmasses = inputcalibrants[,1] |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
173 |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
174 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
175 ######################################## PDF ############################################# |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
176 ########################################################################################## |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
177 ########################################################################################## |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
178 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
179 pdf("qualitycontrol.pdf", fonts = "Times", pointsize = 12) |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
180 plot(0,type='n',axes=FALSE,ann=FALSE) |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
181 |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
182 ## if no filename is given, name of file in Galaxy history is used |
5
ac786240ef07
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
galaxyp
parents:
4
diff
changeset
|
183 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
184 #if not $filename: |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
185 #set $filename = $infile.display_name |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
186 #end if |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
187 |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
188 title(main=paste("$filename")) |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
189 |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
190 ################# I) file properties in numbers ################################ |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
191 ################################################################################ |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
192 print("properties in numbers") |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
193 |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
194 properties = c("Number of m/z features", |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
195 "Range of m/z values", |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
196 "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
|
197 "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
|
198 "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
|
199 "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
|
200 "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
|
201 "Intensities > 0", |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
202 "Number of empty spectra", |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
203 "Median TIC", |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
204 "Median # peaks per spectrum", |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
205 "Normalization", |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
206 "Smoothing", |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
207 "Baseline reduction", |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
208 "Peak picking", |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
209 "Centroided", |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
210 paste0("calibrants (#valid/#input) in \n", "$calibrant_file.display_name")) |
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 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
|
213 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
|
214 paste0(pixelcount), |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
215 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
|
216 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
|
217 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
|
218 paste0(medint), |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
219 paste0(percpeaks, " %"), |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
220 paste0(NumemptyTIC), |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
221 paste0(medTIC), |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
222 paste0(medpeaks), |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
223 paste0(normalizationinfo), |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
224 paste0(smoothinginfo), |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
225 paste0(baselinereductioninfo), |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
226 paste0(peakpickinginfo), |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
227 paste0(centroidedinfo), |
4
fef8bd551236
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents:
3
diff
changeset
|
228 paste0(number_calibrants_valid, " / ", number_calibrants_in)) |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
229 |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
230 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
|
231 |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
232 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
|
233 |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
234 ####################### II) x-y images ####################################### |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
235 ############################################################################## |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
236 print("x-y images") |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
237 |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
238 ## only do plots for file with intensity peaks |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
239 if (npeaks > 0){ |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
240 ## function for density plots |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
241 plot_colorByDensity = function(x1,x2, |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
242 ylim=c(min(x2),max(x2)), |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
243 xlim=c(min(x1),max(x1)), |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
244 xlab="",ylab="",main=""){ |
4
fef8bd551236
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents:
3
diff
changeset
|
245 df = data.frame(x1,x2) |
fef8bd551236
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents:
3
diff
changeset
|
246 x = densCols(x1,x2, colramp=colorRampPalette(c("black", "white"))) |
fef8bd551236
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents:
3
diff
changeset
|
247 df\$dens = col2rgb(x)[1,] + 1L |
fef8bd551236
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents:
3
diff
changeset
|
248 cols = colorRampPalette(c("#000099", "#00FEFF", "#45FE4F","#FCFF00", "#FF9400", "#FF3100"))(256) |
fef8bd551236
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents:
3
diff
changeset
|
249 df\$col = cols[df\$dens] |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
250 plot(x2~x1, data=df[order(df\$dens),], ylim=ylim,xlim=xlim,pch=20,col=col, |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
251 cex=1,xlab=xlab,ylab=ylab,las=1, main=main)} |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
252 |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
253 ## start list for optional spectrum values output |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
254 spectrum_list = list() |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
255 list_count = 1 |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
256 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
257 ################### 0) overview for combined data ########################### |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
258 |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
259 ### only for previously combined data, same plot as in combine QC pdf |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
260 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
261 if (!is.null(levels(msidata\$annotation))){ |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
262 number_combined = length(levels(msidata\$annotation)) |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
263 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
264 ## the more annotation groups a file has the smaller will be the legend |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
265 if (number_combined<20){ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
266 legend_size = 10 |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
267 cex_boxplot = 1 |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
268 }else if (number_combined>20 && number_combined<40){ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
269 legend_size = 9 |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
270 cex_boxplot = 0.8 |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
271 }else if (number_combined>40 && number_combined<60){ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
272 legend_size = 8 |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
273 cex_boxplot = 0.6 |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
274 }else if (number_combined>60 && number_combined<100){ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
275 legend_size = 7 |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
276 cex_boxplot = 0.5 |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
277 }else{ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
278 legend_size = 6 |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
279 cex_boxplot = 0.3 |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
280 } |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
281 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
282 position_df = cbind(coord(msidata)[,1:2], msidata\$annotation) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
283 colnames(position_df)[3] = annotation_name |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
284 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
285 ## append list for optional tabular output with spectrum values |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
286 spectrum_list[[list_count]] = position_df |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
287 list_count = list_count+1 |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
288 |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
289 colnames(position_df)[3] = "Annotation" |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
290 combine_plot = ggplot(position_df, aes(x=x, y=y, fill=Annotation))+ |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
291 geom_tile() + |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
292 coord_fixed()+ |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
293 ggtitle("Spatial orientation of combined data")+ |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
294 theme_bw()+ |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
295 theme(plot.title = element_text(hjust = 0.5))+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
296 theme(text=element_text(family="ArialMT", face="bold", size=12))+ |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
297 theme(legend.position="bottom",legend.direction="vertical")+ |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
298 theme(legend.key.size = unit(0.2, "line"), legend.text = element_text(size = legend_size))+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
299 guides(fill=guide_legend(ncol=5,byrow=TRUE)) |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
300 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
301 print(combine_plot) |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
302 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
303 ### order pixels according to annotation - this gives a new pixel/spectra index order according to the annotation groups |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
304 pixel_name_df = data.frame(pixels(msidata), msidata\$annotation) |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
305 colnames(pixel_name_df) = c("pixel_number", "pixel_name") |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
306 |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
307 pixel_name_df_ordered = pixel_name_df[order(pixel_name_df\$pixel_name),] |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
308 pixel_name_df_ordered\$annotated_order = 1:ncol(msidata) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
309 last_pixel = aggregate(annotated_order~pixel_name, data = pixel_name_df_ordered, max) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
310 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
311 pixel_vector = last_pixel[,2] |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
312 abline_vector = pixel_vector[1:number_combined-1] |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
313 print(abline_vector) |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
314 } |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
315 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
316 ################### 1) Pixel order image ################################### |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
317 |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
318 pixelnumber = 1:pixelcount |
6
5c63fe03ed9e
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
5
diff
changeset
|
319 pixelxyarray=cbind(coord(msidata)[,1:2],pixelnumber) |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
320 gg_title = "Pixel order" |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
321 |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
322 ## order pixels according to annotation groups if annotations are provided |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
323 if (!is.null(levels(msidata\$annotation))){ |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
324 pixelxyarray = pixelxyarray[match(pixel_name_df_ordered\$pixel_number, pixelxyarray\$pixelnumber),] |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
325 pixelxyarray\$pixelnumber = 1:ncol(msidata) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
326 gg_title = "Pixel ordered for annotation groups" |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
327 } |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
328 |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
329 print(ggplot(pixelxyarray, aes(x=x, y=y, fill=pixelnumber))+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
330 geom_tile() + coord_fixed()+ |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
331 ggtitle(gg_title) + theme_bw()+ |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
332 theme(plot.title = element_text(hjust = 0.5))+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
333 theme(text=element_text(family="ArialMT", face="bold", size=12))+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
334 scale_fill_gradientn(colours = c("blue", "purple" , "red","orange"), |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
335 space = "Lab", na.value = "black", name = "Pixel\nnumber")) |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
336 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
337 ################ 2) Number of calibrants per spectrum ###################### |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
338 |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
339 ## matrix with calibrants in columns and in rows if there is peak intensity in range or not |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
340 pixelmatrix = matrix(ncol=ncol(msidata), nrow = 0) |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
341 |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
342 ## plot only possible when there is at least one valid calibrant |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
343 if (length(inputcalibrantmasses) != 0){ |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
344 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
345 ## calculate plusminus values in m/z for each calibrant |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
346 plusminusvalues = rep($plusminus_ppm/1000000, length(inputcalibrantmasses))*inputcalibrantmasses |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
347 |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
348 ## filter for m/z window of each calibrant and calculate if sum of peak intensities > 0 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
349 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
350 for (mass in 1:length(inputcalibrantmasses)){ |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
351 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
352 filtered_data = msidata[mz(msidata) >= inputcalibrantmasses[mass]-plusminusvalues[mass] & mz(msidata) <= inputcalibrantmasses[mass]+plusminusvalues[mass],] |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
353 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
354 if (nrow(filtered_data) > 1 & sum(spectra(filtered_data)[],na.rm=TRUE) > 0){ |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
355 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
356 ## intensity of all m/z > 0 |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
357 intensity_sum = colSums(spectra(filtered_data)[], na.rm=TRUE) > 0 |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
358 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
359 }else if(nrow(filtered_data) == 1 & sum(spectra(filtered_data)[], na.rm=TRUE) > 0){ |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
360 |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
361 ## intensity of only m/z > 0 |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
362 intensity_sum = spectra(filtered_data)[] > 0 |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
363 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
364 }else{ |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
365 |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
366 intensity_sum = rep(FALSE, ncol(filtered_data))} |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
367 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
368 ## for each pixel add sum of intensities > 0 in the given m/z range |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
369 pixelmatrix = rbind(pixelmatrix, intensity_sum) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
370 } |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
371 |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
372 ## for each pixel count TRUE (each calibrant m/z range with intensity > 0 is TRUE) |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
373 countvector= as.factor(colSums(pixelmatrix, na.rm=TRUE)) |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
374 countdf= cbind(coord(msidata)[,1:2], countvector) ## add pixel coordinates to counts |
4
fef8bd551236
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents:
3
diff
changeset
|
375 mycolours = c("black","grey", "darkblue", "blue", "green" , "red", "yellow", "magenta", "olivedrab1", "lightseagreen") |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
376 |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
377 print(ggplot(countdf, aes(x=x, y=y, fill=countvector))+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
378 geom_tile() + coord_fixed() + |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
379 ggtitle(paste0("Number of calibrants per pixel (±",$plusminus_ppm, " ppm)")) + |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
380 theme_bw() + |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
381 theme(plot.title = element_text(hjust = 0.5))+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
382 theme(text=element_text(family="ArialMT", face="bold", size=12))+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
383 scale_fill_manual(values = mycolours[1:length(countvector)], |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
384 na.value = "black", name = "# calibrants")) |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
385 |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
386 ## append list for optional tabular output with spectrum values |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
387 colnames(countdf)[3] = "Number of Calibrants" |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
388 spectrum_list[[list_count]] = countdf |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
389 list_count = list_count+1 |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
390 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
391 }else{print("2) The inputcalibrant m/z were not provided or outside the m/z range")} |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
392 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
393 ########################## 3) fold change image ########################### |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
394 |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
395 #if $calibrantratio: |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
396 #for $foldchanges in $calibrantratio: |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
397 mass1 = $foldchanges.mass1 |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
398 mass2 = $foldchanges.mass2 |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
399 distance = $foldchanges.distance |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
400 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
401 ### if user did not write a label use input m/z as label |
3
f6aa0cff777c
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit 9f8984da558d0a307fed3ff3af9313829d2e5baa
galaxyp
parents:
2
diff
changeset
|
402 #if not str($foldchanges.filenameratioplot).strip(): |
f6aa0cff777c
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit 9f8984da558d0a307fed3ff3af9313829d2e5baa
galaxyp
parents:
2
diff
changeset
|
403 #set $label = "Fold change %s Da / %s Da" % ($foldchanges.mass1, $foldchanges.mass2) |
f6aa0cff777c
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit 9f8984da558d0a307fed3ff3af9313829d2e5baa
galaxyp
parents:
2
diff
changeset
|
404 #else: |
f6aa0cff777c
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit 9f8984da558d0a307fed3ff3af9313829d2e5baa
galaxyp
parents:
2
diff
changeset
|
405 #set $label = $foldchanges.filenameratioplot |
f6aa0cff777c
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit 9f8984da558d0a307fed3ff3af9313829d2e5baa
galaxyp
parents:
2
diff
changeset
|
406 #end if |
f6aa0cff777c
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit 9f8984da558d0a307fed3ff3af9313829d2e5baa
galaxyp
parents:
2
diff
changeset
|
407 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
408 ### filter msidata for given m/z range (for both input m/z) |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
409 filtered_data1 = msidata[mz(msidata) >= mass1-distance & mz(msidata) <= mass1+distance,] |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
410 filtered_data2 = msidata[mz(msidata) >= mass2-distance & mz(msidata) <= mass2+distance,] |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
411 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
412 ### find m/z in the two given ranges with the highest mean intensity |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
413 ### this two m/z will be used to calculate the fold change (red line in plot) |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
414 maxmassrow1 = rowMeans(spectra(filtered_data1), na.rm=TRUE) |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
415 maxmass1 = mz(filtered_data1)[which.max(maxmassrow1)] |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
416 maxmassrow2 = rowMeans(spectra(filtered_data2), na.rm=TRUE) |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
417 maxmass2 = mz(filtered_data2)[which.max(maxmassrow2)] |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
418 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
419 ### plot legend: chosen value in blue, distance in blue, max m/z in red |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
420 ### m/z range for each plot (fixed range of 5 Da) |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
421 ### xlim does not work because it does not adjust for the max. intensities within the range |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
422 mzdown1 = features(msidata, mz = mass1-2) |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
423 mzup1 = features(msidata, mz = mass1+3) |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
424 mzdown2 = features(msidata, mz = mass2-2) |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
425 mzup2 = features(msidata, mz = mass2+3) |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
426 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
427 ### plot for first m/z |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
428 par(mfrow=c(2,1), oma=c(0,0,2,0)) |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
429 plot(msidata[mzdown1:mzup1,], pixel = 1:pixelcount, main=paste0("average spectrum ", mass1, " Da")) |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
430 abline(v=c(mass1-distance, mass1, mass1+distance), col="blue",lty=c(3,6,3)) |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
431 abline(v=maxmass1, col="red", lty=5) |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
432 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
433 ### plot for second m/z |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
434 plot(msidata[mzdown2:mzup2,], pixel = 1:pixelcount, main= paste0("average spectrum ", mass2, " Da")) |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
435 abline(v=c(mass2-distance, mass2, mass2+distance), col="blue", lty=c(3,6,3)) |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
436 abline(v=maxmass2, col="red", lty=5) |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
437 title("Control of fold change plot", outer=TRUE) |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
438 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
439 ### filter spectra for max m/z to have two vectors, which can be divided |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
440 ### plot spatial distribution of fold change |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
441 ### only possible when there are intensities > 0 in both given m/z ranges |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
442 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
443 if (length(maxmass1)>0&length(maxmass2)>0){ |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
444 mass1vector = spectra(msidata)[features(msidata, mz = maxmass1),] |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
445 mass2vector = spectra(msidata)[features(msidata, mz = maxmass2),] |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
446 foldchange= log2(mass1vector/mass2vector) |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
447 fcmatrix = cbind(foldchange, coord(msidata)[,1:2]) |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
448 |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
449 print(ggplot(fcmatrix, aes(x=x, y=y, fill=foldchange), colour=colo)+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
450 geom_tile() + coord_fixed()+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
451 ggtitle("$label")+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
452 theme_bw()+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
453 theme(plot.title = element_text(hjust = 0.5))+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
454 theme(text=element_text(family="ArialMT", face="bold", size=12))+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
455 scale_fill_gradientn(colours = c("blue", "purple" , "red","orange") |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
456 ,space = "Lab", na.value = "black", name ="FC")) |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
457 }else{ |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
458 plot(0,type='n',axes=FALSE,ann=FALSE) |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
459 title(main=paste("At least one m/z range did not contain any intensity > 0,\n therefore no foldchange plot could be drawn"))} |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
460 |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
461 #end for |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
462 #end if |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
463 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
464 #################### 4) m/z heatmaps ####################################### |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
465 |
3
f6aa0cff777c
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit 9f8984da558d0a307fed3ff3af9313829d2e5baa
galaxyp
parents:
2
diff
changeset
|
466 par(mfrow=c(1,1), mar=c(5.1, 4.1, 4.1, 2.1), mgp=c(3, 1, 0), las=0) |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
467 if (length(inputcalibrants[,1]) != 0){ |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
468 for (mass in 1:length(inputcalibrants[,1])){ |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
469 |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
470 |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
471 image(msidata, mz=inputcalibrants[,1][mass], plusminus=plusminusvalues[mass], |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
472 main= paste0(inputcalibrants[,2][mass], ": ", round(inputcalibrants[,1][mass], digits = 2)," (±",$plusminus_ppm, " ppm)"), |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
473 contrast.enhance = "histogram", ylim= c(maximumy+0.2*maximumy,minimumy-0.2*minimumy)) |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
474 } |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
475 } else {print("4) The input peptide and calibrant m/z were not provided or outside the m/z range")} |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
476 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
477 #################### 5) Number of peaks per pixel - image ################## |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
478 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
479 ## here every intensity value > 0 counts as pixel |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
480 peaksperpixel = colSums(spectra(msidata)[]> 0, na.rm=TRUE) |
6
5c63fe03ed9e
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
5
diff
changeset
|
481 peakscoordarray=cbind(coord(msidata)[,1:2], peaksperpixel) |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
482 |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
483 print(ggplot(peakscoordarray, aes(x=x, y=y, fill=peaksperpixel), colour=colo)+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
484 geom_tile() + coord_fixed() + |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
485 ggtitle("Number of peaks per spectrum")+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
486 theme_bw() + |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
487 theme(plot.title = element_text(hjust = 0.5))+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
488 theme(text=element_text(family="ArialMT", face="bold", size=12))+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
489 scale_fill_gradientn(colours = c("blue", "purple" , "red","orange") |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
490 ,space = "Lab", na.value = "black", name = "# peaks")) |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
491 |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
492 ## append list for optional tabular output with spectrum values |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
493 colnames(peakscoordarray)[3] = "Number of Peaks" |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
494 spectrum_list[[list_count]] = peakscoordarray |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
495 list_count = list_count+1 |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
496 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
497 ############################### 6) TIC image ############################### |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
498 |
6
5c63fe03ed9e
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
5
diff
changeset
|
499 TICcoordarray=cbind(coord(msidata)[,1:2], TICs) |
4
fef8bd551236
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents:
3
diff
changeset
|
500 colo = colorRampPalette( |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
501 c("blue", "cyan", "green", "yellow","red")) |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
502 print(ggplot(TICcoordarray, aes(x=x, y=y, fill=TICs), colour=colo)+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
503 geom_tile() + coord_fixed() + |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
504 ggtitle("Total Ion Chromatogram")+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
505 theme_bw() + |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
506 theme(plot.title = element_text(hjust = 0.5))+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
507 theme(text=element_text(family="ArialMT", face="bold", size=12))+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
508 scale_fill_gradientn(colours = c("blue", "purple" , "red","orange") |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
509 ,space = "Lab", na.value = "black", name = "TIC")) |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
510 |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
511 ## append list for optional tabular output with spectrum values |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
512 colnames(TICcoordarray)[3] = "TIC per spectrum" |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
513 spectrum_list[[list_count]] = TICcoordarray |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
514 list_count = list_count+1 |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
515 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
516 ############################### 7) Most abundant m/z image ################# |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
517 |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
518 highestmz = apply(spectra(msidata)[],2,which.max) |
6
5c63fe03ed9e
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
5
diff
changeset
|
519 highestmz_matrix = cbind(coord(msidata)[,1:2],mz(msidata)[highestmz]) |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
520 colnames(highestmz_matrix)[3] = "highestmzinDa" |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
521 |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
522 print(ggplot(highestmz_matrix, aes(x=x, y=y, fill=highestmzinDa))+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
523 geom_tile() + coord_fixed() + |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
524 ggtitle("Most abundant m/z in each spectrum")+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
525 theme_bw() + |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
526 theme(plot.title = element_text(hjust = 0.5))+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
527 scale_fill_gradientn(colours = c("blue", "purple" , "red","orange"), space = "Lab", na.value = "black", name = "m/z", |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
528 limits=c(min(highestmz_matrix\$highestmzinDa), max(highestmz_matrix\$highestmzinDa)))+ |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
529 theme(text=element_text(family="ArialMT", face="bold", size=12))) |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
530 |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
531 ## append list for optional tabular output with spectrum values |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
532 colnames(highestmz_matrix)[3] = "Most abundant m/z" |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
533 spectrum_list[[list_count]] = highestmz_matrix |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
534 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
535 |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
536 ## tabular output of spectra values |
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
537 |
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
538 #if $pixel_output: |
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
539 print("pixel list") |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
540 pixel_df = Reduce(function(...) merge(..., by=c("x", "y"), all=TRUE), spectrum_list) |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
541 write.table(pixel_df, file="$pixel_tabular_output", quote = FALSE, row.names = FALSE, col.names=TRUE, sep = "\t") |
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
542 #end if |
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
543 |
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
544 ########################## 8) optional pca image for two components ################# |
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
545 |
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
546 #if $do_pca: |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
547 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
548 pca = PCA(msidata, ncomp=2) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
549 par(mfrow = c(2,1)) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
550 plot(pca, col=c("black", "darkgrey"), main="PCA for two components") |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
551 image(pca, col=c("black", "white"), strip=FALSE, ylim= c(maximumy+0.2*maximumy,minimumy-0.2*minimumy)) |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
552 |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
553 #end if |
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
554 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
555 ################## III) properties over spectra index ###################### |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
556 ############################################################################ |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
557 print("properties over pixels") |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
558 par(mfrow = c(2,1), mar=c(5,6,4,2)) |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
559 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
560 ########################## 9) number of peaks per spectrum ################# |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
561 ## 9a) scatterplot |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
562 |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
563 ## order pixels according to annotation groups if annotations are provided |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
564 if (!is.null(levels(msidata\$annotation))){ |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
565 |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
566 pixel_peaks_df = cbind(pixel_name_df, peaksperpixel) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
567 pixel_ordered = pixel_peaks_df[order(pixel_peaks_df\$pixel_name),] ## order pixels according to annotation group names |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
568 pixel_ordered\$annotation_order = 1:ncol(msidata) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
569 plot_colorByDensity(pixel_ordered\$annotation_order, pixel_ordered\$peaksperpixel, ylab = "", xlab = "", main="Number of peaks per spectrum") |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
570 title(xlab="Spectra index ordered for annotation groups", line=3) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
571 title(ylab="Number of peaks", line=4) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
572 abline(v=abline_vector, lty = 3) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
573 }else{ |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
574 plot_colorByDensity(pixels(msidata), peaksperpixel, ylab = "", xlab = "", main="Number of peaks per spectrum") |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
575 title(xlab="Spectra index", line=3) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
576 title(ylab="Number of peaks", line=4) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
577 } |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
578 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
579 ## 9b) histogram |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
580 |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
581 hist(peaksperpixel, main="", las=1, xlab = "Number of peaks per spectrum", ylab="") |
6
5c63fe03ed9e
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
5
diff
changeset
|
582 title(main="Number of peaks per spectrum", line=2) |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
583 title(ylab="Frequency = # spectra", line=4) |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
584 abline(v=median(peaksperpixel), col="blue") |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
585 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
586 ## 9c) additional histogram to show contribution of annotation groups |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
587 ## only when pixel annotations were loaded |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
588 if (!is.null(levels(msidata\$annotation))){ |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
589 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
590 df_9 = data.frame(peaksperpixel, msidata\$annotation) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
591 colnames(df_9) = c("Npeaks", "annotation") |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
592 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
593 hist_9 = ggplot(df_9, aes(x=Npeaks, fill=annotation)) + |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
594 geom_histogram()+ theme_bw()+ |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
595 theme(text=element_text(family="ArialMT", face="bold", size=12))+ |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
596 theme(plot.title = element_text(hjust = 0.5))+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
597 theme(legend.key.size = unit(0.2, "line"), legend.text = element_text(size = legend_size))+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
598 theme(legend.position="bottom",legend.direction="vertical")+ |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
599 labs(title="Number of peaks per spectrum and annotation group", x="Number of peaks per spectrum", y = "Frequency = # spectra") + |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
600 guides(fill=guide_legend(ncol=5,byrow=TRUE))+ |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
601 geom_vline(xintercept = median(peaksperpixel), size = 1, colour = "black",linetype = "dashed") |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
602 print(hist_9)} |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
603 |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
604 ########################## 10) TIC per spectrum ########################### |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
605 |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
606 ## 10a)density scatterplot |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
607 par(mfrow = c(2,1), mar=c(5,6,4,2)) |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
608 |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
609 ## order pixels according to annotation groups if annotations are provided |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
610 if (!is.null(levels(msidata\$annotation))){ |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
611 |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
612 pixel_TIC_df = cbind(pixel_name_df, TICs) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
613 pixel_ordered = pixel_TIC_df[order(pixel_TIC_df\$pixel_name),] ## order pixels according to annotation group names |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
614 pixel_ordered\$annotation_order = 1:ncol(msidata) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
615 |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
616 plot_colorByDensity(pixel_ordered\$annotation_order, pixel_ordered\$TICs, ylab = "", xlab = "", main="TIC per spectrum") |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
617 title(xlab="Spectra index ordered for annotation groups", line=3) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
618 title(ylab="Total ion chromatogram intensity", line=4) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
619 abline(v=abline_vector, lty = 3) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
620 }else{ |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
621 plot_colorByDensity(pixels(msidata), TICs, ylab = "", xlab = "", main="TIC per spectrum") |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
622 title(xlab="Spectra index", line=3) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
623 title(ylab = "Total ion chromatogram intensity", line=4) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
624 } |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
625 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
626 ## 10b) histogram |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
627 hist(log(TICs), main="", las=1, xlab = "log(TIC per spectrum)", ylab="") |
6
5c63fe03ed9e
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
5
diff
changeset
|
628 title(main= "TIC per spectrum", line=2) |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
629 title(ylab="Frequency = # spectra", line=4) |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
630 abline(v=median(log(TICs[TICs>0])), col="blue") |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
631 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
632 ## 10c) additional histogram to show annotation contributions |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
633 ## only when pixel annotations were loaded |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
634 if (!is.null(levels(msidata\$annotation))){ |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
635 df_10 = data.frame(log(TICs), msidata\$annotation) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
636 colnames(df_10) = c("TICs", "annotation") |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
637 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
638 hist_10 = ggplot(df_10, aes(x=TICs, fill=annotation)) + |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
639 geom_histogram()+ theme_bw()+ |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
640 theme(text=element_text(family="ArialMT", face="bold", size=12))+ |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
641 theme(plot.title = element_text(hjust = 0.5))+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
642 theme(legend.position="bottom",legend.direction="vertical")+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
643 theme(legend.key.size = unit(0.2, "line"), legend.text = element_text(size = legend_size))+ |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
644 labs(title="TIC per spectrum and annotation group", x="log(TIC per spectrum)", y = "Frequency = # spectra") + |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
645 guides(fill=guide_legend(ncol=5,byrow=TRUE))+ |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
646 geom_vline(xintercept = median(log(TICs[TICs>0])), size = 1, colour = "black",linetype = "dashed") |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
647 print(hist_10)} |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
648 |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
649 ################################## IV) properties over m/z #################### |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
650 ############################################################################ |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
651 print("properties over m/z") |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
652 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
653 ########################## 11) Histogram of m/z values ##################### |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
654 |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
655 par(mfrow = c(1, 1), cex.axis=1, cex.lab=1, mar=c(5.1,4.1,4.1,2.1)) |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
656 hist(mz(msidata), xlab = "m/z", main="Histogram of m/z values") |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
657 |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
658 ########################## 12) Number of peaks per m/z ##################### |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
659 |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
660 peakspermz = rowSums(spectra(msidata)[] > 0 ) |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
661 |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
662 par(mfrow = c(2,1), mar=c(5,6,4,4.5)) |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
663 ## 12a) scatterplot |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
664 plot_colorByDensity(mz(msidata),peakspermz, main= "Number of peaks per m/z", ylab ="") |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
665 title(xlab="m/z", line=2.5) |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
666 title(ylab = "Number of peaks", line=4) |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
667 axis(4, at=pretty(peakspermz),labels=as.character(round((pretty(peakspermz)/pixelcount*100), digits=1)), las=1) |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
668 mtext("Coverage of spectra [%]", 4, line=3, adj=1) |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
669 |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
670 ## 12b) histogram |
6
5c63fe03ed9e
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
5
diff
changeset
|
671 hist(peakspermz, main="", las=1, ylab="", xlab="") |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
672 title(ylab = "Frequency", line=4) |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
673 title(main="Number of peaks per m/z", xlab = "Number of peaks per m/z", line=2) |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
674 abline(v=median(peakspermz), col="blue") |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
675 |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
676 ########################## 13) Sum of intensities per m/z ################## |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
677 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
678 ## Sum of all intensities for each m/z (like TIC, but for m/z instead of pixel) |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
679 mzTIC = rowSums(spectra(msidata)[]) ## calculate intensity sum for each m/z |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
680 |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
681 par(mfrow = c(2,1), mar=c(5,6,4,2)) |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
682 ## 13a) scatterplot |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
683 plot_colorByDensity(mz(msidata),mzTIC, main= "Sum of intensities per m/z", ylab ="") |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
684 title(xlab="m/z", line=2.5) |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
685 title(ylab="Intensity sum", line=4) |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
686 |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
687 ## 13b) histogram |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
688 hist(log(mzTIC), main="", xlab = "", las=1, ylab="") |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
689 title(main="Sum of intensities per m/z", line=2, ylab="") |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
690 title(xlab = "log (sum of intensities per m/z)") |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
691 title(ylab = "Frequency", line=4) |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
692 abline(v=median(log(mzTIC[mzTIC>0])), col="blue") |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
693 |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
694 ################################## V) intensity plots ######################## |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
695 ############################################################################ |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
696 print("intensity plots") |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
697 ########################## 14) Intensity distribution ###################### |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
698 |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
699 par(mfrow = c(2,1), mar=c(5,6,4,2)) |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
700 |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
701 ## 14a) Median intensity over spectra |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
702 medianint_spectra = apply(spectra(msidata), 2, median) |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
703 |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
704 ## order pixels according to annotation groups if annotations are provided |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
705 if (!is.null(levels(msidata\$annotation))){ |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
706 |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
707 pixel_median_df = cbind(pixel_name_df, medianint_spectra) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
708 pixel_ordered = pixel_median_df[order(pixel_median_df\$pixel_name),] ## order pixels according to annotation group names |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
709 plot(pixel_ordered\$medianint_spectra, main="Median intensity per spectrum",las=1, xlab="Spectra index ordered for annotation groups", ylab="") |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
710 title(ylab="Median spectrum intensity", line=4) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
711 abline(v=abline_vector, lty = 3) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
712 }else{ |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
713 plot(medianint_spectra, main="Median intensity per spectrum",las=1, xlab="Spectra index", ylab="") |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
714 title(ylab="Median spectrum intensity", line=4) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
715 } |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
716 |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
717 ## 14b) histogram: |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
718 hist(log2(spectra(msidata)[]), main="", xlab = "", ylab="", las=1) |
6
5c63fe03ed9e
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
5
diff
changeset
|
719 title(main="Log2-transformed intensities", line=2) |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
720 title(xlab="log2 intensities") |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
721 title(ylab="Frequency", line=4) |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
722 abline(v=median(log2(spectra(msidata)[(spectra(msidata)>0)])), col="blue") |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
723 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
724 ## 14c) histogram to show contribution of annotation groups |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
725 ## only when annotation tabular was provided |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
726 if (!is.null(levels(msidata\$annotation))){ |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
727 |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
728 df_13 = data.frame(matrix(,ncol=2, nrow=0)) |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
729 for (subsample in levels(msidata\$annotation)){ |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
730 log2_int_subsample = log2(spectra(msidata)[,msidata\$annotation==subsample]) |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
731 df_subsample = data.frame(as.numeric(log2_int_subsample)) |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
732 df_subsample\$annotation = subsample |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
733 df_13 = rbind(df_13, df_subsample)} |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
734 df_13\$annotation = as.factor(df_13\$annotation) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
735 colnames(df_13) = c("logint", "annotation") |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
736 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
737 hist_13 = ggplot(df_13, aes(x=logint, fill=annotation)) + |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
738 geom_histogram()+ theme_bw()+ |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
739 theme(text=element_text(family="ArialMT", face="bold", size=12))+ |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
740 labs(title="Log2-transformed intensities per sample", x="log2 intensities", y = "Frequency") + |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
741 theme(plot.title = element_text(hjust = 0.5))+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
742 theme(legend.position="bottom",legend.direction="vertical")+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
743 theme(legend.key.size = unit(0.2, "line"), legend.text = element_text(size = legend_size))+ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
744 guides(fill=guide_legend(ncol=5,byrow=TRUE))+ |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
745 geom_vline(xintercept = median(log2(spectra(msidata)[(spectra(msidata)>0)])), size = 1, colour = "black",linetype = "dashed") |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
746 print(hist_13) |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
747 |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
748 ## 14d) boxplots to visualize in a different way the intensity distributions |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
749 par(mfrow = c(1,1), cex.axis=1.3, cex.lab=1.3, mar=c(13.1,4.1,5.1,2.1)) |
6
5c63fe03ed9e
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
5
diff
changeset
|
750 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
751 mean_matrix = matrix(,ncol=0, nrow = nrow(msidata)) |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
752 for (subsample in levels(msidata\$annotation)){ |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
753 mean_mz_sample = rowMeans(spectra(msidata)[,msidata\$annotation==subsample]) |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
754 mean_matrix = cbind(mean_matrix, mean_mz_sample)} |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
755 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
756 boxplot(log2(mean_matrix), ylab = "log2 mean intensity per m/z", main="Mean intensities per m/z and annotation group", xaxt = "n") |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
757 (axis(1, at = c(1:number_combined), labels=levels(msidata\$annotation), cex.axis=cex_boxplot, las=2)) |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
758 } |
6
5c63fe03ed9e
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
5
diff
changeset
|
759 |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
760 ################################## VI) Mass spectra and m/z accuracy ######################## |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
761 ############################################################################ |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
762 print("Mass spectra and m/z accuracy") |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
763 |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
764 ############################ 15) Mass spectra ############################## |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
765 |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
766 par(mfrow = c(2, 2), cex.axis=1, cex.lab=1, mar=c(5.1,4.1,4.1,2.1)) |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
767 pixels_for_plot = c(round(length(pixelnumber)/2, , digits=0), round(length(pixelnumber)/4, , digits=0), round(length(pixelnumber)/4*3, , digits=0)) |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
768 plot(msidata, pixel = 1:length(pixelnumber), main= "Average spectrum") |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
769 plot(msidata, pixel = pixels_for_plot[1], main=paste0("Spectrum at ", rownames(coord(msidata)[pixels_for_plot[1],1:2]))) |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
770 plot(msidata, pixel = pixels_for_plot[2], main= paste0("Spectrum at ", rownames(coord(msidata)[pixels_for_plot[2],1:2]))) |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
771 plot(msidata, pixel = pixels_for_plot[3], main= paste0("Spectrum at ", rownames(coord(msidata)[pixels_for_plot[3],1:2]))) |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
772 |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
773 ################### 16) Zoomed in mass spectra for calibrants ############## |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
774 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
775 count = 1 |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
776 differencevector = numeric() |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
777 differencevector2 = vector() |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
778 |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
779 if (length(inputcalibrantmasses) != 0){ |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
780 |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
781 ### calculate plusminus values in m/z for each calibrant, this is used for all following plots |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
782 plusminusvalues = rep($plusminus_ppm/1000000, length(inputcalibrantmasses)) * inputcalibrantmasses |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
783 |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
784 for (mass in 1:length(inputcalibrantmasses)){ |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
785 |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
786 ### define the plot window with xmin und xmax |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
787 minmasspixel = features(msidata, mz=inputcalibrantmasses[mass]-1) |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
788 maxmasspixel = features(msidata, mz=inputcalibrantmasses[mass]+3) |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
789 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
790 ### find m/z with the highest mean intensity in m/z range (red line in plot 16) and calculate ppm difference for plot 17 |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
791 filtered_data = msidata[mz(msidata) >= inputcalibrantmasses[mass]-plusminusvalues[mass] & mz(msidata) <= inputcalibrantmasses[mass]+plusminusvalues[mass],] |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
792 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
793 if (nrow(filtered_data) > 0 & sum(spectra(filtered_data)) > 0){ |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
794 maxmassrow = rowMeans(spectra(filtered_data)) ## for each m/z average intensity is calculated |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
795 maxvalue = mz(filtered_data)[which.max(maxmassrow)] ### m/z with highest average intensity in m/z range |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
796 mzdifference = maxvalue - inputcalibrantmasses[mass] ### difference: theoretical value - closest m/z value |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
797 ppmdifference = mzdifference/inputcalibrantmasses[mass]*1000000 ### calculate ppm for accuracy measurement |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
798 }else{ |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
799 ppmdifference = NA |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
800 maxvalue = NA} |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
801 differencevector[mass] = round(ppmdifference, digits=2) |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
802 |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
803 ### find m/z closest to inputcalibrant and calculate ppm difference for plot 18 |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
804 mznumber = features(msidata, mz = inputcalibrantmasses[mass]) ### gives featurenumber which is closest to given m/z |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
805 mzvalue = mz(msidata)[mznumber] ### gives closest m/z |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
806 mzdifference2 = mzvalue - inputcalibrantmasses[mass] |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
807 ppmdifference2 = mzdifference2/inputcalibrantmasses[mass]*1000000 |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
808 differencevector2[mass] = round(ppmdifference2, digits=2) |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
809 |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
810 par(mfrow = c(2, 2), oma=c(0,0,2,0)) |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
811 plot(msidata[minmasspixel:maxmasspixel,], pixel = 1:length(pixelnumber), main= "average spectrum") |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
812 abline(v=c(inputcalibrantmasses[mass] -plusminusvalues[count], inputcalibrantmasses[mass] ,inputcalibrantmasses[mass] +plusminusvalues[count]), col="blue", lty=c(3,5,3)) |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
813 abline(v=c(maxvalue), col="red", lty=2) |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
814 abline(v=c(mzvalue), col="green2", lty=4) |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
815 plot(msidata[minmasspixel:maxmasspixel,], pixel = pixels_for_plot[1], main=paste0("Spectrum at ", rownames(coord(msidata)[pixels_for_plot[1],1:2]))) |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
816 abline(v=c(inputcalibrantmasses[mass] -plusminusvalues[count], inputcalibrantmasses[mass] ,inputcalibrantmasses[mass] +plusminusvalues[count]), col="blue", lty=c(3,5,3)) |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
817 abline(v=c(maxvalue), col="red", lty=2) |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
818 abline(v=c(mzvalue), col="green2", lty=4) |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
819 plot(msidata[minmasspixel:maxmasspixel,], pixel = pixels_for_plot[2], main= paste0("Spectrum at ", rownames(coord(msidata)[pixels_for_plot[2],1:2]))) |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
820 abline(v=c(inputcalibrantmasses[mass] -plusminusvalues[count], inputcalibrantmasses[mass] ,inputcalibrantmasses[mass] +plusminusvalues[count]), col="blue", lty=c(3,5,3)) |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
821 abline(v=c(maxvalue), col="red", lty=2) |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
822 abline(v=c(mzvalue), col="green2", lty=4) |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
823 plot(msidata[minmasspixel:maxmasspixel,], pixel = pixels_for_plot[3], main= paste0("Spectrum at ", rownames(coord(msidata)[pixels_for_plot[3],1:2]))) |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
824 abline(v=c(inputcalibrantmasses[mass] -plusminusvalues[count], inputcalibrantmasses[mass] ,inputcalibrantmasses[mass] +plusminusvalues[count]), col="blue", lty=c(3,5,3)) |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
825 abline(v=c(maxvalue), col="red", lty=2) |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
826 abline(v=c(mzvalue), col="green2", lty=4) |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
827 title(paste0("theor. m/z: ", inputcalibrants[count,1]), col.main="blue", outer=TRUE, line=0, adj=0.074) |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
828 title(paste0("most abundant m/z: ", round(maxvalue, digits=4)), col.main="red", outer=TRUE, line=0, adj=0.49) |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
829 title(paste0("closest m/z: ", round(mzvalue, digits=4)), col.main="green2", outer=TRUE, line=0, adj=0.93) |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
830 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
831 ### 16b) one large extra plot with different colours for different pixel annotation groups |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
832 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
833 if (!is.null(levels(msidata\$annotation))){ |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
834 if (number_combined < 10){ |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
835 key_zoomed = TRUE |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
836 }else{key_zoomed = FALSE} |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
837 par(mfrow = c(1, 1)) |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
838 plot(msidata[minmasspixel:maxmasspixel,], pixel=1:ncol(msidata),main="Average spectrum per annotation group", |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
839 pixel.groups=msidata\$annotation, key=key_zoomed, col=hue_pal()(number_combined),superpose=TRUE) |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
840 abline(v=c(inputcalibrantmasses[mass] -plusminusvalues[count], inputcalibrantmasses[mass] ,inputcalibrantmasses[mass] +plusminusvalues[count]), col="black", lty=c(3,1,3)) |
12
c43a7821c030
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a0cadd9fe40da0094dc87bbf5e06a323973a0b42
galaxyp
parents:
11
diff
changeset
|
841 } |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
842 count=count+1 |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
843 } |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
844 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
845 ######### 17) ppm difference input calibrant m/z and m/z with max intensity in given m/z range######### |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
846 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
847 ### plot the ppm difference calculated above: theor. m/z value to highest m/z value: |
6
5c63fe03ed9e
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
5
diff
changeset
|
848 |
7
b86a66dd1a16
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit dd64f41874a56c4e2619bf58ae3681d806cf9b3f
galaxyp
parents:
6
diff
changeset
|
849 calibrant_names = as.character(inputcalibrants[,2]) |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
850 diff_df = data.frame(differencevector, calibrant_names) |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
851 |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
852 if (sum(is.na(diff_df[,1])) == nrow(diff_df)){ |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
853 plot(0,type='n',axes=FALSE,ann=FALSE) |
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
854 title(main=paste("plot 17: no peaks in the chosen region, repeat with higher ppm range")) ## here klammer weggenommen... |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
855 }else{ |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
856 |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
857 diff_plot1=ggplot(data=diff_df, aes(x=calibrant_names, y=differencevector)) + geom_bar(stat="identity", fill = "darkgray") + theme_minimal() + |
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
858 labs(title="Average m/z error (max. average intensity vs. theor. calibrant m/z)", x="calibrants", y = "Average m/z error in ppm")+ |
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
859 theme(plot.title = element_text(hjust = 0.5, size=14))+theme(text=element_text(family="ArialMT", face="bold", size=16))+ |
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
860 geom_text(aes(label=differencevector), vjust=-0.3, size=5.5, col="blue") + |
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
861 theme(axis.text.x = element_text(angle = 90, hjust = 1, size=16)) |
6
5c63fe03ed9e
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
5
diff
changeset
|
862 |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
863 print(diff_plot1) |
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
864 } |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
865 |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
866 ######### 18) ppm difference input calibrant m/z and closest m/z ########### |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
867 |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
868 ### plot the ppm difference calculated above theor. m/z value to closest m/z value: |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
869 |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
870 differencevector2 = round(differencevector2, digits=2) |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
871 calibrant_names = as.character(inputcalibrants[,2]) |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
872 diff_df = data.frame(differencevector2, calibrant_names) |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
873 |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
874 diff_plot2=ggplot(data=diff_df, aes(x=calibrant_names, y=differencevector2)) + geom_bar(stat="identity", fill = "darkgray") + theme_minimal() + |
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
875 labs(title="Average m/z error (closest measured m/z vs. theor. calibrant m/z)", x="calibrants", y = "Average m/z error in ppm")+ |
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
876 theme(plot.title = element_text(hjust = 0.5, size=16))+theme(text=element_text(family="ArialMT", face="bold", size=16))+ |
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
877 geom_text(aes(label=differencevector2), vjust=-0.3, size=5.5, col="blue")+ |
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
878 theme(axis.text.x = element_text(angle = 90, hjust = 1, size=16)) |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
879 |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
880 print(diff_plot2) |
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
881 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
882 #################### 19) ppm difference over pixels ##################### |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
883 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
884 par(mfrow = c(1,1)) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
885 mycolours = c("darkgrey", "darkblue", "blue", "green" , "red", "orange", "yellow", "magenta", "olivedrab1", "lightseagreen") |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
886 count = 1 |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
887 ppm_df = as.data.frame(matrix(,ncol=0, nrow = ncol(msidata))) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
888 for (calibrant in inputcalibrantmasses){ |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
889 ### find m/z with the highest mean intensity in m/z range, if no m/z in the range, ppm differences for this calibrant will be NA |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
890 filtered_data = msidata[mz(msidata) >= calibrant-plusminusvalues[count] & mz(msidata) <= calibrant+plusminusvalues[count],] |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
891 |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
892 if (nrow(filtered_data) > 0){ |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
893 ### filtered for m/z range, find max peak in each spectrum (pixel)( |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
894 ppm_vector = numeric() |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
895 for (pixel_count in 1:ncol(filtered_data)){ |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
896 mz_max = mz(filtered_data)[which.max(spectra(filtered_data)[,pixel_count])] |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
897 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
898 mzdiff = mz_max - calibrant |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
899 ppmdiff = mzdiff/calibrant*1000000 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
900 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
901 ### if maximum intensity in m/z range was 0 set ppm diff to NA (not shown in plot) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
902 if (max(spectra(filtered_data)[,pixel_count]) == 0){ |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
903 ppmdiff = NA} |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
904 ppm_vector[pixel_count] = ppmdiff} |
6
5c63fe03ed9e
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
5
diff
changeset
|
905 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
906 }else{ |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
907 ppm_vector = rep(NA, ncol(msidata)) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
908 } |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
909 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
910 ppm_df = cbind(ppm_df, ppm_vector) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
911 count=count+1 |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
912 } |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
913 |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
914 if (sum(is.na(ppm_df)) == ncol(ppm_df)*nrow(ppm_df)){ |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
915 plot(0,type='n',axes=FALSE,ann=FALSE) |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
916 title(main=paste("plot 19: no peaks in the chosen region, repeat with higher ppm range")) |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
917 }else{ |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
918 |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
919 ### plot ppm differences over pixels (spectra index) |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
920 par(mar=c(4.1, 4.1, 4.1, 7.5)) |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
921 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
922 ## if annotations are provided, pixel index is ordered according to annotation groups |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
923 if (!is.null(levels(msidata\$annotation))){ |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
924 ppm_df_pixels =cbind(pixel_name_df, ppm_df) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
925 pixel_ordered = ppm_df_pixels[order(ppm_df_pixels\$pixel_name),] ## order pixels according to annotation group names |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
926 |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
927 plot(0,0,type="n", ylim=c(min(ppm_df, na.rm=TRUE),max(ppm_df, na.rm=TRUE)), xlim = c(1,ncol(filtered_data)),xlab = "Spectra index ordered for annotation groups", ylab = "m/z difference in ppm", main="Difference m/z with max. average intensity vs. theor. m/z\n(per spectrum)") |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
928 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
929 for (each_cal in 1:ncol(ppm_df)){ |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
930 lines(pixel_ordered[,each_cal+2], col=mycolours[each_cal], type="p")} |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
931 legend("topright", inset=c(-0.25,0), xpd = TRUE, bty="n", legend=inputcalibrantmasses, col=mycolours[1:ncol(ppm_df)],lty=1) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
932 abline(v=abline_vector, lty = 3) |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
933 }else{ |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
934 |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
935 plot(0,0,type="n", ylim=c(min(ppm_df, na.rm=TRUE),max(ppm_df, na.rm=TRUE)), xlim = c(1,ncol(filtered_data)),xlab = "Spectra index", ylab = "m/z difference in ppm", main="Difference m/z with max. average intensity vs. theor. m/z\n(per spectrum)") |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
936 |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
937 for (each_cal in 1:ncol(ppm_df)){ |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
938 lines(ppm_df[,each_cal], col=mycolours[each_cal], type="p")} |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
939 legend("topright", inset=c(-0.25,0), xpd = TRUE, bty="n", legend=inputcalibrantmasses, col=mycolours[1:ncol(ppm_df)],lty=1)} |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
940 } |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
941 |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
942 }else{print("plot 16+17+18+19) The inputcalibrant m/z were not provided or outside the m/z range")} |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
943 }else{ |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
944 print("inputfile has no intensities > 0") |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
945 } |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
946 dev.off() |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
947 |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
948 |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
949 ]]></configfile> |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
950 </configfiles> |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
951 <inputs> |
3
f6aa0cff777c
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit 9f8984da558d0a307fed3ff3af9313829d2e5baa
galaxyp
parents:
2
diff
changeset
|
952 <param name="infile" type="data" format="imzml,rdata,analyze75" label="Inputfile as imzML, Analyze7.5 or Cardinal MSImageSet saved as RData" |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
953 help="Upload composite datatype imzml (ibd+imzML) or analyze75 (hdr+img+t2m) or regular upload .RData (Cardinal MSImageSet)"/> |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
954 <conditional name="processed_cond"> |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
955 <param name="processed_file" type="select" label="Is the input file a processed imzML file "> |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
956 <option value="no_processed" selected="True">not a processed imzML</option> |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
957 <option value="processed">processed imzML</option> |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
958 </param> |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
959 <when value="no_processed"/> |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
960 <when value="processed"> |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
961 <param name="accuracy" type="float" value="50" label="Mass accuracy to which the m/z values will be binned" help="This should be set to the native accuracy of the mass spectrometer, if known"/> |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
962 <param name="units" display="radio" type="select" label="Unit of the mass accuracy" help="either m/z or ppm"> |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
963 <option value="mz" >mz</option> |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
964 <option value="ppm" selected="True" >ppm</option> |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
965 </param> |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
966 </when> |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
967 </conditional> |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
968 <conditional name="tabular_annotation"> |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
969 <param name="load_annotation" type="select" label="Use pixel annotation from tabular file for QC plots"> |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
970 <option value="no_annotation" selected="True">pixels belong into one group only</option> |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
971 <option value="yes_annotation">use pixel annotation from a tabular file</option> |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
972 </param> |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
973 <when value="yes_annotation"> |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
974 <param name="annotation_file" type="data" format="tabular" label="Use annotations from tabular file" |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
975 help="Tabular file with three columns: x values, y values and pixel annotations"/> |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
976 <param name="column_x" data_ref="annotation_file" label="Column with x values" type="data_column"/> |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
977 <param name="column_y" data_ref="annotation_file" label="Column with y values" type="data_column"/> |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
978 <param name="column_names" data_ref="annotation_file" label="Column with pixel annotations" type="data_column"/> |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
979 </when> |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
980 <when value="no_annotation"/> |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
981 </conditional> |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
982 <param name="filename" type="text" value="" optional="true" label="Title" help="will appear as header in the quality report, if nothing given input dataset name is used"/> |
4
fef8bd551236
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents:
3
diff
changeset
|
983 <param name="calibrant_file" type="data" optional="true" format="tabular" |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
984 label="File with internal calibrants" help="first column: m/z, second column: name (optional), tabular file"/> |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
985 <param name="plusminus_ppm" value="50" type="float" label="ppm range" help="Will be added in both directions to input calibrant m/z"/> |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
986 <param name="do_pca" type="boolean" display="radio" label="PCA with 2 components"/> |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
987 <repeat name="calibrantratio" title="Plot fold change of two m/z" min="0" max="10"> |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
988 <param name="mass1" value="1111" type="float" label="M/z 1" help="First m/z"/> |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
989 <param name="mass2" value="2222" type="float" label="M/z 2" help="Second m/z"/> |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
990 <param name="distance" value="0.25" type="float" label="M/z range" help="Plusminus m/z window added to input m/z. In both m/z ranges the maximum intensity is used to calculate the fold change"/> |
3
f6aa0cff777c
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit 9f8984da558d0a307fed3ff3af9313829d2e5baa
galaxyp
parents:
2
diff
changeset
|
991 <param name="filenameratioplot" type="text" optional="true" label="Title" help="Optional title for fold change plot."/> |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
992 </repeat> |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
993 <param name="pixel_output" type="boolean" display="radio" label="Tabular output with spectra information"/> |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
994 </inputs> |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
995 <outputs> |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
996 <data format="pdf" name="plots" from_work_dir="qualitycontrol.pdf" label = "$infile.display_name QC_report"/> |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
997 <data format="tabular" name="pixel_tabular_output" label="$infile.display_name spectra information"> |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
998 <filter>pixel_output</filter> |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
999 </data> |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
1000 </outputs> |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
1001 <tests> |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
1002 <test expect_num_outputs="2"> |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
1003 <param name="infile" value="" ftype="imzml"> |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
1004 <composite_data value="Example_Processed.imzML"/> |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
1005 <composite_data value="Example_Processed.ibd"/> |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
1006 </param> |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1007 <conditional name="processed_cond"> |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1008 <param name="processed_file" value="processed"/> |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1009 <param name="accuracy" value="200"/> |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1010 <param name="units" value="ppm"/> |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1011 </conditional> |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1012 <conditional name="tabular_annotation"> |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1013 <param name="load_annotation" value="no_annotation"/> |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1014 </conditional> |
8
52ef77866de8
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
7
diff
changeset
|
1015 <param name="calibrant_file" value="inputcalibrantfile1.txt"/> |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
1016 <param name="plusminus_ppm" value="100"/> |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
1017 <param name="filename" value="Testfile_imzml"/> |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
1018 <param name="do_pca" value="True"/> |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
1019 <repeat name="calibrantratio"> |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
1020 <param name="mass1" value="328.9"/> |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
1021 <param name="mass2" value="398.8"/> |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
1022 <param name="distance" value="0.25"/> |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
1023 <param name="filenameratioplot" value = "Ratio of mass1 (328.9) / mass2 (398.8)"/> |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
1024 </repeat> |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
1025 <param name="pixel_output" value="True"/> |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
1026 <output name="pixel_tabular_output" file="spectra_info_imzml.txt"/> |
8
52ef77866de8
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
7
diff
changeset
|
1027 <output name="plots" file="QC_imzml.pdf" compare="sim_size" delta="20000"/> |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
1028 </test> |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1029 |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
1030 <test expect_num_outputs="1"> |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
1031 <param name="infile" value="" ftype="analyze75"> |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
1032 <composite_data value="Analyze75.hdr"/> |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
1033 <composite_data value="Analyze75.img"/> |
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
1034 <composite_data value="Analyze75.t2m"/> |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
1035 </param> |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1036 <conditional name="tabular_annotation"> |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1037 <param name="load_annotation" value="no_annotation"/> |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1038 </conditional> |
8
52ef77866de8
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
7
diff
changeset
|
1039 <param name="calibrant_file" value="inputcalibrantfile2.txt"/> |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
1040 <param name="filename" value="Testfile_analyze75"/> |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
1041 <param name="do_pca" value="True"/> |
8
52ef77866de8
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
7
diff
changeset
|
1042 <output name="plots" file="QC_analyze75.pdf" compare="sim_size" delta="20000"/> |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
1043 </test> |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1044 |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
1045 <test expect_num_outputs="2"> |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
1046 <param name="infile" value="123_combined.RData" ftype="rdata"/> |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1047 |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1048 <conditional name="tabular_annotation"> |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1049 <param name="load_annotation" value="yes_annotation"/> |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1050 <param name="annotation_file" value="annotations_rdata.tabular"/> |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1051 <param name="column_x" value="1"/> |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1052 <param name="column_y" value="2"/> |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1053 <param name="column_names" value="3"/> |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1054 </conditional> |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1055 <param name="calibrant_file" value="inputcalibrantfile1.txt"/> |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1056 <param name="plusminus_ppm" value="100"/> |
8
52ef77866de8
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
7
diff
changeset
|
1057 <param name="filename" value="Testfile_rdata"/> |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
1058 <param name="do_pca" value="True"/> |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
1059 <param name="pixel_output" value="True"/> |
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
1060 <output name="pixel_tabular_output" file="spectra_info_123_combi.txt"/> |
8
52ef77866de8
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
7
diff
changeset
|
1061 <output name="plots" file="QC_rdata.pdf" compare="sim_size" delta="20000"/> |
52ef77866de8
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
7
diff
changeset
|
1062 </test> |
10
3eee933c27cf
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
9
diff
changeset
|
1063 <test expect_num_outputs="1"> |
8
52ef77866de8
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
7
diff
changeset
|
1064 <param name="infile" value="empty_spectra.rdata" ftype="rdata"/> |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1065 <conditional name="tabular_annotation"> |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1066 <param name="load_annotation" value="no_annotation"/> |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1067 </conditional> |
8
52ef77866de8
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
7
diff
changeset
|
1068 <param name="calibrant_file" value="inputcalibrantfile2.txt"/> |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
1069 <param name="filename" value="Testfile_rdata"/> |
13
88e12d270e35
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
12
diff
changeset
|
1070 <param name="do_pca" value="False"/> |
8
52ef77866de8
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
7
diff
changeset
|
1071 <output name="plots" file="QC_empty_spectra.pdf" compare="sim_size" delta="20000"/> |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
1072 </test> |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
1073 </tests> |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
1074 <help> |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
1075 <![CDATA[ |
8
52ef77866de8
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
7
diff
changeset
|
1076 Cardinal is an R package that implements statistical & computational tools for analyzing mass spectrometry imaging datasets. `More information on Cardinal <http://cardinalmsi.org//>`_ |
52ef77866de8
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
7
diff
changeset
|
1077 |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1078 This tool uses Cardinal to read files and create a quality control report with descriptive plots for mass spectrometry imaging data. |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
1079 |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
1080 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
|
1081 |
8
52ef77866de8
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
7
diff
changeset
|
1082 - imzml file (upload imzml and ibd file via the "composite" function) `Introduction to the imzml format <https://ms-imaging.org/wp/imzml/>`_ |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
1083 - 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
|
1084 - Cardinal "MSImageSet" data (with variable name "msidata", saved as .RData) |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1085 - optional: tabular file with pixel annotations: x and y values in separate columns and the corresponding annotation in a third column |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
1086 |
8
52ef77866de8
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
7
diff
changeset
|
1087 Options: |
4
fef8bd551236
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
galaxyp
parents:
3
diff
changeset
|
1088 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
1089 - internal calibrants are used for m/z heatmaps (x-y grid), heatmap of number of calibrants per spectrum (x-y grid), zoomed in mass spectra, m/z accuracy |
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
1090 - optional fold change plot: draws a heatmap (x-y grid) for the fold change of two m/z (log2(intensity ratio)) |
8
52ef77866de8
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
7
diff
changeset
|
1091 |
52ef77866de8
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
7
diff
changeset
|
1092 Output: |
52ef77866de8
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
7
diff
changeset
|
1093 |
9
963c7ec00141
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
8
diff
changeset
|
1094 - quality control report as pdf with key numbers and descriptive plots describing the mass spectrometry imaging data |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1095 - optional spectra information as tabular file with annotation (if provided), numbers of calibrants (needs valid calibrants), numbers of peaks, TIC and most abundant m/z in each spectrum |
8
52ef77866de8
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
7
diff
changeset
|
1096 |
52ef77866de8
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
7
diff
changeset
|
1097 Tip: |
52ef77866de8
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
7
diff
changeset
|
1098 |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1099 - For additional m/z heatmaps use the MSI ion images tool and to plot more mass spectra use the MSI mass spectra tool. |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1100 |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1101 ---------------------------------------------------------------------------------------------------------------------------------------------------- |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1102 |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1103 Overview of the QC report plots: |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1104 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1105 - (annot): this plots will only be drawn if pixel annotations are loaded via a tabular file |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1106 - (cal): this plots will only be drawn if a tabular file with at least one valid calibrant m/z is provided |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1107 - (FC): this plots will only be drawn if the optional fold change image is selected |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1108 - Vertical lines in histograms represent median values. In density scatter plots the colour changes from blue to green, yellow and red the more points are overlayed. |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1109 |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1110 - Overview of file properties: Numbers and ranges for m/z features and pixels are given. Median and range across all intensity values are provided. Intensities > 0 gives the percentage of m/z-pixel pairs with an intensity above zero. The number of empty spectra (TIC = 0), the median number of peaks (intensities > 0) per spectra as well as the median TIC (total ion chromatogram) are given. The processing status of the file is provided as well as the number of valid calibrants from the provided tabular file.> 0 (Intensities > 0). |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1111 |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1112 x-y images (pixel/spectra information): |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1113 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1114 - (annot) Spatial orientation of annotated pixel: All pixels of one annotation group have the same colour. |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1115 - Pixel order: Shows the order of the pixels in the provided file. Depending on the instrument this can represent the acquisition order. If annotation file is provided pixels are ordered according to annotation groups. |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1116 - (cal) Number of calibrants per pixel: In every spectrum the calibrant m/z window (calibrant m/z plusminus 'ppm range') is searched for peaks (intensity > 0). Calibrants are considered present in a spectrum when they have at least one peak in their m/z window. |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1117 - (FC) Control of fold change plot: For both input m/z a zoomed in average spectrum is drawn with the input m/z as blue dashed line, the m/z range as blue dotted lines and the maximum intensity in the m/z window with a red line. |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1118 - (FC) Fold change image: For each spectrum the intensities of the two optimal m/z features (red lines in control plots) are divided and log2 transformed to obtain the fold change, which is then plotted as a heatmap. |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1119 - (cal) Intensity heatmaps for the m/z value that is closest to the calibrant m/z. The intensities are averaged within the calibrant m/z window (ppm range). |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1120 - Number of peaks per spectrum: For each spectrum the number of m/z values with intensity > 0 is calculated and plotted as heatmap. |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1121 - Total ion chromatogram: For each spectrum all intensities are summed up to obtain the TIC which is plotted as heatmap. |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1122 - Most abundant m/z in each spectrum: For each spectrum the m/z value with the highest intensity is plotted. |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1123 - PCA for two components: Result of a principal component analysis (PCA) for two components is given. The loading plot depicts the contribution of each m/z value and the x-y image represents the differences between the pixels. |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1124 |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1125 Properties over spectra/pixels: |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1126 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1127 - Number of peaks per spectrum: Scatter plot and histogram showing the number of intensities > 0 for each spectrum. If annotation tabular file is provided, the pixels are sorted according to annotation groups and the dotted lines in the scatter plot separate spectra of different annotation groups. |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1128 - (annot) Number of peaks per spectrum and annotation group: Same histogram as in plot before but with colours to show the contribution of each pixel annotation group. |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1129 - TIC per spectrum: Scatter plot and histogram showing the sum of all intensities per spectrum (TIC). Dotted lines in the scatter plot separate spectra of different annotation groups. |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1130 - (annot) TIC per spectrum and annotation group: Same histogram as in plot before but with colours to show the contribution of each pixel annotation group. |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1131 |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1132 Properties over m/z features: |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1133 |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1134 - Histogram of m/z values: Histogram of all m/z values (complete m/z axis) |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1135 - Number of peaks per m/z: Scatter plot and histogram giving the number of intensities > 0 for each m/z. |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1136 - Sum of intensities per m/z: Scatter plot and histogram of the sum of all intensities per m/z. |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1137 |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1138 Intensity plots: |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1139 |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1140 - Median intensity per spectrum: Scatter plot in which each point represents the median intensity for one spectrum. Dotted lines in the scatter plot separate spectra of different annotation groups. |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1141 - Log2-transformed intensities: Histogram of log2-transformed intensities. |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1142 - (annot) log2-transformed intensities per annotation group: Same histogram as before but with colours to show the contribution of each pixel annotation group. |
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1143 - (annot) Mean intensities per m/z and annotation group: For all pixels of an annotation group the mean intensity for each m/z is calculated and shown as boxplot. |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1144 |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1145 Mass spectra and m/z accuracy: |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1146 |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1147 - Mass spectra over the full m/z range: First plot shows the average intensities over all spectra. The other three mass spectra are from single pixels (spectra). |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1148 - (cal) For each calibrant four zoomed in mass spectrum are drawn: The first shows the average intensities over all spectra and the other three are single mass spectra. The theoretical calibrant m/z (taken from the input file) is represented by the dashed blue line. The dotted blue lines show the given ppm range. The green line is the m/z value that is closest to the theoretical calibrant and the red line is the m/z with the highest average intensity in the m/z window. |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1149 - (annot) Average spectrum per annotation group: For each calibrant a zoomed in mass spectrum is plotted this time with the average intensities for each annotation group separately. |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1150 - (cal) Difference m/z with max. average intensity vs. theor. calibrant m/z: The difference in ppm between the m/z with the highest average intensity and the theoretical m/z are plotted for each calibrant. This corresponds to the difference between the dashed blue line and the red line in the zoomed in mass spectra. |
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1151 - (cal) Difference closest measured m/z vs. theor. calibrant m/z: The difference in ppm between the closest m/z value and the theoretical m/z values are plotted for each calibrant. This corresponds to the difference between the dashed blue line and the green line in the zoomed in mass spectra. |
14
7c7c39b9ec4a
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
13
diff
changeset
|
1152 - (cal) Difference m/z with max. average intensity vs. theor. m/z (per spectrum): For each spectrum the ppm difference between the m/z with the highest average intensity and the theoretical m/z are plotted. The calibrants have different plotting colours. Dashed lines separate spectra of different annotation groups. |
11
30d0aabb1b46
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 6d877681b6188999b4f5abb1843b420078b71b92
galaxyp
parents:
10
diff
changeset
|
1153 |
0
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
1154 |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
1155 ]]> |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
1156 </help> |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
1157 <citations> |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
1158 <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
|
1159 </citations> |
845073d506a8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit fa798afa023eea1cb183c14d0242721b2c696c21
galaxyp
parents:
diff
changeset
|
1160 </tool> |
2
1ccbda92b76b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit a8eebad4ad469908f64c25e1e2c705eb637e3cae
galaxyp
parents:
1
diff
changeset
|
1161 |