Repository 'msi_ion_images'
hg clone https://toolshed.g2.bx.psu.edu/repos/galaxyp/msi_ion_images

Changeset 7:db0cf8eb4395 (2018-07-06)
Previous changeset 6:5a5b5a8fa8a0 (2018-06-19) Next changeset 8:6cd561bbb7ee (2018-08-15)
Commit message:
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
modified:
msi_ion_images.xml
test-data/Heatmaps_LM8_file16.pdf
test-data/Heatmaps_analyze75.pdf
test-data/Heatmaps_imzml.pdf
test-data/Heatmaps_rdata.pdf
b
diff -r 5a5b5a8fa8a0 -r db0cf8eb4395 msi_ion_images.xml
--- a/msi_ion_images.xml Tue Jun 19 18:07:40 2018 -0400
+++ b/msi_ion_images.xml Fri Jul 06 14:13:35 2018 -0400
[
@@ -1,4 +1,4 @@
-<tool id="mass_spectrometry_imaging_ion_images" name="MSI ion images" version="1.10.0.2">
+<tool id="mass_spectrometry_imaging_ion_images" name="MSI ion images" version="1.10.0.3">
     <description>
         mass spectrometry imaging m/z heatmaps
     </description>
@@ -34,10 +34,15 @@
 
 ## Read MALDI Imaging dataset
 
+
 #if $infile.ext == 'imzml'
-    msidata <- readImzML('infile', mass.accuracy=$accuracy, units.accuracy = "$units")
+    #if str($processed_cond.processed_file) == "processed":
+        msidata <- readImzML('infile', mass.accuracy=$processed_cond.accuracy, units.accuracy = "$processed_cond.units")
+    #else
+        msidata <- readImzML('infile', attach.only=TRUE)
+    #end if
 #elif $infile.ext == 'analyze75'
-    msidata = readAnalyze('infile')
+    msidata = readAnalyze('infile', attach.only=TRUE)
 #else
     load('infile.RData')
 #end if
@@ -59,17 +64,17 @@
 minimumy = min(coord(msidata)[,2])
 maximumy = max(coord(msidata)[,2])
 ## Range of intensities
-minint = round(min(spectra(msidata)[]), digits=2)
-maxint = round(max(spectra(msidata)[]), digits=2)
-medint = round(median(spectra(msidata)[]), digits=2)
+minint = round(min(spectra(msidata)[], na.rm=TRUE), digits=2)
+maxint = round(max(spectra(msidata)[], na.rm=TRUE), digits=2)
+medint = round(median(spectra(msidata)[], na.rm=TRUE), digits=2)
 ## Number of intensities > 0
-npeaks= sum(spectra(msidata)[]>0)
+npeaks= sum(spectra(msidata)[]>0, na.rm=TRUE)
 ## Spectra multiplied with m/z (potential number of peaks)
 numpeaks = ncol(spectra(msidata)[])*nrow(spectra(msidata)[])
 ## Percentage of intensities > 0
 percpeaks = round(npeaks/numpeaks*100, digits=2)
 ## Number of empty TICs
-TICs = colSums(spectra(msidata)[]) 
+TICs = colSums(spectra(msidata)[], na.rm=TRUE) 
 NumemptyTIC = sum(TICs == 0)
 
 ## Processing informations
@@ -219,11 +224,20 @@
     <inputs>
         <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="processed_cond">
+            <param name="processed_file" type="select" label="Is the input file a processed imzML file ">
+                <option value="no_processed" selected="True">not a processed imzML</option>
+                <option value="processed">processed imzML</option>
+            </param>
+            <when value="no_processed"/>
+            <when value="processed">
+                <param name="accuracy" type="float" value="50" label="Mass accuracy to which the m/z values will be binned" help="This should be set to the native accuracy of the mass spectrometer, if known"/>
+                <param name="units" display="radio" type="select" label="Unit of the mass accuracy" help="either m/z or ppm">
+                    <option value="mz" >mz</option>
+                    <option value="ppm" selected="True" >ppm</option>
+                </param>
+            </when>
+        </conditional>
         <param name="filename" type="text" value="" label="Title" help="will appear in the pdf output. If nothing given it will take the dataset name"/>
         <param name="massfile" type="data" format="tabular" label="Tabular file with m/z and names"
             help="first column m/z, second column m/z name, tab separated file"/>
@@ -239,7 +253,7 @@
         </param>
         <param name="plusminus_dalton" value="0.25" type="float" label="M/z range" help="plusminus m/z window in Dalton"/>
         <param name="strip" type="boolean" checked="True" display="radio" truevalue="TRUE" falsevalue="FALSE" label="Display m/z value in plot"/>
-        <param name="colorkey" type="boolean" checked="True" display="radio"  truevalue="TRUE" falsevalue="FALSE" label="Display colorkey in plot"/>
+        <param name="colorkey" type="boolean" checked="True" display="radio" truevalue="TRUE" falsevalue="FALSE" label="Display colorkey in plot"/>
         <conditional name="image_cond">
             <param name="image_type" type="select" label="Select the image type">
                 <option value="standard_image" selected="True">standard</option>
b
diff -r 5a5b5a8fa8a0 -r db0cf8eb4395 test-data/Heatmaps_LM8_file16.pdf
b
Binary file test-data/Heatmaps_LM8_file16.pdf has changed
b
diff -r 5a5b5a8fa8a0 -r db0cf8eb4395 test-data/Heatmaps_analyze75.pdf
b
Binary file test-data/Heatmaps_analyze75.pdf has changed
b
diff -r 5a5b5a8fa8a0 -r db0cf8eb4395 test-data/Heatmaps_imzml.pdf
b
Binary file test-data/Heatmaps_imzml.pdf has changed
b
diff -r 5a5b5a8fa8a0 -r db0cf8eb4395 test-data/Heatmaps_rdata.pdf
b
Binary file test-data/Heatmaps_rdata.pdf has changed