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

Changeset 3:f172efe92629 (2019-02-28)
Previous changeset 2:1b875f0b8024 (2019-02-15) Next changeset 4:141a9288be9c (2019-03-22)
Commit message:
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
modified:
preprocessing.xml
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.RData
test-data/preprocessing_results5.pdf
b
diff -r 1b875f0b8024 -r f172efe92629 preprocessing.xml
--- a/preprocessing.xml Fri Feb 15 10:22:14 2019 -0500
+++ b/preprocessing.xml Thu Feb 28 09:27:06 2019 -0500
[
b'@@ -60,7 +60,13 @@\n     maxmz = round(max(mz(msidata)), digits=2)\n     QC_numbers= data.frame(inputdata = c(minmz, maxmz,maxfeatures, pixelcount))\n     vectorofactions = "inputdata"\n-    plot(msidata, pixel = 1:pixelcount, main="Average spectrum of input file")\n+    ## Choose random spectra for QC plots\n+    random_spectra = sample(pixels(msidata), 4, replace=FALSE)\n+    par(mfrow = c(2, 2), oma=c(0,0,2,0))\n+    for (random_sample in 1:length(random_spectra)){\n+        plot(msidata, pixel=random_spectra[random_sample], main=paste0("spectrum ", names(random_spectra)[random_sample]))}\n+    title("Input spectra", outer=TRUE, line=0)\n+\n \n     ############################### Preprocessing steps ###########################\n     ###############################################################################\n@@ -84,7 +90,10 @@\n             normalized = c(minmz, maxmz,maxfeatures, pixelcount)\n             QC_numbers= cbind(QC_numbers, normalized)\n             vectorofactions = append(vectorofactions, "normalized")\n-            plot(msidata, pixel = 1:pixelcount, main="Average spectrum after normalization")\n+            par(mfrow = c(2, 2), oma=c(0,0,2,0))\n+            for (random_sample in 1:length(random_spectra)){\n+                plot(msidata, pixel=random_spectra[random_sample], main=paste0("spectrum ", names(random_spectra)[random_sample]))}\n+            title("Spectra after normalization", outer=TRUE, line=0)\n \n     ############################### Baseline reduction ###########################\n \n@@ -103,7 +112,9 @@\n             baseline = c(minmz, maxmz,maxfeatures, pixelcount)\n             QC_numbers= cbind(QC_numbers, baseline)\n             vectorofactions = append(vectorofactions, "baseline red.")\n-            plot(msidata, pixel = 1:pixelcount, main="Average spectrum after baseline reduction")\n+            for (random_sample in 1:length(random_spectra)){\n+                plot(msidata, pixel=random_spectra[random_sample], main=paste0("spectrum ", names(random_spectra)[random_sample]))}\n+            title("Spectra after baseline reduction", outer=TRUE, line=0)\n \n     ############################### Smoothing ###########################\n \n@@ -136,7 +147,9 @@\n             smoothed = c(minmz, maxmz,maxfeatures, pixelcount)\n             QC_numbers= cbind(QC_numbers, smoothed)\n             vectorofactions = append(vectorofactions, "smoothed")\n-            plot(msidata, pixel = 1:pixelcount, main="Average spectrum after smoothing")\n+            for (random_sample in 1:length(random_spectra)){\n+                plot(msidata, pixel=random_spectra[random_sample], main=paste0("spectrum ", names(random_spectra)[random_sample]))}\n+            title("Spectra after smoothing", outer=TRUE, line=0)\n \n     ############################### Peak picking ###########################\n \n@@ -170,7 +183,9 @@\n             picked = c(minmz, maxmz,maxfeatures, pixelcount)\n             QC_numbers= cbind(QC_numbers, picked)\n             vectorofactions = append(vectorofactions, "picked")\n-            plot(msidata, pixel = 1:pixelcount, main="Average spectrum after peak picking")\n+            for (random_sample in 1:length(random_spectra)){\n+                plot(msidata, pixel=random_spectra[random_sample], main=paste0("spectrum ", names(random_spectra)[random_sample]))}\n+            title("Spectra after peak picking", outer=TRUE, line=0)\n \n     ############################### Peak alignment ###########################\n \n@@ -184,8 +199,8 @@\n \n             #elif str( $method.methods_conditional.align_ref_type.align_reference_datatype) == \'align_table\':\n \n-                align_reference_table = read.delim("$method.methods_conditional.align_ref_type.mz_tabular", header = $method.methods_conditional.align_ref_type.align_mass_header, stringsAsFactors = FALSE)\n-                align_reference_column = align_reference_table[,$method.methods_conditional.align_ref_type.align_mass_column]\n+                align_reference_table = read.delim("$method.methods_conditional'..b'  filtered = c(minmz, maxmz,maxfeatures, pixelcount)\n             QC_numbers= cbind(QC_numbers, filtered)\n             vectorofactions = append(vectorofactions, "filtered")\n-            plot(msidata, pixel = 1:pixelcount, main="Average spectrum after filtering")\n+            for (random_sample in 1:length(random_spectra)){\n+                plot(msidata, pixel=random_spectra[random_sample], main=paste0("spectrum ", names(random_spectra)[random_sample]))}\n+            title("Spectra after filtering", outer=TRUE, line=0)\n \n     ############################### Data reduction ###########################\n \n@@ -266,8 +285,8 @@\n \n                 #if str( $method.methods_conditional.methods_for_reduction.ref_type.reference_datatype) == \'table\':\n \n-                    reference_table = read.delim("$method.methods_conditional.methods_for_reduction.ref_type.mz_tabular", header = $method.methods_conditional.methods_for_reduction.ref_type.mass_header, stringsAsFactors = FALSE)\n-                    reference_column = reference_table[,$method.methods_conditional.methods_for_reduction.ref_type.mass_column]\n+                    reference_table = read.delim("$method.methods_conditional.methods_for_reduction.ref_type.mz_tabular", header = $method.methods_conditional.methods_for_reduction.ref_type.feature_header, stringsAsFactors = FALSE)\n+                    reference_column = reference_table[,$method.methods_conditional.methods_for_reduction.ref_type.feature_column]\n                     peak_reference = reference_column[reference_column>min(mz(msidata)) & reference_column<max(mz(msidata))]\n \n                 #elif str( $method.methods_conditional.methods_for_reduction.ref_type.reference_datatype) == \'msidata_ref\':\n@@ -287,7 +306,9 @@\n             reduced = c(minmz, maxmz,maxfeatures, pixelcount)\n             QC_numbers= cbind(QC_numbers, reduced)\n             vectorofactions = append(vectorofactions, "reduced")\n-            plot(msidata, pixel = 1:pixelcount, main="Average spectrum after data reduction")\n+            for (random_sample in 1:length(random_spectra)){\n+                plot(msidata, pixel=random_spectra[random_sample], main=paste0("spectrum ", names(random_spectra)[random_sample]))}\n+            title("Spectra after data reduction", outer=TRUE, line=0)\n \n         ############################### Transformation ###########################\n \n@@ -328,7 +349,9 @@\n             transformed = c(minmz, maxmz,maxfeatures, pixelcount)\n             QC_numbers= cbind(QC_numbers, transformed)\n             vectorofactions = append(vectorofactions, "transformed")\n-            plot(msidata, pixel = 1:pixelcount, main="Average spectrum after transformation")\n+            for (random_sample in 1:length(random_spectra)){\n+                plot(msidata, pixel=random_spectra[random_sample], main=paste0("spectrum ", names(random_spectra)[random_sample]))}\n+            title("Spectra after transformation", outer=TRUE, line=0)\n \n             #end if\n     #end for\n@@ -340,6 +363,9 @@\n \n     #if str($imzml_output) == "imzml_format":\n         if (nrow(msidata) > 0){\n+            ## make sure that coordinates are integers\n+            coord(msidata)\\$y = as.integer(coord(msidata)\\$y)\n+            coord(msidata)\\$x = as.integer(coord(msidata)\\$x)\n             writeImzML(msidata, "out")}\n     #elif str($imzml_output) == "rdata_format":\n         ## save as (.RData)\n@@ -443,7 +469,7 @@\n                                    label="diff.max" help="Peaks that differ less than this value will be aligned together"/>\n                             <param name="units_diffalignment" type="select" display="radio" optional="False" label="units">\n                                     <option value="ppm" selected="True">ppm</option>\n-                                    <option value="Da">m/z</option>\n+                                    <option value="mz">m/z</option>\n                             </param>\n                         </when>\n                         <when value="DP">\n'
b
diff -r 1b875f0b8024 -r f172efe92629 test-data/preprocessing_results1.ibd
b
Binary file test-data/preprocessing_results1.ibd has changed
b
diff -r 1b875f0b8024 -r f172efe92629 test-data/preprocessing_results1.imzml
--- a/test-data/preprocessing_results1.imzml Fri Feb 15 10:22:14 2019 -0500
+++ b/test-data/preprocessing_results1.imzml Thu Feb 28 09:27:06 2019 -0500
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="{002DF5BA-0549-44DF-A8BB-27DA3E197EB7}" />
- <cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="0379019A6F9D0B55F9217420030633F7163AF9D3" />
+ <cvParam cvRef="IMS" accession="IMS:1000080" name="universally unique identifier" value="{728FBFFE-E6FC-4283-8068-393A66F6BD5C}" />
+ <cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="375094460F3B80674CB2F541DCD9928B3D61B2FF" />
  <cvParam cvRef="IMS" accession="IMS:1000030" name="continuous" value="" />
  </fileContent>
  </fileDescription>
b
diff -r 1b875f0b8024 -r f172efe92629 test-data/preprocessing_results1.imzml.txt
--- a/test-data/preprocessing_results1.imzml.txt Fri Feb 15 10:22:14 2019 -0500
+++ b/test-data/preprocessing_results1.imzml.txt Thu Feb 28 09:27:06 2019 -0500
b
@@ -1,4 +1,4 @@
 imzML file:
 total 24
--rw-r--r-- 1 meli meli    96 Feb 12 21:24 ibd
--rw-r--r-- 1 meli meli 16714 Feb 12 21:24 imzml
+-rw-r--r-- 1 meli meli    96 Feb 24 14:11 ibd
+-rw-r--r-- 1 meli meli 16714 Feb 24 14:11 imzml
b
diff -r 1b875f0b8024 -r f172efe92629 test-data/preprocessing_results1.pdf
b
Binary file test-data/preprocessing_results1.pdf has changed
b
diff -r 1b875f0b8024 -r f172efe92629 test-data/preprocessing_results2.ibd
b
Binary file test-data/preprocessing_results2.ibd has changed
b
diff -r 1b875f0b8024 -r f172efe92629 test-data/preprocessing_results2.imzml
--- a/test-data/preprocessing_results2.imzml Fri Feb 15 10:22:14 2019 -0500
+++ b/test-data/preprocessing_results2.imzml Thu Feb 28 09:27:06 2019 -0500
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="{84BEACDD-B841-4730-81A0-A19A28C7B48A}" />
- <cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="1BC49DCCC566E7A6938CE3DE62090650C2A04798" />
+ <cvParam cvRef="IMS" accession="IMS:1000080" name="universally unique identifier" value="{40F230A1-1893-4A8C-BAE2-A8BBEF24DB20}" />
+ <cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="417ADF38FBC4D0304A9B75B4C85799137846DD2F" />
  <cvParam cvRef="IMS" accession="IMS:1000030" name="continuous" value="" />
  </fileContent>
  </fileDescription>
b
diff -r 1b875f0b8024 -r f172efe92629 test-data/preprocessing_results2.imzml.txt
--- a/test-data/preprocessing_results2.imzml.txt Fri Feb 15 10:22:14 2019 -0500
+++ b/test-data/preprocessing_results2.imzml.txt Thu Feb 28 09:27:06 2019 -0500
b
@@ -1,4 +1,4 @@
 imzML file:
 total 80
--rw-r--r-- 1 meli meli 54720 Feb 12 21:25 ibd
--rw-r--r-- 1 meli meli 21132 Feb 12 21:25 imzml
+-rw-r--r-- 1 meli meli 54720 Feb 24 14:12 ibd
+-rw-r--r-- 1 meli meli 21132 Feb 24 14:12 imzml
b
diff -r 1b875f0b8024 -r f172efe92629 test-data/preprocessing_results2.pdf
b
Binary file test-data/preprocessing_results2.pdf has changed
b
diff -r 1b875f0b8024 -r f172efe92629 test-data/preprocessing_results3.ibd
b
Binary file test-data/preprocessing_results3.ibd has changed
b
diff -r 1b875f0b8024 -r f172efe92629 test-data/preprocessing_results3.imzml
--- a/test-data/preprocessing_results3.imzml Fri Feb 15 10:22:14 2019 -0500
+++ b/test-data/preprocessing_results3.imzml Thu Feb 28 09:27:06 2019 -0500
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="{4C387879-DE12-49A4-878F-6980D6F7C6F0}" />
- <cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="94ED775BCF16644D23DACFCA1E62D28D5C755178" />
+ <cvParam cvRef="IMS" accession="IMS:1000080" name="universally unique identifier" value="{D767424F-5E74-45AB-AF1B-0D25244B435B}" />
+ <cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="445E32981D0B3D08ED2BA74E11500A3A08CDB9B7" />
  <cvParam cvRef="IMS" accession="IMS:1000030" name="continuous" value="" />
  </fileContent>
  </fileDescription>
b
diff -r 1b875f0b8024 -r f172efe92629 test-data/preprocessing_results3.imzml.txt
--- a/test-data/preprocessing_results3.imzml.txt Fri Feb 15 10:22:14 2019 -0500
+++ b/test-data/preprocessing_results3.imzml.txt Thu Feb 28 09:27:06 2019 -0500
b
@@ -1,4 +1,4 @@
 imzML file:
 total 36
--rw-r--r-- 1 meli meli 14216 Feb 12 21:26 ibd
--rw-r--r-- 1 meli meli 16824 Feb 12 21:26 imzml
+-rw-r--r-- 1 meli meli 14216 Feb 24 14:12 ibd
+-rw-r--r-- 1 meli meli 16824 Feb 24 14:12 imzml
b
diff -r 1b875f0b8024 -r f172efe92629 test-data/preprocessing_results3.pdf
b
Binary file test-data/preprocessing_results3.pdf has changed
b
diff -r 1b875f0b8024 -r f172efe92629 test-data/preprocessing_results4.ibd
b
Binary file test-data/preprocessing_results4.ibd has changed
b
diff -r 1b875f0b8024 -r f172efe92629 test-data/preprocessing_results4.imzml
--- a/test-data/preprocessing_results4.imzml Fri Feb 15 10:22:14 2019 -0500
+++ b/test-data/preprocessing_results4.imzml Thu Feb 28 09:27:06 2019 -0500
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="{26018306-9D72-49F5-89CB-68E4DDE0527C}" />
- <cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="BA6411EC5A5A59ABE5BD7005F4ED8FCEBA775A8E" />
+ <cvParam cvRef="IMS" accession="IMS:1000080" name="universally unique identifier" value="{FE932E04-42E4-4D89-B721-2A6CE83250B6}" />
+ <cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="36C7C916C176DD85CBBF4B7FA969C92B9403768D" />
  <cvParam cvRef="IMS" accession="IMS:1000030" name="continuous" value="" />
  </fileContent>
  </fileDescription>
b
diff -r 1b875f0b8024 -r f172efe92629 test-data/preprocessing_results4.imzml.txt
--- a/test-data/preprocessing_results4.imzml.txt Fri Feb 15 10:22:14 2019 -0500
+++ b/test-data/preprocessing_results4.imzml.txt Thu Feb 28 09:27:06 2019 -0500
b
@@ -1,4 +1,4 @@
 imzML file:
 total 28
--rw-r--r-- 1 meli meli  6376 Feb 12 21:29 ibd
--rw-r--r-- 1 meli meli 16801 Feb 12 21:29 imzml
+-rw-r--r-- 1 meli meli  6376 Feb 24 14:13 ibd
+-rw-r--r-- 1 meli meli 16801 Feb 24 14:13 imzml
b
diff -r 1b875f0b8024 -r f172efe92629 test-data/preprocessing_results4.pdf
b
Binary file test-data/preprocessing_results4.pdf has changed
b
diff -r 1b875f0b8024 -r f172efe92629 test-data/preprocessing_results5.RData
b
Binary file test-data/preprocessing_results5.RData has changed
b
diff -r 1b875f0b8024 -r f172efe92629 test-data/preprocessing_results5.pdf
b
Binary file test-data/preprocessing_results5.pdf has changed