Mercurial > repos > galaxyp > cardinal_filtering
annotate filtering.xml @ 1:aac805a9d2ae draft
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
author | galaxyp |
---|---|
date | Thu, 25 Oct 2018 07:25:13 -0400 |
parents | a2988d8d4b77 |
children | 0c4579390f73 |
rev | line source |
---|---|
1
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
1 <tool id="cardinal_filtering" name="MSI filtering" version="@VERSION@.1"> |
0
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
2 <description>tool for filtering mass spectrometry imaging data</description> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
3 <macros> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
4 <import>macros.xml</import> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
5 </macros> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
6 <expand macro="requirements"> |
1
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
7 <requirement type="package" version="2.3">r-gridextra</requirement> |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
8 <requirement type="package" version="3.0">r-ggplot2</requirement> |
0
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
9 </expand> |
1
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
10 <expand macro="print_version"/> |
0
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
11 <command detect_errors="exit_code"> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
12 <![CDATA[ |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
13 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
14 @INPUT_LINKING@ |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
15 cat '${MSI_subsetting}' && |
1
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
16 Rscript '${MSI_subsetting}' && |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
17 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
18 #if $imzml_output: |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
19 mkdir $outfile_imzml.files_path && |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
20 ls -l && |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
21 mv ./out.imzML "${os.path.join($outfile_imzml.files_path, 'imzml')}" | true && |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
22 mv ./out.ibd "${os.path.join($outfile_imzml.files_path, 'ibd')}" | true && |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
23 #end if |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
24 echo "imzML file:" > $outfile_imzml && |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
25 ls -l "$outfile_imzml.files_path" >> $outfile_imzml |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
26 |
0
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
27 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
28 ]]> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
29 </command> |
1
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
30 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
31 |
0
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
32 <configfiles> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
33 <configfile name="MSI_subsetting"><![CDATA[ |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
34 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
35 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
36 ################################# load libraries and read file ################# |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
37 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
38 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
39 library(Cardinal) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
40 library(ggplot2) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
41 library(gridExtra) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
42 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
43 @READING_MSIDATA@ |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
44 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
45 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
46 ########################### QC numbers ######################## |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
47 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
48 ## Number of features (m/z) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
49 maxfeatures = length(features(msidata)) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
50 ## Range m/z |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
51 minmz = round(min(mz(msidata)), digits=2) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
52 maxmz = round(max(mz(msidata)), digits=2) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
53 ## Number of spectra (pixels) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
54 pixelcount = length(pixels(msidata)) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
55 ## Range x coordinates |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
56 minimumx = min(coord(msidata)[,1]) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
57 maximumx = max(coord(msidata)[,1]) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
58 ## Range y coordinates |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
59 minimumy = min(coord(msidata)[,2]) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
60 maximumy = max(coord(msidata)[,2]) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
61 ## Number of intensities > 0 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
62 npeaks= sum(spectra(msidata)[]>0, na.rm=TRUE) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
63 ## Spectra multiplied with m/z (potential number of peaks) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
64 numpeaks = ncol(spectra(msidata)[])*nrow(spectra(msidata)[]) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
65 ## Percentage of intensities > 0 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
66 percpeaks = round(npeaks/numpeaks*100, digits=2) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
67 ## Number of empty TICs |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
68 TICs = colSums(spectra(msidata)[], na.rm=TRUE) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
69 NumemptyTIC = sum(TICs == 0) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
70 ## median TIC |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
71 medint = round(median(TICs), digits=2) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
72 ## Store features for QC plot |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
73 featuresinfile = mz(msidata) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
74 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
75 ## Next steps will only run if there are more than 0 intensities/pixels/features in the file |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
76 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
77 if (sum(spectra(msidata)[]>0, na.rm=TRUE) > 0) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
78 { |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
79 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
80 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
81 ## prepare dataframe for QC of pixel distribution (will be overwritten in filtering of pixels condition) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
82 position_df = cbind(coord(msidata)[,1:2], rep("$infile.element_identifier", times=ncol(msidata))) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
83 colnames(position_df)[3] = "annotation" |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
84 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
85 ###################################### Filtering of pixels ##################### |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
86 ################################################################################ |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
87 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
88 ############ Pixels in two columns format: x and y in different columns ############# |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
89 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
90 #if str($pixels_cond.pixel_filtering) == "two_columns": |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
91 print("two columns") |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
92 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
93 ## read tabular file |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
94 input_list = read.delim("$pixels_cond.annotation_file", header = $pixels_cond.tabular_header, |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
95 stringsAsFactors = FALSE) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
96 numberpixels = nrow(input_list) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
97 inputpixels = input_list[,c($pixels_cond.column_x, $pixels_cond.column_y, $pixels_cond.column_names)] |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
98 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
99 ## rewrite into x = 1, y = 1 format and filter msidata, count validpixels |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
100 pixelvector = character() |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
101 for (pixel in 1:nrow(inputpixels)){ |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
102 pixelvector[pixel] = paste0("x = ", inputpixels[pixel,1],", ", "y = ", inputpixels[pixel,2])} |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
103 pixelsofinterest= pixels(msidata)[names(pixels(msidata)) %in% pixelvector] |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
104 msidata = msidata[,pixelsofinterest] |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
105 validpixels=ncol(msidata) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
106 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
107 ## in case some pixels are left print annotation plot |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
108 colnames(inputpixels) = c("x", "y", "annotation") |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
109 position_df = merge(coord(msidata)[,1:2], inputpixels, by=c("x", "y"), all.x=TRUE) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
110 colnames(position_df)[3] = "annotation" |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
111 position_df\$annotation = factor(position_df\$annotation) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
112 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
113 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
114 ########### Pixels wihin x and y minima and maxima are kept ################### |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
115 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
116 #elif str($pixels_cond.pixel_filtering) == "pixel_range": |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
117 print("pixel range") |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
118 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
119 numberpixels = "range" |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
120 validpixels = "range" |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
121 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
122 ## only filter pixels if at least one pixel will be left |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
123 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){ |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
124 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
125 msidata = msidata[, coord(msidata)\$x <= $pixels_cond.max_x_range & coord(msidata)\$x >= $pixels_cond.min_x_range] |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
126 msidata = msidata[, coord(msidata)\$y <= $pixels_cond.max_y_range & coord(msidata)\$y >= $pixels_cond.min_y_range] |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
127 }else{ |
1
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
128 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
129 print("no valid pixel found") |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
130 msidata = msidata[,0]} |
0
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
131 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
132 ## update position_df for filtered pixels |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
133 position_df = cbind(coord(msidata)[,1:2], rep("$infile.element_identifier", times=ncol(msidata))) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
134 colnames(position_df)[3] = "annotation" |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
135 position_df\$annotation = factor(position_df\$annotation) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
136 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
137 #elif str($pixels_cond.pixel_filtering) == "none": |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
138 print("no pixel filtering") |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
139 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
140 numberpixels = 0 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
141 validpixels = 0 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
142 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
143 #end if |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
144 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
145 }else{ |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
146 print("Inputfile has no intensities > 0") |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
147 } |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
148 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
149 ################################# filtering of features ###################### |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
150 ############################################################################## |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
151 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
152 ####################### Keep m/z from tabular file ######################### |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
153 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
154 ## feature filtering only when pixels/features/intensities are left |
1
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
155 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
156 if (ncol(msidata) > 0){ |
0
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
157 npeaks_before_filtering= sum(spectra(msidata)[]>0, na.rm=TRUE) |
1
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
158 if (npeaks_before_filtering > 0) |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
159 { |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
160 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
161 #if str($features_cond.features_filtering) == "features_list": |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
162 print("feature list") |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
163 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
164 ## read tabular file, define starting row, extract and count valid features |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
165 input_features = read.delim("$mz_tabular", header = $features_cond.feature_header, stringsAsFactors = FALSE) |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
166 extracted_features = input_features[,$features_cond.feature_column] |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
167 numberfeatures = length(extracted_features) |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
168 if (class(extracted_features) == "numeric"){ |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
169 ### max digits given in the input file will be used to match m/z but the maximum is 4 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
170 max_digits = max(nchar(sapply(strsplit(as.character(extracted_features), "\\."),`[`,2)), na.rm=TRUE) |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
171 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
172 if (max_digits >4) |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
173 { |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
174 max_digits = 4 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
175 } |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
176 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
177 validfeatures = round(extracted_features, max_digits) %in% round(mz(msidata),max_digits) |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
178 featuresofinterest = features(msidata)[round(mz(msidata), digits = max_digits) %in% round(extracted_features[validfeatures], max_digits)] |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
179 validmz = length(unique(featuresofinterest)) |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
180 }else{ |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
181 validmz = 0 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
182 featuresofinterest = 0} |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
183 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
184 ### filter msidata for valid features |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
185 msidata = msidata[featuresofinterest,] |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
186 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
187 ############### features within a given range are kept ##################### |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
188 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
189 #elif str($features_cond.features_filtering) == "features_range": |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
190 print("feature range") |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
191 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
192 numberfeatures = "range" |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
193 validmz = "range" |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
194 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
195 if (sum(mz(msidata) >= $features_cond.min_mz & mz(msidata) <= $features_cond.max_mz)> 0){ |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
196 msidata = msidata[mz(msidata) >= $features_cond.min_mz & mz(msidata) <= $features_cond.max_mz,] |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
197 }else{ |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
198 msidata = msidata[0,] |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
199 print("no valid mz range")} |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
200 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
201 ############### Remove m/z from tabular file ######################### |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
202 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
203 #elif str($features_cond.features_filtering) == "remove_features": |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
204 print("remove features") |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
205 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
206 ## read tabular file, define starting row, extract and count valid features |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
207 input_features = read.delim("$mz_tabular", header = $features_cond.removal_header, stringsAsFactors = FALSE) |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
208 extracted_features = input_features[,$features_cond.removal_column] |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
209 numberfeatures = length(extracted_features) |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
210 if (class(extracted_features) == "numeric"){ |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
211 print("input is numeric") |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
212 featuresofinterest = extracted_features |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
213 validmz = sum(featuresofinterest <= max(mz(msidata))& featuresofinterest >= min(mz(msidata))) |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
214 }else{featuresofinterest = 0 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
215 validmz = 0} |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
216 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
217 ### Here starts removal of features: |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
218 plusminus = $features_cond.removal_plusminus |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
219 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
220 mass_to_remove = numeric() |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
221 if (sum(featuresofinterest) > 0){ |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
222 for (masses in featuresofinterest){ |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
223 #if str($features_cond.units_removal) == "ppm": |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
224 plusminus = masses * $features_cond.removal_plusminus/1000000 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
225 #end if |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
226 current_mass = which(c(mz(msidata) <= masses + plusminus & mz(msidata) >= masses - plusminus)) |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
227 mass_to_remove = append(mass_to_remove, current_mass)} |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
228 msidata= msidata[-mass_to_remove, ] |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
229 }else{print("No features were removed as they were not fitting to m/z values and/or range")} |
0
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
230 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
231 |
1
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
232 #elif str($features_cond.features_filtering) == "none": |
0
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
233 |
1
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
234 print("no feature filtering") |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
235 validmz = 0 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
236 numberfeatures = 0 |
0
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
237 |
1
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
238 #end if |
0
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
239 |
1
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
240 ## save msidata as Rfile |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
241 save(msidata, file="$msidata_filtered") |
0
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
242 |
1
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
243 ## Number of empty TICs |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
244 TICs2 = colSums(spectra(msidata)[], na.rm=TRUE) |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
245 ## Number of intensities > 0 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
246 npeaks2= sum(spectra(msidata)[]>0, na.rm=TRUE) |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
247 ## Spectra multiplied with m/z (potential number of peaks) |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
248 numpeaks2 = ncol(spectra(msidata)[])*nrow(spectra(msidata)[]) |
0
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
249 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
250 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
251 |
1
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
252 }else{ |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
253 print("Inputfile or file filtered for pixels has no intensities > 0") |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
254 numberfeatures = NA |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
255 validmz = NA |
0
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
256 ## Number of empty TICs |
1
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
257 TICs2 = 0 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
258 npeaks2 = 0 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
259 numpeaks2 = 0 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
260 } |
0
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
261 }else{ |
1
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
262 print("Inputfile or file filtered for pixels has no pixels left") |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
263 numberfeatures = NA |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
264 validmz = NA |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
265 ## Number of empty TICs |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
266 TICs2 = 0 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
267 npeaks2 = 0 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
268 numpeaks2 = 0 |
0
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
269 } |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
270 #################### QC numbers ####################### |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
271 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
272 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
273 ## Number of features (m/z) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
274 maxfeatures2 = length(features(msidata)) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
275 ## Range m/z |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
276 minmz2 = round(min(mz(msidata)), digits=2) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
277 maxmz2 = round(max(mz(msidata)), digits=2) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
278 ## Number of spectra (pixels) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
279 pixelcount2 = length(pixels(msidata)) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
280 ## Range x coordinates |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
281 minimumx2 = min(coord(msidata)[,1]) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
282 maximumx2 = max(coord(msidata)[,1]) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
283 ## Range y coordinates |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
284 minimumy2 = min(coord(msidata)[,2]) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
285 maximumy2 = max(coord(msidata)[,2]) |
1
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
286 |
0
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
287 ## Percentage of intensities > 0 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
288 percpeaks2 = round(npeaks2/numpeaks2*100, digits=2) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
289 ## Number of empty TICs |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
290 NumemptyTIC2 = sum(TICs2 == 0) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
291 ## median TIC |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
292 medint2 = round(median(TICs2), digits=2) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
293 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
294 properties = c("Number of m/z features", |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
295 "Range of m/z values", |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
296 "Number of pixels", |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
297 "Range of x coordinates", |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
298 "Range of y coordinates", |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
299 "Intensities > 0", |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
300 "Median TIC per pixel", |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
301 "Number of empty spectra", |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
302 "pixel overview", |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
303 "feature overview") |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
304 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
305 before = c(paste0(maxfeatures), |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
306 paste0(minmz, " - ", maxmz), |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
307 paste0(pixelcount), |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
308 paste0(minimumx, " - ", maximumx), |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
309 paste0(minimumy, " - ", maximumy), |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
310 paste0(percpeaks, " %"), |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
311 paste0(medint), |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
312 paste0(NumemptyTIC), |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
313 paste0("input pixels: ", numberpixels), |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
314 paste0("input mz: ", numberfeatures)) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
315 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
316 filtered = c(paste0(maxfeatures2), |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
317 paste0(minmz2, " - ", maxmz2), |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
318 paste0(pixelcount2), |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
319 paste0(minimumx2, " - ", maximumx2), |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
320 paste0(minimumy2, " - ", maximumy2), |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
321 paste0(percpeaks2, " %"), |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
322 paste0(medint2), |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
323 paste0(NumemptyTIC2), |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
324 paste0("valid pixels: ", validpixels), |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
325 paste0("valid mz: ", validmz)) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
326 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
327 property_df = data.frame(properties, before, filtered) |
1
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
328 print(property_df) |
0
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
329 |
1
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
330 ########################### PDF QC and imzml output ########################### |
0
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
331 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
332 pdf("filtertool_QC.pdf", fonts = "Times", pointsize = 12) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
333 plot(0,type='n',axes=FALSE,ann=FALSE) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
334 title(main=paste0("Qualitycontrol of filtering tool for file: \n\n", "$infile.display_name")) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
335 grid.table(property_df, rows= NULL) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
336 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
337 ## QC report with more than value-table: only when pixels/features/intensities are left |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
338 if (npeaks2 > 0) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
339 { |
1
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
340 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
341 ## save msidata as imzML file, will only work if there is at least 1 m/z left |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
342 #if $imzml_output: |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
343 if (maxfeatures2 > 0){ |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
344 writeImzML(msidata, "out")} |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
345 #end if |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
346 |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
347 |
0
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
348 ### visual pixel control |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
349 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
350 levels(position_df\$annotation) = factor(paste(1:length(levels(position_df\$annotation)), levels(position_df\$annotation), sep="_")) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
351 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
352 pixel_image = ggplot(position_df, aes(x=x, y=y, fill=annotation))+ |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
353 geom_tile(height = 1, width=1)+ |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
354 coord_fixed()+ |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
355 ggtitle("Spatial orientation of filtered pixels")+ |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
356 theme_bw()+ |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
357 theme(plot.title = element_text(hjust = 0.5))+ |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
358 theme(text=element_text(family="ArialMT", face="bold", size=12))+ |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
359 theme(legend.position="bottom",legend.direction="vertical")+ |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
360 theme(legend.key.size = unit(0.2, "line"), legend.text = element_text(size = 6))+ |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
361 guides(fill=guide_legend(ncol=4,byrow=TRUE)) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
362 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
363 coord_labels = aggregate(cbind(x,y)~annotation, data=position_df, mean, na.rm=TRUE, na.action="na.pass") |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
364 coord_labels\$file_number = 1:length(levels(position_df\$annotation)) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
365 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
366 for(file_count in 1:nrow(coord_labels)) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
367 {pixel_image = pixel_image + annotate("text",x=coord_labels[file_count,"x"], |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
368 y=coord_labels[file_count,"y"],label=toString(coord_labels[file_count,4]))} |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
369 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
370 print(pixel_image) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
371 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
372 ### control features which are removed |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
373 hist(mz(msidata), xlab="m/z", main="Kept m/z values") |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
374 #if str($features_cond.features_filtering) == "none": |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
375 print("no difference histogram as no m/z filtering took place") |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
376 #else: |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
377 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
378 if (isTRUE(all.equal(featuresinfile, mz(msidata)))){ |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
379 print("No difference in m/z values before and after filtering, no histogram drawn") |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
380 }else{ |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
381 hist(setdiff(featuresinfile, mz(msidata)), xlab="m/z", main="Removed m/z values")} |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
382 #end if |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
383 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
384 dev.off() |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
385 |
1
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
386 |
0
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
387 }else{ |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
388 print("Inputfile or filtered file has no intensities > 0") |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
389 dev.off() |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
390 } |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
391 ]]></configfile> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
392 </configfiles> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
393 <inputs> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
394 <expand macro="reading_msidata"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
395 <conditional name="pixels_cond"> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
396 <param name="pixel_filtering" type="select" label="Select pixel filtering option"> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
397 <option value="none" selected="True">none</option> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
398 <option value="two_columns">list of pixel coordinates (tabular file)</option> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
399 <option value="pixel_range">ranges for x and y (manually)</option> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
400 </param> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
401 <when value="none"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
402 <when value="two_columns"> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
403 <expand macro="reading_pixel_annotations"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
404 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
405 </when> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
406 <when value="pixel_range"> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
407 <param name="min_x_range" type="integer" value="0" label="Minimum value for x"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
408 <param name="max_x_range" type="integer" value="100" label="Maximum value for x"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
409 <param name="min_y_range" type="integer" value="0" label="Minimum value for y"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
410 <param name="max_y_range" type="integer" value="100" label="Maximum value for y"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
411 </when> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
412 </conditional> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
413 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
414 <conditional name="features_cond"> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
415 <param name="features_filtering" type="select" label="Select m/z feature filtering option"> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
416 <option value="none" selected="True">none</option> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
417 <option value="features_list">keep a list of m/z (tabular file)</option> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
418 <option value="features_range">m/z range (manually)</option> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
419 <option value="remove_features">remove a list of m/z (tabular file)</option> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
420 </param> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
421 <when value="none"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
422 <when value="features_list"> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
423 <expand macro="reading_1_column_mz_tabular" label="Tabular file with m/z features to keep"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
424 </when> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
425 <when value="features_range"> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
426 <param name="min_mz" type="float" value="1" label="Minimum value for m/z"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
427 <param name="max_mz" type="float" value="100" label="Maximum value for m/z"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
428 </when> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
429 <when value="remove_features"> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
430 <expand macro="reading_1_column_mz_tabular" label="Tabular file with m/z features to remove"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
431 <param name="removal_plusminus" type="float" value="20" label="Window in which all m/z will be removed" help="This value is the half window size, it will be added and substracted from the given input value"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
432 <param name="units_removal" type="select" display="radio" optional ="False" label="units"> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
433 <option value="ppm" selected="True">ppm</option> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
434 <option value="Da">Da</option> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
435 </param> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
436 </when> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
437 </conditional> |
1
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
438 <param name="imzml_output" type="boolean" label="Output of imzML file" truevalue="TRUE" falsevalue="FALSE"/> |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
439 |
0
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
440 </inputs> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
441 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
442 <outputs> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
443 <data format="rdata" name="msidata_filtered" label="${tool.name} on ${on_string}"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
444 <data format="pdf" name="QC_overview" from_work_dir="filtertool_QC.pdf" label = "${tool.name} on ${on_string}: QC"/> |
1
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
445 <data format="imzml" name="outfile_imzml" label="${tool.name} on ${on_string}: imzML"> |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
446 <filter>imzml_output</filter> |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
447 </data> |
0
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
448 </outputs> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
449 <tests> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
450 <test> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
451 <expand macro="infile_imzml"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
452 <param name="pixel_filtering" value="pixel_range"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
453 <param name="min_x_range" value="1"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
454 <param name="max_x_range" value="20"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
455 <param name="min_y_range" value="2"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
456 <param name="max_y_range" value="2"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
457 <param name="features_filtering" value="features_range"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
458 <param name="min_mz" value="350" /> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
459 <param name="max_mz" value="500"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
460 <output name="QC_overview" file="imzml_filtered3.pdf" compare="sim_size"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
461 <output name="msidata_filtered" file="imzml_filtered3.RData" compare="sim_size"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
462 </test> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
463 <test> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
464 <expand macro="infile_imzml"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
465 <param name="pixel_filtering" value="two_columns"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
466 <param name="annotation_file" ftype="tabular" value = "inputpixels_2column.tabular"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
467 <param name="column_x" value="1"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
468 <param name="column_y" value="3"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
469 <param name="column_names" value="2"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
470 <output name="QC_overview" file="imzml_filtered4.pdf" compare="sim_size"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
471 <output name="msidata_filtered" file="imzml_filtered4.RData" compare="sim_size"/> |
1
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
472 <!--imzml output test not yet working: output name="outfile_imzml" file="filtering_imzmls/summary" compare="sim_size" delta="10000"> |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
473 <extra_files type="file" name="imzml" value="filtering_imzmls/out4.imzML" compare="sim_size" delta="10000"/> |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
474 <extra_files type="file" name="ibd" value="filtering_imzmls/out4.ibd" compare="sim_size" delta="10000"/> |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
475 </output--> |
0
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
476 </test> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
477 <test> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
478 <expand macro="infile_imzml"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
479 <param name="pixel_filtering" value="pixel_range"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
480 <param name="min_x_range" value="0"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
481 <param name="max_x_range" value="10"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
482 <param name="min_y_range" value="2"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
483 <param name="max_y_range" value="20"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
484 <param name="features_filtering" value="features_list"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
485 <param name="mz_tabular" ftype="tabular" value = "featuresofinterest5.tabular"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
486 <param name="feature_column" value="1"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
487 <param name="feature_header" value="0"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
488 <output name="QC_overview" file="imzml_filtered5.pdf" compare="sim_size"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
489 <output name="msidata_filtered" file="imzml_filtered5.RData" compare="sim_size" /> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
490 </test> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
491 <test> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
492 <expand macro="infile_analyze75"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
493 <output name="QC_overview" file="analyze75_filtered2.pdf" compare="sim_size"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
494 <output name="msidata_filtered" file="analyze_filteredoutside.RData" compare="sim_size" /> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
495 </test> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
496 <test> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
497 <param name="infile" value="preprocessed.RData" ftype="rdata"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
498 <conditional name="outputs"> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
499 <param name="outputs_select" value="no_quality_control"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
500 </conditional> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
501 <output name="msidata_filtered" file="rdata_notfiltered.RData" compare="sim_size"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
502 <output name="QC_overview" file="rdata_notfiltered.pdf" compare="sim_size" /> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
503 </test> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
504 </tests> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
505 <help> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
506 <![CDATA[ |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
507 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
508 @CARDINAL_DESCRIPTION@ |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
509 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
510 ----- |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
511 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
512 This tool provides options to filter (subset) pixels and m/z features of mass spectrometry imaging data. |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
513 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
514 @MSIDATA_INPUT_DESCRIPTION@ |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
515 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
516 @SPECTRA_TABULAR_INPUT_DESCRIPTION@ |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
517 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
518 @MZ_TABULAR_INPUT_DESCRIPTION@ |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
519 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
520 **Options** |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
521 |
1
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
522 - 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). Pixel that are not present in the dataset are ignored. It is not possible to filter only for pixels that are not present in the dataset. |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
523 - m/z feature filtering: m/z values for filtering should be either imported as a tabular file containing containing m/z of interest or by defining a range for the m/z values. m/z that are not present in the dataset are ignored. It is not possible to filter only for m/z that are not present in the dataset. |
0
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
524 - m/z feature removing: perturbing m/z features such as matrix contaminants can be removed by specifying their m/z in a tabular file, optionally with a half window size in ppm or m/z for the window in which peaks should be removed. |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
525 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
526 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
527 **Tips** |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
528 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
529 - Numeric m/z features imported via a tabular file and m/z features of the dataset are rounded to 4 decimal points (or maximum number of decimal points of input m/z) and then matched. Therefore, it is recommended to use the filtering tool only for m/z which have been extracted from the same dataset. If the m/z values are from a different dataset, the tool "Join two files on column allowing a small difference" should be used to find corresponding m/z values, which can then be used for filtering. |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
530 - In case tabular file cannot be selected in drop-down menu: Datatype in Galaxy must be tabular otherwise file will not appear in selection window (if Galaxy auto-detection was wrong, datatype can be changed by pressing the pen button (edit attributes)) |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
531 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
532 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
533 **Output** |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
534 |
1
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
535 - MSI data as .RData output (can be read with the Cardinal package in R) |
aac805a9d2ae
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d2f311f7fff24e54c565127c40414de708e31b3c
galaxyp
parents:
0
diff
changeset
|
536 - optional: MSI data as imzML file |
0
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
537 - pdf with heatmap showing the pixels that are left after filtering and histograms of kept and removed m/z |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
538 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
539 |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
540 ]]> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
541 </help> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
542 <expand macro="citations"/> |
a2988d8d4b77
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
galaxyp
parents:
diff
changeset
|
543 </tool> |