diff msi_qualitycontrol.xml @ 3:f6aa0cff777c draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit 9f8984da558d0a307fed3ff3af9313829d2e5baa
author galaxyp
date Sat, 24 Feb 2018 12:48:28 -0500
parents 1ccbda92b76b
children fef8bd551236
line wrap: on
line diff
--- a/msi_qualitycontrol.xml	Fri Nov 24 18:08:38 2017 -0500
+++ b/msi_qualitycontrol.xml	Sat Feb 24 12:48:28 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="mass_spectrometry_imaging_qc" name="MSI Qualitycontrol" version="1.7.0.1">
+<tool id="mass_spectrometry_imaging_qc" name="MSI Qualitycontrol" version="1.7.0.2">
     <description>
         mass spectrometry imaging QC
     </description>
@@ -159,7 +159,7 @@
                "Baseline reduction",
                "Peak picking",
                "Centroided", 
-               "# valid input masses")
+                paste0("# valid masses in ", "$filename"))
 
 values = c(paste0(maxfeatures), 
            paste0(minmz, " - ", maxmz), 
@@ -176,7 +176,7 @@
            paste0(baselinereductioninfo),
            paste0(peakpickinginfo),
            paste0(centroidedinfo), 
-           paste0(length(inputmasses)))
+           paste0(length(inputmasses), "/", length(calibrant_list[,1])+length(input_list[,1])))
 
 
 property_df = data.frame(properties, values)
@@ -287,6 +287,12 @@
             mass2 = $foldchanges.mass2
             distance = $foldchanges.distance
 
+            #if not str($foldchanges.filenameratioplot).strip():
+                #set $label = "Fold change %s Da / %s Da" % ($foldchanges.mass1, $foldchanges.mass2)
+            #else:
+                #set $label = $foldchanges.filenameratioplot
+            #end if
+
             ### find rows which contain masses: 
 
             mzrowdown1 = features(msidata, mz = mass1-distance)
@@ -339,8 +345,8 @@
             ratiomatrix = cbind(foldchange, coord(msidata))
 
             print(ggplot(ratiomatrix, aes(x=x, y=y, fill=foldchange), colour=colo)
-             +scale_y_reverse() + geom_tile() + coord_fixed()
-             + ggtitle(paste0("Fold change ", mass1, " Da / ", mass2, " Da"))
+             + geom_tile() + coord_fixed()
+             + ggtitle("$label")
              + theme_bw()
              + theme(text=element_text(family="ArialMT", face="bold", size=12))
              + scale_fill_gradientn(colours = c("blue", "purple" , "red","orange")
@@ -350,11 +356,12 @@
 
     ## 3) Calibrant images:
 
+    par(mfrow=c(1,1), mar=c(5.1, 4.1, 4.1, 2.1), mgp=c(3, 1, 0), las=0)
     if (length(inputmasses) != 0)
     {   for (mass in 1:length(inputmasses))
         {
           image(msidata, mz=inputmasses[mass], plusminus=$plusminusinDalton, 
-                main= paste0("3",LETTERS[mass], ") ", inputnames[mass], " (", round(inputmasses[mass], digits = 2), " Da)"), 
+          main= paste0("3", LETTERS[mass], ") ", inputnames[mass], " (", round(inputmasses[mass], digits = 2)," ± ", $plusminusinDalton, " Da)"),
                 contrast.enhance = "histogram", ylim=c(maxy+1, 0))
         }
     } else {print("3) The inputpeptide masses were outside the mass range")}
@@ -559,7 +566,7 @@
     ]]></configfile>
     </configfiles>
     <inputs>
-        <param name="infile" type="data" format="imzml, rdata, analyze75" label="Inputfile as imzML, Analyze7.5 or Cardinal MSImageSet saved as RData"
+        <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="filename" type="text" value="" optional="true" label="Title" help="will appear in the quality report. If nothing given it will take the dataset name."/>
         <param name="inputpeptidefile" type="data" optional="true" format="txt, csv" label="Text file with peptidemasses and names"
@@ -572,6 +579,7 @@
             <param name="mass1" value="1111" type="float" label="Mass 1" help="First mass in Dalton"/>
             <param name="mass2" value="2222" type="float" label="Mass 2" help="Second mass in Dalton"/>
             <param name="distance" value="0.25" type="float" label="Distance in Dalton" help="Distance in Da used to find peak maximum from input masses in both directions"/>
+            <param name="filenameratioplot" type="text" optional="true" label="Title" help="Optional title for fold change plot."/>
         </repeat>
     </inputs>
     <outputs>