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

Changeset 15:23d0394b5908 (2021-08-29)
Previous changeset 14:5a35e3a8d013 (2020-12-23) Next changeset 16:fde8ba3a0766 (2022-02-22)
Commit message:
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit c8d3adac445b4e08e2724e22d7201bfc38bbf40f"
modified:
macros.xml
quality_report.xml
test-data/pixels_test6.tabular
test-data/preprocessing_results4.ibd
test-data/preprocessing_results4.imzml
test-data/preprocessing_results4.imzml.txt
test-data/preprocessing_results4.pdf
test-data/test1.pdf
test-data/test2.pdf
test-data/test3.pdf
test-data/test4.pdf
test-data/test5.pdf
test-data/test6.pdf
test-data/test6.rdata
test-data/test7.pdf
test-data/test7.rdata
added:
test-data/QC_imzml_shortreport.pdf
b
diff -r 5a35e3a8d013 -r 23d0394b5908 macros.xml
--- a/macros.xml Wed Dec 23 22:36:04 2020 +0000
+++ b/macros.xml Sun Aug 29 07:30:21 2021 +0000
b
@@ -1,5 +1,5 @@
 <macros>
-    <token name="@VERSION@">2.6.0</token>
+    <token name="@VERSION@">2.10.0</token>
 
     <xml name="requirements">
         <requirements>
