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

Changeset 12:ecaebe7c7b54 (2020-10-06)
Previous changeset 11:f396c176f366 (2020-09-27) Next changeset 13:0852f3d83cc3 (2020-11-29)
Commit message:
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0c667acd7cc0d0ef6c4e979ca29372b8c0d92c23"
modified:
quality_report.xml
test-data/QC_analyze75.pdf
test-data/QC_empty_spectra.pdf
test-data/QC_imzml.pdf
test-data/QC_rdata.pdf
test-data/preprocessing_results1.ibd
test-data/preprocessing_results1.imzml
test-data/preprocessing_results1.imzml.txt
test-data/preprocessing_results1.pdf
test-data/preprocessing_results2.ibd
test-data/preprocessing_results2.imzml
test-data/preprocessing_results2.imzml.txt
test-data/preprocessing_results2.pdf
test-data/preprocessing_results3.ibd
test-data/preprocessing_results3.imzml
test-data/preprocessing_results3.imzml.txt
test-data/preprocessing_results3.pdf
test-data/preprocessing_results4.ibd
test-data/preprocessing_results4.imzml
test-data/preprocessing_results4.imzml.txt
test-data/preprocessing_results4.pdf
test-data/preprocessing_results5.ibd
test-data/preprocessing_results5.imzml
test-data/preprocessing_results5.imzml.txt
test-data/preprocessing_results5.pdf
b
diff -r f396c176f366 -r ecaebe7c7b54 quality_report.xml
--- a/quality_report.xml Sun Sep 27 11:11:53 2020 +0000
+++ b/quality_report.xml Tue Oct 06 08:16:29 2020 +0000
[
@@ -1,4 +1,4 @@
-<tool id="cardinal_quality_report" name="MSI Qualitycontrol" version="@VERSION@.0">
+<tool id="cardinal_quality_report" name="MSI Qualitycontrol" version="@VERSION@.1">
     <description>
         mass spectrometry imaging QC
     </description>
@@ -67,7 +67,6 @@
 ###################### calculation of data properties ################################
 @DATA_PROPERTIES_INRAM@
 
-
 ## Median intensities
 medint = round(median(int_matrix), digits=2)
 ## Spectra multiplied with m/z (potential number of peaks)
@@ -83,6 +82,8 @@
 ## Median and sd # peaks per spectrum
 medpeaks = round(median(colSums(spectra(msidata)>0, na.rm=TRUE), na.rm=TRUE), digits=0)
 sdpeaks = round(sd(colSums(spectra(msidata)>0, na.rm=TRUE), na.rm=TRUE), digits=0)
+##max window size 
+max_window = round(mz(msidata)[nrow(msidata)]-mz(msidata)[nrow(msidata)-1], digits=2)
 ## Processing informations
 centroidedinfo = centroided(msidata)
 
@@ -138,6 +139,7 @@
                "Number of empty spectra",
                "Median TIC ± sd", 
                "Median # peaks per spectrum ± sd",
+               "maximum m/z window size",
                "Centroided", 
                paste0("input m/z (#valid/#input) in \n", "$calibrant_file.display_name"))
 
@@ -146,6 +148,7 @@
            paste0(NumemptyTIC), 
            paste0(medTIC, " ± ", sdTIC),
            paste0(medpeaks, " ± ",sdpeaks),
+           paste0(max_window),
            paste0(centroidedinfo), 
            paste0(number_calibrants_valid, " / ", number_calibrants_in))
 
@@ -222,7 +225,7 @@
     pixelxyarray=data.frame(coord(msidata)\$x, coord(msidata)\$y,pixelnumber)
     colnames(pixelxyarray) = c("x", "y", "pixelnumber")
     gg_title = "Pixel order"
