changeset 5:ac786240ef07 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_qualitycontrol commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
author galaxyp
date Sun, 11 Mar 2018 10:38:43 -0400
parents fef8bd551236
children 5c63fe03ed9e
files msi_qualitycontrol.xml test-data/LM8_file16output.pdf test-data/Testfile_qualitycontrol_analyze75.pdf test-data/Testfile_qualitycontrol_imzml.pdf test-data/Testfile_qualitycontrol_rdata.pdf
diffstat 5 files changed, 16 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/msi_qualitycontrol.xml	Thu Mar 01 08:25:48 2018 -0500
+++ b/msi_qualitycontrol.xml	Sun Mar 11 10:38:43 2018 -0400
@@ -1,4 +1,4 @@
-<tool id="mass_spectrometry_imaging_qc" name="MSI Qualitycontrol" version="1.7.0.3">
+<tool id="mass_spectrometry_imaging_qc" name="MSI Qualitycontrol" version="1.7.0.4">
     <description>
         mass spectrometry imaging QC
     </description>
@@ -120,10 +120,11 @@
         ### calculate how many input peptide masses are valid: 
         inputpeptides = input_list[input_list[,1]>minmz & input_list[,1]<maxmz,]
         number_peptides_in = length(input_list[,1])
-        number_peptides_valid = length(inputpeptides)
+        number_peptides_valid = length(inputpeptides[,1])
 
 #else
-    inputpeptides = data.frame(0,0)
+    ###inputpeptides = data.frame(0,0)
+    inputpeptides = as.data.frame(matrix(, nrow = 0, ncol = 2))
     number_peptides_in = 0
     number_peptides_valid = 0
 #end if
@@ -140,9 +141,12 @@
         ### calculate how many input calibrant masses are valid: 
         inputcalibrants = calibrant_list[calibrant_list[,1]>minmz & calibrant_list[,1]<maxmz,]
         number_calibrants_in = length(calibrant_list[,1])
-        number_calibrants_valid = length(inputcalibrants)
+        number_calibrants_valid = length(inputcalibrants[,1])
 #else
-    inputcalibrants = data.frame(0,0)
+    ###inputcalibrants = data.frame(0,0)
+
+    inputcalibrants = as.data.frame(matrix(, nrow = 0, ncol = 2))
+
     number_calibrants_in = 0
     number_calibrants_valid = 0
 #end if
@@ -156,6 +160,7 @@
 inputnames = inputs_all[,2]
 
 
+
 properties = c("Number of mz features",
                "Range of mz values [Da]",
                "Number of pixels", 
@@ -171,8 +176,8 @@
                "Baseline reduction",
                "Peak picking",
                "Centroided", 
-               paste0("# peptides in ", "$peptide_file.display_name"), 
-               paste0("# calibrants in ", "$calibrant_file.display_name"))
+               paste0("# peptides in \n", "$peptide_file.display_name"), 
+               paste0("# calibrants in \n", "$calibrant_file.display_name"))
 
 values = c(paste0(maxfeatures), 
            paste0(minmz, " - ", maxmz), 
@@ -369,7 +374,8 @@
           main= paste0("3", LETTERS[mass], ") ", inputnames[mass], " (", round(inputmasses[mass], digits = 2)," ± ", $plusminus_dalton, " Da)"),
                 contrast.enhance = "histogram", ylim=c(maximumy+2, 0))
         }
-    } else {print("3) The inputpeptide masses were outside the mass range")}
+    } else {print("3) The inputpeptide masses were not provided or outside the mass range")}
+
 
     ## 4) Number of peaks per pixel - image
 
@@ -422,7 +428,7 @@
     pca = PCA(msidata, ncomp=2) 
     par(mfrow = c(2,1))
     plot(pca, col=c("black", "darkgrey"), main="7) PCA for two components")
-    image(pca, col=c("black", "white"),ylim=c(maximumy+2, 0))
+    image(pca, col=c("black", "white"),ylim=c(maximumy+2, 0),  strip=FALSE)
 
 
     ############################# III) properties over acquisition (spectra index)##########
@@ -455,21 +461,6 @@
     abline(v=median(log(TICs[TICs>0])), col="blue") 
 
 
-    ## 10) intensity of chosen peptides over acquisition (pixel index)
-
-    if (length(inputcalibrants[,1]) != 0)
-    {   
-        par(mfrow = c(3, 2), oma=c(0,0,2,0))
-        intensityvector = vector()
-        for (mzvalue in 1:length(inputcalibrants[,1]))
-        {
-            mznumber = features(msidata, mz = inputcalibrants[,1][mzvalue])
-            intensityvector = spectra(msidata)[][mznumber,] 
-            plot(intensityvector, main=inputnames[mzvalue], xlab="Spectra index \n (= Acquisition time)")
-        }
-      title("10) intensity of calibrants over acquisition", outer=TRUE)
-    }else{print("10) The inputcalibrant masses were outside the mass range")}
-
     ################################## IV) changes over mz ############################
     ###################################################################################
 
@@ -560,7 +551,7 @@
           x=x+1
         }
 
-    }else{print("15) The inputcalibrant masses were outside the mass range")}
+    }else{print("15) The inputcalibrant masses were not provided or outside the mass range")}
 
 dev.off()
 }else{
@@ -625,8 +616,6 @@
 
         <test>
             <param name="infile" value="preprocessing_results1.RData" ftype="rdata"/>
-            <param name="peptide_file" value="inputpeptides.csv" ftype="txt"/>
-            <param name="calibrant_file" ftype="txt" value="inputcalibrantfile1.txt"/>
             <param name="plusminus_dalton" value="0.1"/>
             <param name="filename" value="Testfile_rdata"/>
             <output name="plots" file="Testfile_qualitycontrol_rdata.pdf" compare="sim_size" delta="20000"/>
Binary file test-data/LM8_file16output.pdf has changed
Binary file test-data/Testfile_qualitycontrol_analyze75.pdf has changed
Binary file test-data/Testfile_qualitycontrol_imzml.pdf has changed
Binary file test-data/Testfile_qualitycontrol_rdata.pdf has changed