diff spectra_plots.xml @ 1:1d9931768896 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:30:24 -0400
parents 9c03e7a617cd
children 3642ed221eb2
line wrap: on
line diff
--- a/spectra_plots.xml	Mon Oct 01 01:08:16 2018 -0400
+++ b/spectra_plots.xml	Thu Oct 25 07:30:24 2018 -0400
@@ -1,4 +1,4 @@
-<tool id="cardinal_spectra_plots" name="MSI plot spectra" version="@VERSION@.0">
+<tool id="cardinal_spectra_plots" name="MSI plot spectra" version="@VERSION@.1">
     <description>
         mass spectrometry imaging mass spectra plots
     </description>
@@ -6,9 +6,9 @@
         <import>macros.xml</import>
     </macros>
     <expand macro="requirements">
-        <requirement type="package" version="2.2.1">r-gridextra</requirement>
-        <requirement type="package" version="2.2.1">r-ggplot2</requirement>
-        <requirement type="package" version="0.5.0">r-scales</requirement>
+        <requirement type="package" version="3.0">r-ggplot2</requirement>
+        <requirement type="package" version="2.3">r-gridextra</requirement>
+        <requirement type="package" version="1.0.0">r-scales</requirement>
     </expand>
     <command detect_errors="exit_code">
     <![CDATA[
@@ -31,6 +31,7 @@
 
 @DATA_PROPERTIES@
 
+
 ######################################## PDF ###################################
 ################################################################################
 ################################################################################
@@ -51,7 +52,13 @@
 
 ## set NA to 0 otherwise plot function will not work
 
-    spectra(msidata)[is.na(spectra(msidata)[])] = 0 ## in case of NA values they will be set to zero
+    ##spectra(msidata)[is.na(spectra(msidata)[])] = 0 ## in case of NA values they will be set to zero
+
+    spectra_df = spectra(msidata)[]
+    spectra_df[is.na(spectra_df)] = 0
+    print(paste0("Number of NA which were converted into 0:",sum(is.na(spectra_df))))
+    spectra(msidata) = spectra_df
+
 
 if (npeaks > 0){
 
@@ -88,7 +95,6 @@
             ##################### IV) plot zoom-in mass spectrum ###############
 
                     #if $chosenpixel.zoomedplot:
-                            iData(msidata) <- iData(msidata)[] ## getting back data on disk 
 
                         #for $token in $chosenpixel.zoomedplot:
 
@@ -253,6 +259,8 @@
     print("Inputfile has no intensities > 0")
     dev.off()
 }
+
+
     ]]></configfile>
     </configfiles>
     <inputs>