-    
+
     print(ggplot(pixelxyarray, aes(x=x, y=y, fill=pixelnumber))+
      geom_tile() + coord_fixed()+
      ggtitle(gg_title) + theme_bw()+
@@ -755,6 +758,7 @@
 
     if (length(inputcalibrantmasses) != 0){
 
+
     ### calculate plusminus values in m/z for each calibrant, this is used for all following plots
     plusminusvalues = rep($plusminus_ppm/1000000, length(inputcalibrantmasses)) * inputcalibrantmasses
 
@@ -767,6 +771,17 @@
             maxmasspixel2 = features(msidata_no_NA, mz=inputcalibrantmasses[mass]+0.5)
             minmasspixel3 = features(msidata_no_NA, mz=inputcalibrantmasses[mass]-1.5)
             maxmasspixel3 = features(msidata_no_NA, mz=inputcalibrantmasses[mass]+3)
+            
+            ## test if some values are lower than min(mz)
+            minmasspixel1 = ifelse(length(minmasspixel1)>0, minmasspixel1, 1)
+            minmasspixel2 = ifelse(length(minmasspixel2)>0, minmasspixel2, 1)
+            minmasspixel3 = ifelse(length(minmasspixel3)>0, minmasspixel3, 1)
+            
+            ## test if min and max are same (more likely for centroided data):
+            maxmasspixel1 = ifelse(minmasspixel1 != maxmasspixel1, maxmasspixel1, maxmasspixel1 + 1)
+            maxmasspixel2 = ifelse(minmasspixel2 != maxmasspixel2, maxmasspixel2, maxmasspixel1 + 1)
+            maxmasspixel3 = ifelse(minmasspixel3 != maxmasspixel3, maxmasspixel3, maxmasspixel1 + 1)
+            
 
             ### find m/z with the highest mean intensity in m/z range (red line in plot 16) and calculate ppm difference for plot 17
             filtered_data = msidata_no_NA[mz(msidata_no_NA) >= inputcalibrantmasses[mass]-plusminusvalues[mass] & mz(msidata_no_NA) <= inputcalibrantmasses[mass]+plusminusvalues[mass],]
@@ -837,8 +852,10 @@
         ### plot the ppm difference calculated above: theor. m/z value to highest m/z value: 
 
         calibrant_names = as.character(inputcalibrants[,2])
+
         diff_df = data.frame(differencevector, calibrant_names)
 
+
         if (sum(is.na(diff_df[,1])) == nrow(diff_df)){
                 plot(0,type='n',axes=FALSE,ann=FALSE)
                 title(main=paste("plot 17: no peaks in the chosen region, repeat with higher ppm range"))
b
diff -r f396c176f366 -r ecaebe7c7b54 test-data/QC_analyze75.pdf
b
Binary file test-data/QC_analyze75.pdf has changed
b
diff -r f396c176f366 -r ecaebe7c7b54 test-data/QC_empty_spectra.pdf
b
Binary file test-data/QC_empty_spectra.pdf has changed
b
diff -r f396c176f366 -r ecaebe7c7b54 test-data/QC_imzml.pdf
b
Binary file test-data/QC_imzml.pdf has changed
b
diff -r f396c176f366 -r ecaebe7c7b54 test-data/QC_rdata.pdf
b
Binary file test-data/QC_rdata.pdf has changed
b
diff -r f396c176f366 -r ecaebe7c7b54 test-data/preprocessing_results1.ibd
b
Binary file test-data/preprocessing_results1.ibd has changed
b
diff -r f396c176f366 -r ecaebe7c7b54 test-data/preprocessing_results1.imzml
--- a/test-data/preprocessing_results1.imzml Sun Sep 27 11:11:53 2020 +0000
+++ b/test-data/preprocessing_results1.imzml Tue Oct 06 08:16:29 2020 +0000
b
@@ -9,8 +9,8 @@
  <fileContent>
  <cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
  <cvParam cvRef="MS" accession="MS:1000127" name="centroid spectrum" value="" />
- <cvParam cvRef="IMS" accession="IMS:1000080" name="universally unique identifier" value="25fb4349-d529-4b12-8523-a6aa0306ecf4" />
- <cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="7f41f9f5efcb31248caefc91b7d6edce87d7f42c" />
+ <cvParam cvRef="IMS" accession="IMS:1000080" name="universally unique identifier" value="07177fdd-3760-4df6-8fe2-53d28b280ae8" />
+ <cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="749fe32c8243da06001cf4643c5ce4f1ef5a98a8" />
  <cvParam cvRef="IMS" accession="IMS:1000030" name="continuous" value="" />
  </fileContent>
  </fileDescription>
@@ -42,7 +42,7 @@
  </sample>
  </sampleList>
  <softwareList count="1">
- <software id="Cardinal" version="2.4.0">
+ <software id="Cardinal" version="2.6.0">
  <cvParam cvRef="MS" accession="MS:1000799" name="custom unreleased software tool" value="" />
  </software>
  </softwareList>
b
diff -r f396c176f366 -r ecaebe7c7b54 test-data/preprocessing_results1.imzml.txt
--- a/test-data/preprocessing_results1.imzml.txt Sun Sep 27 11:11:53 2020 +0000
+++ b/test-data/preprocessing_results1.imzml.txt Tue Oct 06 08:16:29 2020 +0000
b
@@ -1,4 +1,4 @@
 imzML file:
 total 24
--rw-r--r-- 1 meli meli   216 Mai 10 17:37 ibd
--rw-r--r-- 1 meli meli 18090 Mai 10 17:37 imzml
+-rw-rw-r-- 1 meli meli   216 Oct  5 19:57 ibd
+-rw-rw-r-- 1 meli meli 18090 Oct  5 19:57 imzml
b
diff -r f396c176f366 -r ecaebe7c7b54 test-data/preprocessing_results1.pdf
b
Binary file test-data/preprocessing_results1.pdf has changed
b
diff -r f396c176f366 -r ecaebe7c7b54 test-data/preprocessing_results2.ibd
b
Binary file test-data/preprocessing_results2.ibd has changed
b
diff -r f396c176f366 -r ecaebe7c7b54 test-data/preprocessing_results2.imzml
--- a/test-data/preprocessing_results2.imzml Sun Sep 27 11:11:53 2020 +0000
+++ b/test-data/preprocessing_results2.imzml Tue Oct 06 08:16:29 2020 +0000
b
@@ -9,8 +9,8 @@
  <fileContent>
  <cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
  <cvParam cvRef="MS" accession="MS:1000127" name="centroid spectrum" value="" />
- <cvParam cvRef="IMS" accession="IMS:1000080" name="universally unique identifier" value="fa59b434-12e0-47fe-b338-814c92daa7d6" />
- <cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="5764be27b51a23d8c23e4c93befb9d8e57161bd9" />
+ <cvParam cvRef="IMS" accession="IMS:1000080" name="universally unique identifier" value="503079b4-538a-4be6-b70d-e52542c66482" />
+ <cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="a597fe6a0184ef339105b3a932f58726a9af549b" />
  <cvParam cvRef="IMS" accession="IMS:1000030" name="continuous" value="" />
  </fileContent>
  </fileDescription>
@@ -42,7 +42,7 @@
  </sample>
  </sampleList>
  <softwareList count="1">
- <software id="Cardinal" version="2.4.0">
+ <software id="Cardinal" version="2.6.0">
  <cvParam cvRef="MS" accession="MS:1000799" name="custom unreleased software tool" value="" />
  </software>
  </softwareList>
b
diff -r f396c176f366 -r ecaebe7c7b54 test-data/preprocessing_results2.imzml.txt
--- a/test-data/preprocessing_results2.imzml.txt Sun Sep 27 11:11:53 2020 +0000
+++ b/test-data/preprocessing_results2.imzml.txt Tue Oct 06 08:16:29 2020 +0000
b
@@ -1,4 +1,4 @@
 imzML file:
 total 64
--rw-r--r-- 1 meli meli 37404 Mai 10 17:38 ibd
--rw-r--r-- 1 meli meli 22796 Mai 10 17:38 imzml
+-rw-rw-r-- 1 meli meli 37404 Oct  5 19:57 ibd
+-rw-rw-r-- 1 meli meli 22796 Oct  5 19:57 imzml
b
diff -r f396c176f366 -r ecaebe7c7b54 test-data/preprocessing_results2.pdf
b
Binary file test-data/preprocessing_results2.pdf has changed
b
diff -r f396c176f366 -r ecaebe7c7b54 test-data/preprocessing_results3.ibd
b
Binary file test-data/preprocessing_results3.ibd has changed
b
diff -r f396c176f366 -r ecaebe7c7b54 test-data/preprocessing_results3.imzml
--- a/test-data/preprocessing_results3.imzml Sun Sep 27 11:11:53 2020 +0000
+++ b/test-data/preprocessing_results3.imzml Tue Oct 06 08:16:29 2020 +0000
b
@@ -9,8 +9,8 @@
  <fileContent>
  <cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
  <cvParam cvRef="MS" accession="MS:1000127" name="centroid spectrum" value="" />
- <cvParam cvRef="IMS" accession="IMS:1000080" name="universally unique identifier" value="d11b7693-3397-4d1f-9e67-29d952701100" />
- <cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="94906879d47bbdcf97126d50c906dfd76e6681e4" />
+ <cvParam cvRef="IMS" accession="IMS:1000080" name="universally unique identifier" value="be549a7e-87af-4413-9b4c-27221f55ee9a" />
+ <cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="4ee7ca6fb3f60e1adbe196068f86bc3209bace58" />
  <cvParam cvRef="IMS" accession="IMS:1000031" name="processed" value="" />
  </fileContent>
  </fileDescription>
@@ -42,7 +42,7 @@
  </sample>
  </sampleList>
  <softwareList count="1">
- <software id="Cardinal" version="2.4.0">
+ <software id="Cardinal" version="2.6.0">
  <cvParam cvRef="MS" accession="MS:1000799" name="custom unreleased software tool" value="" />
  </software>
  </softwareList>
b
diff -r f396c176f366 -r ecaebe7c7b54 test-data/preprocessing_results3.imzml.txt
--- a/test-data/preprocessing_results3.imzml.txt Sun Sep 27 11:11:53 2020 +0000
+++ b/test-data/preprocessing_results3.imzml.txt Tue Oct 06 08:16:29 2020 +0000
b
@@ -1,4 +1,4 @@
 imzML file:
 total 24
--rw-r--r-- 1 meli meli   960 Mai 10 17:39 ibd
--rw-r--r-- 1 meli meli 18112 Mai 10 17:39 imzml
+-rw-rw-r-- 1 meli meli   960 Oct  5 19:58 ibd
+-rw-rw-r-- 1 meli meli 18112 Oct  5 19:58 imzml
b
diff -r f396c176f366 -r ecaebe7c7b54 test-data/preprocessing_results3.pdf
b
Binary file test-data/preprocessing_results3.pdf has changed
b
diff -r f396c176f366 -r ecaebe7c7b54 test-data/preprocessing_results4.ibd
b
Binary file test-data/preprocessing_results4.ibd has changed
b
diff -r f396c176f366 -r ecaebe7c7b54 test-data/preprocessing_results4.imzml
--- a/test-data/preprocessing_results4.imzml Sun Sep 27 11:11:53 2020 +0000
+++ b/test-data/preprocessing_results4.imzml Tue Oct 06 08:16:29 2020 +0000
b
@@ -9,8 +9,8 @@
  <fileContent>
  <cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
  <cvParam cvRef="MS" accession="MS:1000128" name="profile spectrum" value="" />
- <cvParam cvRef="IMS" accession="IMS:1000080" name="universally unique identifier" value="9a685278-3bf0-48b5-b7c7-73a7a92625b2" />
- <cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="036c4b8bf3f2f5a42a223ffd0b895f08b0a65f36" />
+ <cvParam cvRef="IMS" accession="IMS:1000080" name="universally unique identifier" value="48842eaf-40e5-4a3f-831c-2d7a3b7e04b9" />
+ <cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="2010ba5b7d44695d891cfe3b6674a5699fa610c0" />
  <cvParam cvRef="IMS" accession="IMS:1000030" name="continuous" value="" />
  </fileContent>
  </fileDescription>
b
diff -r f396c176f366 -r ecaebe7c7b54 test-data/preprocessing_results4.imzml.txt
--- a/test-data/preprocessing_results4.imzml.txt Sun Sep 27 11:11:53 2020 +0000
+++ b/test-data/preprocessing_results4.imzml.txt Tue Oct 06 08:16:29 2020 +0000
b
@@ -1,4 +1,4 @@
 imzML file:
 total 84
--rw-rw-r-- 1 meli meli 62696 Sep 20 11:48 ibd
--rw-rw-r-- 1 meli meli 18199 Sep 20 11:48 imzml
+-rw-rw-r-- 1 meli meli 62696 Oct  5 19:58 ibd
+-rw-rw-r-- 1 meli meli 18199 Oct  5 19:58 imzml
b
diff -r f396c176f366 -r ecaebe7c7b54 test-data/preprocessing_results4.pdf
b
Binary file test-data/preprocessing_results4.pdf has changed
b
diff -r f396c176f366 -r ecaebe7c7b54 test-data/preprocessing_results5.ibd
b
Binary file test-data/preprocessing_results5.ibd has changed
b
diff -r f396c176f366 -r ecaebe7c7b54 test-data/preprocessing_results5.imzml
--- a/test-data/preprocessing_results5.imzml Sun Sep 27 11:11:53 2020 +0000
+++ b/test-data/preprocessing_results5.imzml Tue Oct 06 08:16:29 2020 +0000
b
@@ -9,8 +9,8 @@
  <fileContent>
  <cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value="" />
  <cvParam cvRef="MS" accession="MS:1000128" name="profile spectrum" value="" />
- <cvParam cvRef="IMS" accession="IMS:1000080" name="universally unique identifier" value="3aff713c-00ec-422d-b63d-efd45fbdd7cc" />
- <cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="9316138c1e7484662943bb206c79c2d074121530" />
+ <cvParam cvRef="IMS" accession="IMS:1000080" name="universally unique identifier" value="56965a72-6fd7-4879-bb80-b72cb3af4a62" />
+ <cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="5e07e272de044937cd6be7bfdbf2f4730aad10a9" />
  <cvParam cvRef="IMS" accession="IMS:1000030" name="continuous" value="" />
  </fileContent>
  </fileDescription>
@@ -42,7 +42,7 @@
  </sample>
  </sampleList>
  <softwareList count="1">
- <software id="Cardinal" version="2.4.0">
+ <software id="Cardinal" version="2.6.0">
  <cvParam cvRef="MS" accession="MS:1000799" name="custom unreleased software tool" value="" />
  </software>
  </softwareList>
b
diff -r f396c176f366 -r ecaebe7c7b54 test-data/preprocessing_results5.imzml.txt
--- a/test-data/preprocessing_results5.imzml.txt Sun Sep 27 11:11:53 2020 +0000
+++ b/test-data/preprocessing_results5.imzml.txt Tue Oct 06 08:16:29 2020 +0000
b
@@ -1,4 +1,4 @@
 imzML file:
 total 428
--rw-r--r-- 1 meli meli 415936 Mai 10 17:40 ibd
--rw-r--r-- 1 meli meli  18569 Mai 10 17:40 imzml
+-rw-rw-r-- 1 meli meli 415936 Oct  5 19:59 ibd
+-rw-rw-r-- 1 meli meli  18569 Oct  5 19:59 imzml
b
diff -r f396c176f366 -r ecaebe7c7b54 test-data/preprocessing_results5.pdf
b
Binary file test-data/preprocessing_results5.pdf has changed