changeset 4:bf61fc662615 draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 37da74ed68228b16efbdbde776e7c38cc06eb5d5
author galaxyp
date Tue, 19 Jun 2018 18:07:17 -0400
parents d51c3c814d57
children 3d5ac78fb2b0
files msi_filtering.xml test-data/analyze75_filtered2.pdf test-data/analyze_filtered.RData test-data/analyze_filtered.pdf test-data/analyze_filteredoutside.RData test-data/imzml_filtered.RData test-data/imzml_filtered.pdf test-data/imzml_filtered2.RData test-data/imzml_filtered2.pdf test-data/imzml_filtered3.RData test-data/imzml_filtered3.pdf test-data/imzml_filtered4.RData test-data/imzml_filtered4.pdf test-data/imzml_filtered5.RData test-data/imzml_filtered5.pdf
diffstat 15 files changed, 16 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/msi_filtering.xml	Mon Jun 11 17:33:40 2018 -0400
+++ b/msi_filtering.xml	Tue Jun 19 18:07:17 2018 -0400
@@ -1,4 +1,4 @@
-<tool id="mass_spectrometry_imaging_filtering" name="MSI filtering" version="1.10.0.1">
+<tool id="mass_spectrometry_imaging_filtering" name="MSI filtering" version="1.10.0.2">
     <description>tool for filtering mass spectrometry imaging data</description>
     <requirements>
         <requirement type="package" version="1.10.0">bioconductor-cardinal</requirement>
@@ -34,7 +34,7 @@
 library(gridExtra)
 
 #if $infile.ext == 'imzml'
-    msidata = readImzML('infile')
+    msidata <- readImzML('infile', mass.accuracy=$accuracy, units.accuracy = "$units")
 #elif $infile.ext == 'analyze75'
     msidata = readAnalyze('infile')
 #else
@@ -284,7 +284,7 @@
     medint2 = round(median(TICs2), digits=2)
 
     properties = c("Number of m/z features",
-                   "Range of m/z values [Da]",
+                   "Range of m/z values",
                    "Number of pixels", 
                    "Range of x coordinates", 
                    "Range of y coordinates",
@@ -330,10 +330,13 @@
         image(msidata, mz=$outputs.inputmz, plusminus = $outputs.plusminus_dalton, contrast.enhance = "none", 
           main= paste0($outputs.inputmz," ± ", $outputs.plusminus_dalton, " Da"), ylim = c(maximumy2+0.2*maximumy2,minimumy2-0.2*minimumy2))
 
-        ### control features which are left
-        plot(featuresinfile, rep(1,length(featuresinfile)), yaxt="n", ylab=NA, xlab="m/z values", col="red", ylim=c(0.8, 1.1), main="Distribution of m/z values")
-        lines(mz(msidata),rep(0.9, length(mz(msidata))), col="green", type="p")
-        legend("top", horiz=TRUE, legend = c("before", "filtered"), fill = c("red", "green"))
+        ### control features which are removed
+        hist(mz(msidata), xlab="m/z", main="Kept m/z values")
+        #if str($features_cond.features_filtering) == "none":
+        print("no difference histogram as no m/z filtering took place")
+        #else:
+        hist(setdiff(featuresinfile, mz(msidata)), xlab="m/z", main="Removed m/z values")
+        #end if
     }else{
         print("file has no features or pixels left")}
 
@@ -362,6 +365,11 @@
         <param name="infile" type="data" format="imzml,rdata,analyze75"
                label="Inputfile as imzML, Analyze7.5 or Cardinal MSImageSet saved as RData"
                 help="Upload composite datatype imzML (ibd+imzML) or analyze75 (hdr+img+t2m) or regular upload .RData (Cardinal MSImageSet)"/>
+        <param name="accuracy" type="float" value="50" label="Only for processed imzML files: enter mass accuracy to which the m/z values will be binned" help="This should be set to the native accuracy of the mass spectrometer, if known"/>
+        <param name="units" display="radio" type="select" label="Only for processed imzML files: unit of the mass accuracy" help="either m/z or ppm">
+            <option value="mz" >mz</option>
+            <option value="ppm" selected="True" >ppm</option>
+        </param>
         <conditional name="pixels_cond">
             <param name="pixel_filtering" type="select" label="Select pixel filtering option">
                 <option value="none" selected="True">none</option>
@@ -603,7 +611,7 @@
 Output: 
 
 - imzML file filtered for pixels and/or m/z
-- optional: pdf with heatmap showing the pixels that are left after filtering and plot of m/z before and after filtering
+- optional: pdf with heatmap showing the pixels that are left after filtering and histograms of kept and removed m/z
 - optional: intensity matrix as tabular file (intensities for m/z in rows and pixel in columns)
 
 
Binary file test-data/analyze75_filtered2.pdf has changed
Binary file test-data/analyze_filtered.RData has changed
Binary file test-data/analyze_filtered.pdf has changed
Binary file test-data/analyze_filteredoutside.RData has changed
Binary file test-data/imzml_filtered.RData has changed
Binary file test-data/imzml_filtered.pdf has changed
Binary file test-data/imzml_filtered2.RData has changed
Binary file test-data/imzml_filtered2.pdf has changed
Binary file test-data/imzml_filtered3.RData has changed
Binary file test-data/imzml_filtered3.pdf has changed
Binary file test-data/imzml_filtered4.RData has changed
Binary file test-data/imzml_filtered4.pdf has changed
Binary file test-data/imzml_filtered5.RData has changed
Binary file test-data/imzml_filtered5.pdf has changed