diff macros.xml @ 4:e521b5767819 draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
author galaxyp
date Fri, 22 Mar 2019 08:16:20 -0400
parents e30d8b72415f
children 8da3511c9467
line wrap: on
line diff
--- a/macros.xml	Thu Feb 28 09:24:07 2019 -0500
+++ b/macros.xml	Fri Mar 22 08:16:20 2019 -0400
@@ -99,6 +99,7 @@
             #if str($processed_cond.processed_file) == "processed":
                 msidata <- readImzML('infile', mass.accuracy=$processed_cond.accuracy, units.accuracy = "$processed_cond.units")
                 centroided(msidata) = $centroids
+                iData(msidata) = iData(msidata)[]
             #else
                 msidata <- readImzML('infile')
                 centroided(msidata) = $centroids
@@ -129,14 +130,16 @@
         minimumy = min(coord(msidata)[,2])
         maximumy = max(coord(msidata)[,2])
         ## Range of intensities
-        minint = round(min(spectra(msidata)[], na.rm=TRUE), digits=2)
-        maxint = round(max(spectra(msidata)[], na.rm=TRUE), digits=2)
+        minint = round(min(spectra(msidata), na.rm=TRUE), digits=2)
+        maxint = round(max(spectra(msidata), na.rm=TRUE), digits=2)
         ## Number of intensities > 0, for if conditions
-        npeaks= sum(spectra(msidata)[]>0, na.rm=TRUE)
+        npeaks= sum(spectra(msidata)>0, na.rm=TRUE)
+        ## Number of NA in spectra matrix
+        NAcount = sum(is.na(spectra(msidata)))
         ## Number of NA in spectra matrix
-        NAcount = sum(is.na(spectra(msidata)[]))
-        ## Number of NA in spectra matrix
-        infcount = sum(is.infinite(spectra(msidata)[]))
+        infcount = sum(is.infinite(spectra(msidata)))
+        ## Number of duplicated coordinates
+        dupl_coord = sum(duplicated(coord(msidata)))
 
         properties = c("Number of m/z features",
                        "Range of m/z values",
@@ -145,7 +148,8 @@
                        "Range of y coordinates",
                        "Range of intensities", 
                        "Number of NA intensities",
-                       "Number of Inf intensities")
+                       "Number of Inf intensities", 
+                       "Number of duplicated coordinates")
 
         values = c(paste0(maxfeatures), 
                    paste0(minmz, " - ", maxmz), 
@@ -154,7 +158,8 @@
                    paste0(minimumy, " - ", maximumy), 
                    paste0(minint, " - ", maxint), 
                    paste0(NAcount), 
-                   paste0(infcount))
+                   paste0(infcount), 
+                   paste0(dupl_coord))
 
         property_df = data.frame(properties, values)
     ]]></token>
@@ -229,7 +234,7 @@
     <xml name="reading_msidata">
         <param name="infile" type="data" format="imzml,rdata,analyze75"
                label="MSI data"
-                help="Input file as imzML (composite upload), or Cardinal MSImageSet saved as RData (regular upload)"/>
+                help="Input file as imzML (composite upload), Analyze7.5 (composite upload) or Cardinal MSImageSet saved as RData (regular upload)"/>
         <param name="centroids" type="boolean" label="Centroided input" help="Choose Yes if peak detection has already been done." truevalue="TRUE" falsevalue="FALSE"/>
         <conditional name="processed_cond">
             <param name="processed_file" type="select" label="Processed imzML file" help="Choose no if your input is an Analyze7.5 or continuous imzML file">