Mercurial > repos > galaxyp > msi_filtering
annotate msi_filtering.xml @ 8:262db9893c6f draft
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
author | galaxyp |
---|---|
date | Wed, 22 Aug 2018 13:42:05 -0400 |
parents | 73b5a754f35c |
children | 28ac8199d4d5 |
rev | line source |
---|---|
8
262db9893c6f
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents:
7
diff
changeset
|
1 <tool id="mass_spectrometry_imaging_filtering" name="MSI filtering" version="1.10.0.6"> |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
2 <description>tool for filtering mass spectrometry imaging data</description> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
3 <requirements> |
2
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
4 <requirement type="package" version="1.10.0">bioconductor-cardinal</requirement> |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
5 <requirement type="package" version="2.2.1">r-gridextra</requirement> |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
6 <requirement type="package" version="2.2.1">r-ggplot2</requirement> |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
7 </requirements> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
8 <command detect_errors="exit_code"> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
9 <![CDATA[ |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
10 |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
11 #if $infile.ext == 'imzml' |
2
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
12 ln -s '${infile.extra_files_path}/imzml' infile.imzML && |
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
13 ln -s '${infile.extra_files_path}/ibd' infile.ibd && |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
14 #elif $infile.ext == 'analyze75' |
2
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
15 ln -s '${infile.extra_files_path}/hdr' infile.hdr && |
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
16 ln -s '${infile.extra_files_path}/img' infile.img && |
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
17 ln -s '${infile.extra_files_path}/t2m' infile.t2m && |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
18 #else |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
19 ln -s $infile infile.RData && |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
20 #end if |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
21 cat '${MSI_subsetting}' && |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
22 echo ${MSI_subsetting} && |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
23 Rscript '${MSI_subsetting}' |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
24 |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
25 ]]> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
26 </command> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
27 <configfiles> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
28 <configfile name="MSI_subsetting"><![CDATA[ |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
29 |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
30 |
2
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
31 ################################# load libraries and read file ################# |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
32 |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
33 |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
34 library(Cardinal) |
7
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
35 library(ggplot2) |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
36 library(gridExtra) |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
37 |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
38 #if $infile.ext == 'imzml' |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
39 #if str($processed_cond.processed_file) == "processed": |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
40 msidata <- readImzML('infile', mass.accuracy=$processed_cond.accuracy, units.accuracy = "$processed_cond.units") |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
41 #else |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
42 msidata <- readImzML('infile') |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
43 #end if |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
44 #elif $infile.ext == 'analyze75' |
2
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
45 msidata = readAnalyze('infile') |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
46 #else |
8
262db9893c6f
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents:
7
diff
changeset
|
47 loadRData <- function(fileName){ |
262db9893c6f
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents:
7
diff
changeset
|
48 load(fileName) |
262db9893c6f
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents:
7
diff
changeset
|
49 get(ls()[ls() != "fileName"]) |
262db9893c6f
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents:
7
diff
changeset
|
50 } |
262db9893c6f
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents:
7
diff
changeset
|
51 msidata = loadRData('infile.RData') |
262db9893c6f
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents:
7
diff
changeset
|
52 |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
53 #end if |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
54 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
55 |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
56 ########################### QC numbers ######################## |
3
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
57 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
58 ## Number of features (m/z) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
59 maxfeatures = length(features(msidata)) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
60 ## Range m/z |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
61 minmz = round(min(mz(msidata)), digits=2) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
62 maxmz = round(max(mz(msidata)), digits=2) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
63 ## Number of spectra (pixels) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
64 pixelcount = length(pixels(msidata)) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
65 ## Range x coordinates |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
66 minimumx = min(coord(msidata)[,1]) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
67 maximumx = max(coord(msidata)[,1]) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
68 ## Range y coordinates |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
69 minimumy = min(coord(msidata)[,2]) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
70 maximumy = max(coord(msidata)[,2]) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
71 ## Number of intensities > 0 |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
72 npeaks= sum(spectra(msidata)[]>0, na.rm=TRUE) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
73 ## Spectra multiplied with m/z (potential number of peaks) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
74 numpeaks = ncol(spectra(msidata)[])*nrow(spectra(msidata)[]) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
75 ## Percentage of intensities > 0 |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
76 percpeaks = round(npeaks/numpeaks*100, digits=2) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
77 ## Number of empty TICs |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
78 TICs = colSums(spectra(msidata)[], na.rm=TRUE) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
79 NumemptyTIC = sum(TICs == 0) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
80 ## median TIC |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
81 medint = round(median(TICs), digits=2) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
82 ## Store features for QC plot |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
83 featuresinfile = mz(msidata) |
3
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
84 |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
85 ## Next steps will only run if there are more than 0 intensities/pixels/features in the file |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
86 |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
87 if (sum(spectra(msidata)[]>0, na.rm=TRUE) > 0) |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
88 { |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
89 |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
90 |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
91 ## prepare dataframe for QC of pixel distribution (will be overwritten in filtering of pixels condition) |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
92 position_df = cbind(coord(msidata)[,1:2], rep("$infile.element_identifier", times=ncol(msidata))) |
7
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
93 colnames(position_df)[3] = "annotation" |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
94 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
95 ###################################### Filtering of pixels ##################### |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
96 ################################################################################ |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
97 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
98 #################### Pixels in the one column format "x=,y=" ##################### |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
99 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
100 #if str($pixels_cond.pixel_filtering) == "single_column": |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
101 print("single column") |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
102 |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
103 ## read tabular file, count number of rows (= number of pixels), count how many pixels are valid |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
104 input_list = read.delim("$pixels_cond.single_pixels", header = FALSE, stringsAsFactors = FALSE) |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
105 startingrow = $pixels_cond.pixel_header+1 |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
106 numberpixels = length(startingrow:nrow(input_list)) |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
107 valid_entries = input_list[startingrow:nrow(input_list),$pixels_cond.pixel_column] %in% names(pixels(msidata)) |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
108 validpixels = sum(valid_entries) |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
109 valid_annotations = input_list[valid_entries,c($pixels_cond.pixel_column, $pixels_cond.annotation_column)] |
7
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
110 colnames(valid_annotations) = c("pixel_coordinates", "annotation") |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
111 |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
112 ## for valid pixels: filter file for pixels and create dataframe with x,y,annotation for QC |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
113 if (validpixels != 0){ |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
114 ## filter file for pixels |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
115 pixelsofinterest = pixels(msidata)[names(pixels(msidata)) %in% valid_annotations[,1]] |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
116 msidata = msidata[,pixelsofinterest] |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
117 ## position_df for QC |
7
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
118 |
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
119 |
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
120 ###pixel_coords = coord(msidata)[names(pixels(msidata)) %in% valid_annotations[,1],1:2] |
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
121 pixel_coords = cbind(rownames(coord(msidata)), coord(msidata)) |
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
122 colnames(pixel_coords)[1] = "pixel_coordinates" |
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
123 |
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
124 ###position_df = cbind(pixel_coords, valid_annotations[,2]) |
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
125 position_df = merge(pixel_coords, valid_annotations) |
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
126 position_df\$annotation = factor(position_df\$annotation) |
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
127 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
128 }else{ |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
129 msidata = msidata[,0] |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
130 validpixels=0} |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
131 |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
132 ############ Pixels in two columns format: x and y in different columns ############# |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
133 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
134 #elif str($pixels_cond.pixel_filtering) == "two_columns": |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
135 print("two columns") |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
136 |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
137 ## read tabular file, count number of rows (= number of pixels), extract dataframe with x,y,annotation (for QC), count number of valid pixels |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
138 input_list = read.delim("$pixels_cond.two_columns_pixel", header = FALSE, |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
139 stringsAsFactors = FALSE) |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
140 startingrow = $pixels_cond.pixel_header+1 |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
141 numberpixels = length(startingrow:nrow(input_list)) |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
142 inputpixels = input_list[startingrow:nrow(input_list),c($pixels_cond.pixel_column_x, $pixels_cond.pixel_column_y, $pixels_cond.annotation_column_xy)] |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
143 colnames(inputpixels) = c("x", "y", "annotation") |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
144 position_df = merge(coord(msidata)[,1:2], inputpixels, by=c("x", "y"), all.x=TRUE) |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
145 validpixels = nrow(position_df) |
7
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
146 colnames(position_df)[3] = "annotation" |
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
147 position_df\$annotation = factor(position_df\$annotation) |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
148 |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
149 ## for valid pixels: filter file for pixels |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
150 if (validpixels != 0){ |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
151 pixelvector = character() |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
152 for (pixel in 1:nrow(position_df)){ |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
153 pixelvector[pixel] = paste0("x = ", position_df[pixel,1],", ", "y = ", position_df[pixel,2])} |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
154 pixelsofinterest= pixels(msidata)[names(pixels(msidata)) %in% pixelvector] |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
155 msidata = msidata[,pixelsofinterest] |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
156 }else{ |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
157 validpixels=0} |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
158 |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
159 ########### Pixels wihin x and y minima and maxima are kept ################### |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
160 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
161 #elif str($pixels_cond.pixel_filtering) == "pixel_range": |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
162 print("pixel range") |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
163 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
164 numberpixels = "range" |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
165 validpixels = "range" |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
166 |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
167 ## only filter pixels if at least one pixel will be left |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
168 if (sum(coord(msidata)\$x <= $pixels_cond.max_x_range & coord(msidata)\$x >= $pixels_cond.min_x_range) > 0 & sum(coord(msidata)\$y <= $pixels_cond.max_y_range & coord(msidata)\$y >= $pixels_cond.min_y_range) > 0){ |
2
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
169 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
170 msidata = msidata[, coord(msidata)\$x <= $pixels_cond.max_x_range & coord(msidata)\$x >= $pixels_cond.min_x_range] |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
171 msidata = msidata[, coord(msidata)\$y <= $pixels_cond.max_y_range & coord(msidata)\$y >= $pixels_cond.min_y_range] |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
172 }else{ |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
173 msidata = msidata[,0] |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
174 print("no valid pixel found")} |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
175 |
7
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
176 ## update position_df for filtered pixels |
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
177 position_df = cbind(coord(msidata)[,1:2], rep("$infile.element_identifier", times=ncol(msidata))) |
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
178 colnames(position_df)[3] = "annotation" |
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
179 position_df\$annotation = factor(position_df\$annotation) |
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
180 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
181 #elif str($pixels_cond.pixel_filtering) == "none": |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
182 print("no pixel filtering") |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
183 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
184 numberpixels = 0 |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
185 validpixels = 0 |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
186 |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
187 #end if |
3
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
188 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
189 }else{ |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
190 print("Inputfile has no intensities > 0") |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
191 } |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
192 |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
193 ################################# filtering of features ###################### |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
194 ############################################################################## |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
195 |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
196 ####################### Keep m/z from tabular file ######################### |
2
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
197 |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
198 ## feature filtering only when pixels/features/intensities are left |
7
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
199 npeaks_before_filtering= sum(spectra(msidata)[]>0, na.rm=TRUE) |
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
200 |
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
201 |
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
202 |
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
203 if (npeaks_before_filtering > 0) |
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
204 |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
205 { |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
206 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
207 #if str($features_cond.features_filtering) == "features_list": |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
208 print("feature list") |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
209 |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
210 ## read tabular file, define starting row, extract and count valid features |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
211 input_features = read.delim("$inputfeatures", header = FALSE, stringsAsFactors = FALSE) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
212 startingrow = $features_cond.feature_header+1 |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
213 extracted_features = input_features[startingrow:nrow(input_features),$features_cond.feature_column] |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
214 numberfeatures = length(extracted_features) |
2
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
215 |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
216 ## find out type of tabular file (numeric or character format) |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
217 if (grepl("m/z = ", input_features[startingrow,$features_cond.feature_column])==FALSE){ |
2
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
218 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
219 ### if input is in numeric format |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
220 if (class(extracted_features) == "numeric"){ |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
221 ### max digits given in the input file will be used to match m/z but the maximum is 4 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
222 max_digits = max(nchar(matrix(unlist(strsplit(as.character(extracted_features), "\\.")), ncol=2, byrow=TRUE)[,2])) |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
223 if (max_digits >4) |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
224 { |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
225 max_digits = 4 |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
226 } |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
227 |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
228 validfeatures = round(extracted_features, max_digits) %in% round(mz(msidata),max_digits) |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
229 featuresofinterest = features(msidata)[round(mz(msidata), digits = max_digits) %in% round(extracted_features[validfeatures], max_digits)] |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
230 validmz = length(unique(featuresofinterest)) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
231 }else{ |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
232 validmz = 0 |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
233 featuresofinterest = 0} |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
234 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
235 ### if input is already in character format (m/z = 800.01) |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
236 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
237 }else{ |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
238 validfeatures = extracted_features %in% names(features(msidata)) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
239 featuresofinterest = features(msidata)[names(features(msidata)) %in% extracted_features[validfeatures]] |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
240 validmz = sum(validfeatures)} |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
241 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
242 ### filter msidata for valid features |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
243 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
244 msidata = msidata[featuresofinterest,] |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
245 |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
246 ############### features within a given range are kept ##################### |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
247 |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
248 #elif str($features_cond.features_filtering) == "features_range": |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
249 print("feature range") |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
250 |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
251 numberfeatures = "range" |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
252 validmz = "range" |
3
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
253 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
254 if (sum(mz(msidata) >= $features_cond.min_mz & mz(msidata) <= $features_cond.max_mz)> 0){ |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
255 msidata = msidata[mz(msidata) >= $features_cond.min_mz & mz(msidata) <= $features_cond.max_mz,] |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
256 }else{ |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
257 msidata = msidata[0,] |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
258 print("no valid mz range")} |
3
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
259 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
260 ############### Remove m/z from tabular file ######################### |
3
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
261 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
262 #elif str($features_cond.features_filtering) == "remove_features": |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
263 print("remove features") |
3
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
264 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
265 ### Tabular file contains mz either as numbers or in the format mz = 800.01 |
3
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
266 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
267 input_features = read.delim("$inputfeatures_removal", header = FALSE, stringsAsFactors = FALSE) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
268 startingrow = $features_cond.removal_header+1 |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
269 extracted_features = input_features[startingrow:nrow(input_features),$features_cond.removal_column] |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
270 numberfeatures = length(extracted_features) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
271 |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
272 if (grepl("m/z = ", input_features[startingrow,$features_cond.removal_column])==TRUE){ |
3
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
273 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
274 ### if input is mz = 800 character format |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
275 print("input is in format mz = 400") |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
276 validfeatures = extracted_features %in% names(features(msidata)) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
277 validmz = sum(validfeatures) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
278 filtered_features = features(msidata)[names(features(msidata)) %in% extracted_features[validfeatures]] |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
279 featuresofinterest = mz(msidata)[filtered_features] |
3
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
280 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
281 ### if input is numeric: |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
282 }else{ |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
283 if (class(extracted_features) == "numeric"){ |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
284 print("input is numeric") |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
285 featuresofinterest = extracted_features |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
286 validmz = sum(featuresofinterest <= max(mz(msidata))& featuresofinterest >= min(mz(msidata))) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
287 }else{featuresofinterest = 0 |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
288 validmz = 0} |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
289 } |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
290 |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
291 ### Here starts removal of features: |
3
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
292 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
293 plusminus = $features_cond.removal_plusminus |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
294 |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
295 mass_to_remove = numeric() |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
296 if (sum(featuresofinterest) > 0){ |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
297 for (masses in featuresofinterest){ |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
298 #if str($features_cond.units_removal) == "ppm": |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
299 plusminus = masses * $features_cond.removal_plusminus/1000000 |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
300 #end if |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
301 current_mass = which(c(mz(msidata) <= masses + plusminus & mz(msidata) >= masses - plusminus)) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
302 mass_to_remove = append(mass_to_remove, current_mass)} |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
303 msidata= msidata[-mass_to_remove, ] |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
304 }else{print("No features were removed as they were not fitting to m/z values and/or range")} |
3
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
305 |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
306 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
307 #elif str($features_cond.features_filtering) == "none": |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
308 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
309 print("no feature filtering") |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
310 validmz = 0 |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
311 numberfeatures = 0 |
3
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
312 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
313 #end if |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
314 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
315 ## save msidata as Rfile |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
316 save(msidata, file="$msidata_filtered") |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
317 |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
318 }else{ |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
319 print("Inputfile or file filtered for pixels has no intensities > 0") |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
320 numberfeatures = NA |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
321 validmz = NA |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
322 } |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
323 |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
324 #################### QC numbers ####################### |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
325 |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
326 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
327 ## Number of features (m/z) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
328 maxfeatures2 = length(features(msidata)) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
329 ## Range m/z |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
330 minmz2 = round(min(mz(msidata)), digits=2) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
331 maxmz2 = round(max(mz(msidata)), digits=2) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
332 ## Number of spectra (pixels) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
333 pixelcount2 = length(pixels(msidata)) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
334 ## Range x coordinates |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
335 minimumx2 = min(coord(msidata)[,1]) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
336 maximumx2 = max(coord(msidata)[,1]) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
337 ## Range y coordinates |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
338 minimumy2 = min(coord(msidata)[,2]) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
339 maximumy2 = max(coord(msidata)[,2]) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
340 ## Number of intensities > 0 |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
341 npeaks2= sum(spectra(msidata)[]>0, na.rm=TRUE) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
342 ## Spectra multiplied with m/z (potential number of peaks) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
343 numpeaks2 = ncol(spectra(msidata)[])*nrow(spectra(msidata)[]) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
344 ## Percentage of intensities > 0 |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
345 percpeaks2 = round(npeaks2/numpeaks2*100, digits=2) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
346 ## Number of empty TICs |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
347 TICs2 = colSums(spectra(msidata)[], na.rm=TRUE) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
348 NumemptyTIC2 = sum(TICs2 == 0) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
349 ## median TIC |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
350 medint2 = round(median(TICs2), digits=2) |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
351 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
352 properties = c("Number of m/z features", |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
353 "Range of m/z values", |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
354 "Number of pixels", |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
355 "Range of x coordinates", |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
356 "Range of y coordinates", |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
357 "Intensities > 0", |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
358 "Median TIC per pixel", |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
359 "Number of zero TICs", |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
360 "pixel overview", |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
361 "feature overview") |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
362 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
363 before = c(paste0(maxfeatures), |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
364 paste0(minmz, " - ", maxmz), |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
365 paste0(pixelcount), |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
366 paste0(minimumx, " - ", maximumx), |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
367 paste0(minimumy, " - ", maximumy), |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
368 paste0(percpeaks, " %"), |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
369 paste0(medint), |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
370 paste0(NumemptyTIC), |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
371 paste0("input pixels: ", numberpixels), |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
372 paste0("input mz: ", numberfeatures)) |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
373 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
374 filtered = c(paste0(maxfeatures2), |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
375 paste0(minmz2, " - ", maxmz2), |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
376 paste0(pixelcount2), |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
377 paste0(minimumx2, " - ", maximumx2), |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
378 paste0(minimumy2, " - ", maximumy2), |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
379 paste0(percpeaks2, " %"), |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
380 paste0(medint2), |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
381 paste0(NumemptyTIC2), |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
382 paste0("valid pixels: ", validpixels), |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
383 paste0("valid mz: ", validmz)) |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
384 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
385 property_df = data.frame(properties, before, filtered) |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
386 |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
387 ############################### PDF QC ################################ |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
388 |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
389 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
390 pdf("filtertool_QC.pdf", fonts = "Times", pointsize = 12) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
391 plot(0,type='n',axes=FALSE,ann=FALSE) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
392 title(main=paste0("Qualitycontrol of filtering tool for file: \n\n", "$infile.display_name")) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
393 grid.table(property_df, rows= NULL) |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
394 |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
395 ## QC report with more than value-table: only when pixels/features/intensities are left |
7
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
396 if (npeaks2 > 0) |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
397 { |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
398 ### visual pixel control |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
399 |
8
262db9893c6f
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents:
7
diff
changeset
|
400 levels(position_df\$annotation) = factor(paste(1:length(levels(position_df\$annotation)), levels(position_df\$annotation), sep="_")) |
262db9893c6f
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents:
7
diff
changeset
|
401 |
7
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
402 pixel_image = ggplot(position_df, aes(x=x, y=y, fill=annotation))+ |
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
403 geom_tile(height = 1, width=1)+ |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
404 coord_fixed()+ |
7
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
405 ggtitle("Spatial orientation of filtered pixels")+ |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
406 theme_bw()+ |
7
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
407 theme(plot.title = element_text(hjust = 0.5))+ |
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
408 theme(text=element_text(family="ArialMT", face="bold", size=12))+ |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
409 theme(legend.position="bottom",legend.direction="vertical")+ |
8
262db9893c6f
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents:
7
diff
changeset
|
410 theme(legend.key.size = unit(0.2, "line"), legend.text = element_text(size = 6))+ |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
411 guides(fill=guide_legend(ncol=4,byrow=TRUE)) |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
412 |
8
262db9893c6f
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents:
7
diff
changeset
|
413 coord_labels = aggregate(cbind(x,y)~annotation, data=position_df, mean, na.rm=TRUE, na.action="na.pass") |
262db9893c6f
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents:
7
diff
changeset
|
414 coord_labels\$file_number = 1:length(levels(position_df\$annotation)) |
262db9893c6f
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents:
7
diff
changeset
|
415 |
262db9893c6f
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents:
7
diff
changeset
|
416 for(file_count in 1:nrow(coord_labels)) |
262db9893c6f
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents:
7
diff
changeset
|
417 {pixel_image = pixel_image + annotate("text",x=coord_labels[file_count,"x"], |
262db9893c6f
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents:
7
diff
changeset
|
418 y=coord_labels[file_count,"y"],label=toString(coord_labels[file_count,4]))} |
262db9893c6f
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
galaxyp
parents:
7
diff
changeset
|
419 |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
420 print(pixel_image) |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
421 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
422 ### control features which are removed |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
423 hist(mz(msidata), xlab="m/z", main="Kept m/z values") |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
424 #if str($features_cond.features_filtering) == "none": |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
425 print("no difference histogram as no m/z filtering took place") |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
426 #else: |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
427 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
428 if (isTRUE(all.equal(featuresinfile, mz(msidata)))){ |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
429 print("No difference in m/z values before and after filtering, no histogram drawn") |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
430 }else{ |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
431 hist(setdiff(featuresinfile, mz(msidata)), xlab="m/z", main="Removed m/z values")} |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
432 #end if |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
433 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
434 dev.off() |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
435 |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
436 ############################### optional intensity matrix ###################### |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
437 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
438 #if $output_matrix: |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
439 |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
440 spectramatrix = spectra(msidata)[] |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
441 spectramatrix = cbind(mz(msidata),spectramatrix) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
442 newmatrix = rbind(c("mz | spectra", names(pixels(msidata))), spectramatrix) |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
443 write.table(newmatrix, file="$matrixasoutput", quote = FALSE, row.names = FALSE, col.names=FALSE, sep = "\t") |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
444 |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
445 #end if |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
446 |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
447 }else{ |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
448 print("Inputfile or filtered file has no intensities > 0") |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
449 dev.off() |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
450 } |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
451 ]]></configfile> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
452 </configfiles> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
453 <inputs> |
3
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
454 <param name="infile" type="data" format="imzml,rdata,analyze75" |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
455 label="Inputfile as imzML, Analyze7.5 or Cardinal MSImageSet saved as RData" |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
456 help="Upload composite datatype imzML (ibd+imzML) or analyze75 (hdr+img+t2m) or regular upload .RData (Cardinal MSImageSet)"/> |
5
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
457 <conditional name="processed_cond"> |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
458 <param name="processed_file" type="select" label="Is the input file a processed imzML file "> |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
459 <option value="no_processed" selected="True">not a processed imzML</option> |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
460 <option value="processed">processed imzML</option> |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
461 </param> |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
462 <when value="no_processed"/> |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
463 <when value="processed"> |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
464 <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"/> |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
465 <param name="units" display="radio" type="select" label="Unit of the mass accuracy" help="either m/z or ppm"> |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
466 <option value="mz" >mz</option> |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
467 <option value="ppm" selected="True" >ppm</option> |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
468 </param> |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
469 </when> |
3d5ac78fb2b0
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
galaxyp
parents:
4
diff
changeset
|
470 </conditional> |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
471 |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
472 <conditional name="pixels_cond"> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
473 <param name="pixel_filtering" type="select" label="Select pixel filtering option"> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
474 <option value="none" selected="True">none</option> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
475 <option value="single_column">tabular file with single column (x = 1, y = 1)</option> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
476 <option value="two_columns">tabular file with separate columns for x and y values</option> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
477 <option value="pixel_range">ranges for x and y</option> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
478 </param> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
479 <when value="none"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
480 <when value="single_column"> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
481 <param name="single_pixels" type="data" format="tabular" label="Pixels in single column for filtering of MSI data" |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
482 help="tabular file with pixels of interest in the form x = 1, y = 1"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
483 <param name="pixel_column" data_ref="single_pixels" label="Column with pixels" type="data_column"/> |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
484 <param name="annotation_column" data_ref="single_pixels" label="Column with annotations for each pixel" type="data_column"/> |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
485 <param name="pixel_header" label="Number of header lines to skip" value="0" type="integer"/> |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
486 </when> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
487 <when value="two_columns"> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
488 <param name="two_columns_pixel" type="data" format="tabular" label="Pixels in two columns for filtering of MSI data" |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
489 help="tabular file with pixels of interest in two separate columns"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
490 <param name="pixel_column_x" data_ref="two_columns_pixel" label="Column with x values" type="data_column"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
491 <param name="pixel_column_y" data_ref="two_columns_pixel" label="Column with y values" type="data_column"/> |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
492 <param name="annotation_column_xy" data_ref="two_columns_pixel" label="Column with annotations" type="data_column"/> |
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
493 <param name="pixel_header" label="Number of header lines to skip" value="0" type="integer"/> |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
494 </when> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
495 <when value="pixel_range"> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
496 <param name="min_x_range" type="integer" value="0" label="Minimum value for x"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
497 <param name="max_x_range" type="integer" value="100" label="Maximum value for x"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
498 <param name="min_y_range" type="integer" value="0" label="Minimum value for y"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
499 <param name="max_y_range" type="integer" value="100" label="Maximum value for y"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
500 </when> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
501 </conditional> |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
502 |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
503 <conditional name="features_cond"> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
504 <param name="features_filtering" type="select" label="Select feature filtering option"> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
505 <option value="none" selected="True">none</option> |
3
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
506 <option value="features_list">keep features (tabular input)</option> |
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
507 <option value="features_range">keep features within a range (manual input)</option> |
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
508 <option value="remove_features">remove features (tabular input)</option> |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
509 </param> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
510 <when value="none"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
511 <when value="features_list"> |
3
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
512 <param name="inputfeatures" type="data" format="tabular" label="Features for filtering of MSI data" help="tabular file with m/z of interest either as numbers (800.05) or in the form m/z = 800.05"/> |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
513 <param name="feature_column" data_ref="inputfeatures" label="Column with features" type="data_column"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
514 <param name="feature_header" label="Number of header lines to skip" value="0" type="integer"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
515 </when> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
516 <when value="features_range"> |
3
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
517 <param name="min_mz" type="float" value="1" label="Minimum value for m/z"/> |
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
518 <param name="max_mz" type="float" value="100" label="Maximum value for m/z"/> |
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
519 </when> |
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
520 <when value="remove_features"> |
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
521 <param name="inputfeatures_removal" type="data" format="tabular" label="Features for filtering of MSI data" help="tabular file with m/z to be removed either as numbers (800.05) or in the form m/z = 800.05"/> |
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
522 <param name="removal_column" data_ref="inputfeatures_removal" label="Column with features" type="data_column"/> |
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
523 <param name="removal_header" label="Number of header lines to skip" value="0" type="integer"/> |
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
524 <param name="removal_plusminus" type="float" value="20" label="Window in which m/z will be removed" help="This value will be added and substracted from the given input value"/> |
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
525 <param name="units_removal" type="select" display = "radio" optional = "False" label="units"> |
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
526 <option value="ppm" selected="True">ppm</option> |
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
527 <option value="Da">Da</option> |
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
528 </param> |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
529 </when> |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
530 </conditional> |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
531 <param name="output_matrix" type="boolean" display="radio" label="Intensity matrix output"/> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
532 </inputs> |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
533 |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
534 <outputs> |
3
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
535 <data format="rdata" name="msidata_filtered" label="$infile.display_name filtered"/> |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
536 <data format="pdf" name="filtering_qc" from_work_dir="filtertool_QC.pdf" label = "$infile.display_name filtered_QC"/> |
3
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
537 <data format="tabular" name="matrixasoutput" label="$infile.display_name filtered_matrix"> |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
538 <filter>output_matrix</filter> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
539 </data> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
540 </outputs> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
541 <tests> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
542 <test expect_num_outputs="2"> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
543 <param name="infile" value="" ftype="imzml"> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
544 <composite_data value="Example_Continuous.imzML"/> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
545 <composite_data value="Example_Continuous.ibd"/> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
546 </param> |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
547 <param name="pixel_filtering" value="single_column"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
548 <param name="single_pixels" ftype="tabular" value = "inputpixels.tabular"/> |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
549 <param name="pixel_column" value="1"/> |
7
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
550 <param name="annotation_column" value="2"/> |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
551 <param name="features_filtering" value="features_list"/> |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
552 <param name="inputfeatures" ftype="tabular" value = "inputfeatures.tabular"/> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
553 <param name="feature_column" value="2"/> |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
554 <param name="feature_header" value="1"/> |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
555 <output name="filtering_qc" file="imzml_filtered.pdf" compare="sim_size" delta="20000"/> |
7
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
556 <output name="msidata_filtered" file="imzml_filtered.RData" compare="sim_size"/> |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
557 </test> |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
558 <test expect_num_outputs="2"> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
559 <param name="infile" value="" ftype="imzml"> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
560 <composite_data value="Example_Continuous.imzML"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
561 <composite_data value="Example_Continuous.ibd"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
562 </param> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
563 <param name="pixel_filtering" value="pixel_range"/> |
2
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
564 <param name="min_x_range" value="10"/> |
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
565 <param name="max_x_range" value="20"/> |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
566 <param name="min_y_range" value="2"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
567 <param name="max_y_range" value="2"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
568 <output name="filtering_qc" file="imzml_filtered2.pdf" compare="sim_size" delta="20000"/> |
7
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
569 <output name="msidata_filtered" file="imzml_filtered2.RData" compare="sim_size"/> |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
570 </test> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
571 <test expect_num_outputs="3"> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
572 <param name="infile" value="" ftype="imzml"> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
573 <composite_data value="Example_Continuous.imzML"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
574 <composite_data value="Example_Continuous.ibd"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
575 </param> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
576 <param name="pixel_filtering" value="pixel_range"/> |
2
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
577 <param name="min_x_range" value="1"/> |
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
578 <param name="max_x_range" value="20"/> |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
579 <param name="min_y_range" value="2"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
580 <param name="max_y_range" value="2"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
581 <param name="features_filtering" value="features_range"/> |
3
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
582 <param name="min_mz" value="350" /> |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
583 <param name="max_mz" value="500"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
584 <param name="output_matrix" value="True"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
585 <output name="filtering_qc" file="imzml_filtered3.pdf" compare="sim_size" delta="20000"/> |
7
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
586 <output name="msidata_filtered" file="imzml_filtered3.RData" compare="sim_size"/> |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
587 <output name="matrixasoutput" file="imzml_matrix3.tabular"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
588 </test> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
589 <test expect_num_outputs="2"> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
590 <param name="infile" value="" ftype="imzml"> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
591 <composite_data value="Example_Continuous.imzML"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
592 <composite_data value="Example_Continuous.ibd"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
593 </param> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
594 <param name="pixel_filtering" value="two_columns"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
595 <param name="two_columns_pixel" ftype="tabular" value = "inputpixels_2column.tabular"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
596 <param name="pixel_column_x" value="1"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
597 <param name="pixel_column_y" value="3"/> |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
598 <param name="annotation_column_xy" value="2"/> |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
599 <output name="filtering_qc" file="imzml_filtered4.pdf" compare="sim_size" delta="20000"/> |
7
73b5a754f35c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 620a469e20836b921b6c0147421c8a4268b66ebd
galaxyp
parents:
6
diff
changeset
|
600 <output name="msidata_filtered" file="imzml_filtered4.RData" compare="sim_size"/> |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
601 </test> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
602 <test expect_num_outputs="2"> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
603 <param name="infile" value="" ftype="imzml"> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
604 <composite_data value="Example_Continuous.imzML"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
605 <composite_data value="Example_Continuous.ibd"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
606 </param> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
607 <param name="pixel_filtering" value="pixel_range"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
608 <param name="min_x_range" value="0"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
609 <param name="max_x_range" value="10"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
610 <param name="min_y_range" value="2"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
611 <param name="max_y_range" value="20"/> |
3
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
612 <param name="features_filtering" value="features_list"/> |
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
613 <param name="inputfeatures" ftype="tabular" value = "featuresofinterest5.tabular"/> |
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
614 <param name="feature_column" value="1"/> |
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
615 <param name="feature_header" value="0"/> |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
616 <output name="filtering_qc" file="imzml_filtered5.pdf" compare="sim_size" delta="20000"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
617 <output name="msidata_filtered" file="imzml_filtered5.RData" compare="sim_size" /> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
618 </test> |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
619 <test expect_num_outputs="3"> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
620 <param name="infile" value="" ftype="analyze75"> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
621 <composite_data value="Analyze75.hdr"/> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
622 <composite_data value="Analyze75.img"/> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
623 <composite_data value="Analyze75.t2m"/> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
624 </param> |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
625 <param name="pixel_filtering" value="single_column"/> |
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
626 <param name="single_pixels" ftype="tabular" value = "inputpixels2.tabular"/> |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
627 <param name="pixel_column" value="1"/> |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
628 <param name="features_filtering" value="features_list"/> |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
629 <param name="inputfeatures" ftype="tabular" value = "featuresofinterest2.tabular"/> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
630 <param name="feature_column" value="1"/> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
631 <param name="output_matrix" value="True"/> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
632 <output name="filtering_qc" file="analyze_filtered.pdf" compare="sim_size" delta="20000"/> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
633 <output name="msidata_filtered" file="analyze_filtered.RData" compare="sim_size" /> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
634 <output name="matrixasoutput" file="analyze_matrix.tabular"/> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
635 </test> |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
636 <test expect_num_outputs="2"> |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
637 <param name="infile" value="" ftype="analyze75"> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
638 <composite_data value="Analyze75.hdr"/> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
639 <composite_data value="Analyze75.img"/> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
640 <composite_data value="Analyze75.t2m"/> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
641 </param> |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
642 <output name="filtering_qc" file="analyze75_filtered2.pdf" compare="sim_size" delta="20000"/> |
2
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
643 <output name="msidata_filtered" file="analyze_filteredoutside.RData" compare="sim_size" /> |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
644 </test> |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
645 <test expect_num_outputs="3"> |
2
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
646 <param name="infile" value="preprocessed.RData" ftype="rdata"/> |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
647 <conditional name="outputs"> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
648 <param name="outputs_select" value="no_quality_control"/> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
649 </conditional> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
650 <param name="output_matrix" value="True"/> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
651 <output name="matrixasoutput" file="rdata_matrix.tabular"/> |
1
98c101b19f3c
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
galaxyp
parents:
0
diff
changeset
|
652 <output name="msidata_filtered" file="rdata_notfiltered.RData" compare="sim_size" /> |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
653 <output name="filtering_qc" file="rdata_notfiltered.pdf" compare="sim_size" /> |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
654 </test> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
655 </tests> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
656 <help> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
657 <![CDATA[ |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
658 |
2
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
659 Cardinal is an R package that implements statistical & computational tools for analyzing mass spectrometry imaging datasets. `More information on Cardinal <http://cardinalmsi.org//>`_ |
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
660 |
3
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
661 This tool provides provides options to filter (subset) pixels and m/z features of mass spectrometry imaging data. |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
662 |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
663 Input data: 3 types of input data can be used: |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
664 |
2
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
665 - imzml file (upload imzml and ibd file via the "composite" function) `Introduction to the imzml format <https://ms-imaging.org/wp/imzml/>`_ |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
666 - Analyze7.5 (upload hdr, img and t2m file via the "composite" function) |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
667 - Cardinal "MSImageSet" data (with variable name "msidata", saved as .RData) |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
668 |
3
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
669 |
2
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
670 Options: |
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
671 |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
672 - pixel filtering/annotation: either with a tabular file containing x and y coordinates and pixel annotations or by defining a range for x and y by hand (for the latter no annotation is possible) |
3
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
673 - m/z feature filtering: can use a tabular file containing m/z of interest or by defining a range for the m/z values (! numeric input will be rounded to 2 digits before matching to m/z!) |
6
bab12ded74a5
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5bceedc3a11c950790692a4c64bbb83d46897bee
galaxyp
parents:
5
diff
changeset
|
674 - m/z feature removing: perturbing m/z such as matrix contaminants can be removed by specifying their m/z in a tabular file and optionally set a window (window in ppm or m/z in which peaks should be removed) |
3
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
675 |
2
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
676 |
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
677 Output: |
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
678 |
3
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
679 - imzML file filtered for pixels and/or m/z |
4
bf61fc662615
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
galaxyp
parents:
3
diff
changeset
|
680 - optional: pdf with heatmap showing the pixels that are left after filtering and histograms of kept and removed m/z |
3
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
681 - optional: intensity matrix as tabular file (intensities for m/z in rows and pixel in columns) |
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
682 |
2
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
683 |
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
684 Tip: |
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
685 |
3
d51c3c814d57
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit a7be47698f53eb4f00961192327d93e8989276a7
galaxyp
parents:
2
diff
changeset
|
686 - It is recommended to use the filtering tool only for m/z which have been extracted from the same dataset. If you have m/z from dataset A and you want to use them to filter dataset B, first find the corresponding (closest) features in dataset B by using the tool "Join two files on column allowing a small difference". Afterwards use the corresponding feature m/z from dataset A to filter dataset B. |
2
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
687 |
22db5eb94e50
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
galaxyp
parents:
1
diff
changeset
|
688 |
0
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
689 ]]> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
690 </help> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
691 <citations> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
692 <citation type="doi">10.1093/bioinformatics/btv146</citation> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
693 </citations> |
f17d3f1a065f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_filtering commit 3363c40790b0d64a085f980980f4289165eed27f
galaxyp
parents:
diff
changeset
|
694 </tool> |