b
diff -r 5a35e3a8d013 -r 23d0394b5908 quality_report.xml
--- a/quality_report.xml Wed Dec 23 22:36:04 2020 +0000
+++ b/quality_report.xml Sun Aug 29 07:30:21 2021 +0000
[
b'@@ -1,4 +1,4 @@\n-<tool id="cardinal_quality_report" name="MSI Qualitycontrol" version="@VERSION@.1">\n+<tool id="cardinal_quality_report" name="MSI Qualitycontrol" version="@VERSION@.0">\n     <description>\n         mass spectrometry imaging QC\n     </description>\n@@ -7,9 +7,9 @@\n     </macros>\n     <expand macro="requirements">\n         <requirement type="package" version="2.3">r-gridextra</requirement>\n-        <requirement type="package" version="3.3.2">r-ggplot2</requirement>\n+        <requirement type="package" version="3.3.5">r-ggplot2</requirement>\n         <requirement type="package" version="1.1_2">r-rcolorbrewer</requirement>\n-        <requirement type="package" version="2.23_17">r-kernsmooth</requirement>\n+        <requirement type="package" version="2.23_20">r-kernsmooth</requirement>\n         <requirement type="package" version="1.1.1">r-scales</requirement>\n         <requirement type="package" version="1.0.12">r-pheatmap</requirement>\n     </expand>\n@@ -359,24 +359,29 @@\n     #end if\n \n     #################### 4) m/z heatmaps #######################################\n-    par(mfrow=c(1,1), mar=c(5.1, 4.1, 4.1, 2.1), mgp=c(3, 1, 0), las=0)\n-    if (length(inputcalibrants[,1]) != 0){\n-        for (mass in 1:length(inputcalibrants[,1])){\n-            par(oma=c(0,0,0,1))## margin for image legend\n+   \n+    #if $report_depth:\n+       \n+\t\tpar(mfrow=c(1,1), mar=c(5.1, 4.1, 4.1, 2.1), mgp=c(3, 1, 0), las=0)\n+\t\tif (length(inputcalibrants[,1]) != 0){\n+\t\tfor (mass in 1:length(inputcalibrants[,1])){\n+\t\t\tpar(oma=c(0,0,0,1))## margin for image legend\n \n-           tryCatch(\n-                        {\n-                        print(image(msidata, mz=inputcalibrants[,1][mass], plusminus=plusminusvalues[mass], \n-            main= paste0(inputcalibrants[,2][mass], ": ", round(inputcalibrants[,1][mass], digits = 2)," (\xc2\xb1",$plusminus_ppm, " ppm)"),\n-            contrast.enhance = "histogram", strip=FALSE, ylim= c(maximumy,minimumy)))\n-                        },\n-                        error=function(cond) {\n-                        ## if there are not enough intensities in the mz range skip creating an image\n-                        print(paste0("Not enough intensities > 0 for m/z ", inputcalibrants[,1][mass]))\n-                        }\n-                    )    \n-        }\n-    } else {print("4) The input peptide and calibrant m/z were not provided or outside the m/z range")}\n+\t\t   tryCatch(\n+\t\t\t\t{\n+\t\t\t\tprint(image(msidata, mz=inputcalibrants[,1][mass], plusminus=plusminusvalues[mass], \n+\t\t\tmain= paste0(inputcalibrants[,2][mass], ": ", round(inputcalibrants[,1][mass], digits = 2)," (\xc2\xb1",$plusminus_ppm, " ppm)"),\n+\t\t\tcontrast.enhance = "histogram", strip=FALSE, ylim= c(maximumy,minimumy)))\n+\t\t\t\t},\n+\t\t\t\terror=function(cond) {\n+\t\t\t\t## if there are not enough intensities in the mz range skip creating an image\n+\t\t\t\tprint(paste0("Not enough intensities > 0 for m/z ", inputcalibrants[,1][mass]))\n+\t\t\t\t}\n+\t\t\t\t)    \n+\t\t}\n+\t\t} else {print("4) The input peptide and calibrant m/z were not provided or outside the m/z range")}\n+\t\t\n+    #end if\n \n     #################### 5) Number of peaks per pixel - image ##################\n \n@@ -419,72 +424,75 @@\n \n     ############################### 6b) median int image ###############################\n \n-    median_int = pixelApply(msidata, median, na.rm=TRUE)\n+    #if $report_depth:\n+    \n+\t\tmedian_int = pixelApply(msidata, median, na.rm=TRUE)\n \n-    median_coordarray=data.frame(coord(msidata)\\$x, coord(msidata)\\$y, median_int)\n-    colnames(median_coordarray) = c("x", "y", "median_int")\n-    print(ggplot(median_coordarray, aes(x=x, y=y, fill=median_int))+\n-     geom_tile() + coord_fixed() +\n-     ggtitle("Median intensity per spectrum")+\n-     theme_bw() +\n-     theme(plot.title = element_text(hjust = 0.5))+\n-     theme(text=element_text(family="ArialMT", face="bold", size=12))+\n-     scale_fill_gradientn(colours = c("blue", "purple" , "red","orange") \n-                            ,space = "Lab", na.value '..b'ol="black"))\n+\t\tpar(mfrow = c(2, 2), cex.axis=1, cex.lab=1, mar=c(5.1,4.1,4.1,2.1))\n+\t\tprint(plot(msidata_no_NA, pixel = pixel_vector, col="black"))\n \n+    #end if\n \n     ################### 16) Zoomed in mass spectra for calibrants ##############\n \n@@ -848,6 +869,8 @@\n \n     ######### 17) ppm difference input calibrant m/z and m/z with max intensity in given m/z range#########\n \n+    #if $report_depth:\n+    \n         par(mfrow = c(1,1))\n         ### plot the ppm difference calculated above: theor. m/z value to highest m/z value: \n \n@@ -885,6 +908,8 @@\n         theme(axis.text.x = element_text(angle = 90, hjust = 1, size=14))\n \n         print(diff_plot2)\n+        \n+    #end if\n \n         #################### 19) ppm difference over pixels #####################\n \n@@ -934,6 +959,7 @@\n \n             ### make x-y-images for mz accuracy\n \n+    #if $report_depth:\n             ppm_dataframe = data.frame(coord(msidata)\\$x, coord(msidata)\\$y, ppm_df)\n             colnames(ppm_dataframe) = c("x", "y", "ppm_df")\n \n@@ -950,6 +976,7 @@\n                  theme(text=element_text(family="ArialMT", face="bold", size=12))+\n                  scale_fill_gradient2(low = "navy", mid = "grey", high = "red", midpoint = 0 ,space = "Lab", na.value = "black", name = "ppm\\nerror"))}\n \n+    #end if\n \n     }else{print("plot 16+17+18+19) The inputcalibrant m/z were not provided or outside the m/z range")}\n }else{\n@@ -976,6 +1003,7 @@\n         <expand macro="reading_2_column_mz_tabular" optional="true"/>\n         <param name="plusminus_ppm" value="200" type="float" label="ppm range" help="Will be added in both directions to input calibrant m/z"/>\n         <param name="do_pca" type="boolean" label="PCA with 2 components"/>\n+        <param name="report_depth" type="boolean" label="Generate full QC report" truevalue="TRUE" falsevalue="FALSE" checked="True" help="No: does not generate all plots but only the most informatives"/>\n         <repeat name="calibrantratio" title="Plot fold change of two m/z" min="0" max="10">\n             <param name="mass1" value="1111" type="float" label="M/z 1" help="First m/z"/>\n             <param name="mass2" value="2222" type="float" label="M/z 2" help="Second m/z"/>\n@@ -1021,7 +1049,6 @@\n             </repeat>\n             <output name="QC_report" file="QC_imzml.pdf" compare="sim_size"/>\n         </test>\n-\n         <test>\n             <expand macro="infile_analyze75"/>\n             <conditional name="tabular_annotation">\n@@ -1031,7 +1058,6 @@\n             <param name="do_pca" value="True"/>\n             <output name="QC_report" file="QC_analyze75.pdf" compare="sim_size"/>\n         </test>\n-\n         <test>\n             <param name="infile" value="3_files_combined.RData" ftype="rdata"/>\n             <conditional name="tabular_annotation">\n@@ -1062,6 +1088,25 @@\n             <param name="do_pca" value="False"/>\n             <output name="QC_report" file="QC_empty_spectra.pdf" compare="sim_size"/>\n         </test>\n+        <test>\n+            <param name="infile" value="" ftype="imzml">\n+                <composite_data value="Example_Processed.imzML"/>\n+                <composite_data value="Example_Processed.ibd"/>\n+            </param>\n+            <conditional name="processed_cond">\n+                <param name="processed_file" value="processed"/>\n+                <param name="accuracy" value="200"/>\n+                <param name="units" value="ppm"/>\n+            </conditional>\n+            <conditional name="tabular_annotation">\n+                <param name="load_annotation" value="no_annotation"/>\n+            </conditional>\n+            <param name="calibrant_file" value="inputcalibrantfile1.tabular" ftype="tabular"/>\n+            <param name="mz_column" value="1"/>\n+            <param name="name_column" value="1"/>\n+            <param name="report_depth" value="False"/>\n+            <output name="QC_report" file="QC_imzml_shortreport.pdf" compare="sim_size"/>\n+        </test>  \n     </tests>\n     <help>\n         <![CDATA[\n'
b
diff -r 5a35e3a8d013 -r 23d0394b5908 test-data/QC_imzml_shortreport.pdf
b
Binary file test-data/QC_imzml_shortreport.pdf has changed
b
diff -r 5a35e3a8d013 -r 23d0394b5908 test-data/pixels_test6.tabular
--- a/test-data/pixels_test6.tabular Wed Dec 23 22:36:04 2020 +0000
+++ b/test-data/pixels_test6.tabular Sun Aug 29 07:30:21 2021 +0000
b
@@ -1,25 +1,25 @@
-pixel names x y predicted condition
-xy_1_1 1 1 A
-xy_2_1 2 1 A
-xy_3_1 3 1 B
-xy_4_1 4 1 C
-xy_1_2 1 2 C
-xy_2_2 2 2 C
-xy_3_2 3 2 A
-xy_4_2 4 2 A
-xy_1_3 1 3 A
-xy_2_3 2 3 B
-xy_3_3 3 3 C
-xy_4_3 4 3 A
-xy_10_1 10 1 C
-xy_11_1 11 1 C
-xy_12_1 12 1 C
-xy_13_1 13 1 B
-xy_10_2 10 2 C
-xy_11_2 11 2 B
-xy_12_2 12 2 C
-xy_13_2 13 2 C
-xy_10_3 10 3 C
-xy_11_3 11 3 C
-xy_12_3 12 3 B
-xy_13_3 13 3 C
+pixel names x y predicted condition A B C
+xy_1_1 1 1 A 0.434439526064797 0.195646317191818 0.369914156743386
+xy_2_1 2 1 A 0.38219998209377 0.242372158141275 0.375427859764956
+xy_3_1 3 1 B 0.312531499299517 0.385612104162858 0.301856396537625
+xy_4_1 4 1 C 0.393153488582866 0.191107087820634 0.4157394235965
+xy_1_2 1 2 C 0.366986470447772 0.216121568441093 0.416891961111135
+xy_2_2 2 2 C 0.381682206547616 0.213188918797062 0.405128874655322
+xy_3_2 3 2 A 0.376695037169723 0.260689491088564 0.362615471741713
+xy_4_2 4 2 A 0.42305935188829 0.174038449100755 0.402902199010954
+xy_1_3 1 3 A 0.382420991383021 0.249364697048677 0.368214311568302
+xy_2_3 2 3 B 0.272145998315727 0.446525938567718 0.281328063116555
+xy_3_3 3 3 C 0.36296987427851 0.255631013944556 0.381399111776934
+xy_4_3 4 3 A 0.444812272103175 0.132274264153212 0.422913463743613
+xy_10_1 10 1 C 0.376216993893763 0.227584528606788 0.39619847749945
+xy_11_1 11 1 C 0.358430578177403 0.236120068794936 0.405449353027661
+xy_12_1 12 1 C 0.359751662628136 0.218620985552221 0.421627351819643
+xy_13_1 13 1 B 0.101486342705225 0.813997511218961 0.0845161460758142
+xy_10_2 10 2 C 0.354612526523361 0.272635192773437 0.372752280703202
+xy_11_2 11 2 B 0.291635599769993 0.444466545540823 0.263897854689184
+xy_12_2 12 2 C 0.36763798979782 0.203911653614431 0.428450356587749
+xy_13_2 13 2 C 0.344608135177236 0.304026642707691 0.351365222115073
+xy_10_3 10 3 C 0.37046458150651 0.205561286708086 0.423974131785404
+xy_11_3 11 3 C 0.358113833435286 0.262878459144526 0.379007707420187
+xy_12_3 12 3 B 0.180921926305915 0.66902588624642 0.150052187447665
+xy_13_3 13 3 C 0.378266307042675 0.20859472985319 0.413138963104135
b
diff -r 5a35e3a8d013 -r 23d0394b5908 test-data/preprocessing_results4.ibd
b
Binary file test-data/preprocessing_results4.ibd has changed
b
diff -r 5a35e3a8d013 -r 23d0394b5908 test-data/preprocessing_results4.imzml
--- a/test-data/preprocessing_results4.imzml Wed Dec 23 22:36:04 2020 +0000
+++ b/test-data/preprocessing_results4.imzml Sun Aug 29 07:30:21 2021 +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="48842eaf-40e5-4a3f-831c-2d7a3b7e04b9" />
- <cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="2010ba5b7d44695d891cfe3b6674a5699fa610c0" />
+ <cvParam cvRef="IMS" accession="IMS:1000080" name="universally unique identifier" value="04431b64-9f3d-44b4-9e63-81b9e4924aec" />
+ <cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="38a4fadd32374bdf0e4b2bb7d976f6067d542a29" />
  <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.6.0">
+ <software id="Cardinal" version="2.10.0">
  <cvParam cvRef="MS" accession="MS:1000799" name="custom unreleased software tool" value="" />
  </software>
  </softwareList>
b
diff -r 5a35e3a8d013 -r 23d0394b5908 test-data/preprocessing_results4.imzml.txt
--- a/test-data/preprocessing_results4.imzml.txt Wed Dec 23 22:36:04 2020 +0000
+++ b/test-data/preprocessing_results4.imzml.txt Sun Aug 29 07:30:21 2021 +0000
b
@@ -1,4 +1,4 @@
 imzML file:
 total 84
--rw-rw-r-- 1 meli meli 62696 Oct  5 19:58 ibd
--rw-rw-r-- 1 meli meli 18199 Oct  5 19:58 imzml
+-rw-rw-r-- 1 meli meli 62696 Aug 28 16:41 ibd
+-rw-rw-r-- 1 meli meli 18200 Aug 28 16:41 imzml
b
diff -r 5a35e3a8d013 -r 23d0394b5908 test-data/preprocessing_results4.pdf
b
Binary file test-data/preprocessing_results4.pdf has changed
b
diff -r 5a35e3a8d013 -r 23d0394b5908 test-data/test1.pdf
b
Binary file test-data/test1.pdf has changed
b
diff -r 5a35e3a8d013 -r 23d0394b5908 test-data/test2.pdf
b
Binary file test-data/test2.pdf has changed
b
diff -r 5a35e3a8d013 -r 23d0394b5908 test-data/test3.pdf
b
Binary file test-data/test3.pdf has changed
b
diff -r 5a35e3a8d013 -r 23d0394b5908 test-data/test4.pdf
b
Binary file test-data/test4.pdf has changed
b
diff -r 5a35e3a8d013 -r 23d0394b5908 test-data/test5.pdf
b
Binary file test-data/test5.pdf has changed
b
diff -r 5a35e3a8d013 -r 23d0394b5908 test-data/test6.pdf
b
Binary file test-data/test6.pdf has changed
b
diff -r 5a35e3a8d013 -r 23d0394b5908 test-data/test6.rdata
b
Binary file test-data/test6.rdata has changed
b
diff -r 5a35e3a8d013 -r 23d0394b5908 test-data/test7.pdf
b
Binary file test-data/test7.pdf has changed
b
diff -r 5a35e3a8d013 -r 23d0394b5908 test-data/test7.rdata
b
Binary file test-data/test7.rdata has changed