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

Changeset 10:df8d7f6f210b (2018-09-04)
Previous changeset 9:4d5578b57a77 (2018-08-22)
Commit message:
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_preprocessing commit e87eea03505ab1ba067e192bbbcdc6197dc4b42e
modified:
msi_preprocessing.xml
test-data/preprocessing_mean3.txt
test-data/preprocessing_median2.txt
test-data/preprocessing_results1.RData
test-data/preprocessing_results1.pdf
test-data/preprocessing_results1.txt
test-data/preprocessing_results2.pdf
test-data/preprocessing_results3.RData
test-data/preprocessing_results3.pdf
test-data/preprocessing_results4.RData
test-data/preprocessing_results4.pdf
test-data/preprocessing_results4.txt
test-data/preprocessing_results5.RData
test-data/preprocessing_results5.pdf
test-data/preprocessing_sd2.txt
b
diff -r 4d5578b57a77 -r df8d7f6f210b msi_preprocessing.xml
--- a/msi_preprocessing.xml Wed Aug 22 13:43:04 2018 -0400
+++ b/msi_preprocessing.xml Tue Sep 04 13:42:22 2018 -0400
[
b'@@ -1,4 +1,4 @@\n-<tool id="mass_spectrometry_imaging_preprocessing" name="MSI preprocessing" version="1.10.0.6">\n+<tool id="mass_spectrometry_imaging_preprocessing" name="MSI preprocessing" version="1.10.0.7">\n     <description>\n         mass spectrometry imaging preprocessing\n     </description>\n@@ -103,7 +103,7 @@\n             print(\'Baseline_reduction\')\n             ##baseline reduction\n \n-            msidata = reduceBaseline(msidata, method="median", blocks=$method.methods_conditional.blocks_baseline)\n+            msidata = reduceBaseline(msidata, method="median", blocks=$method.methods_conditional.blocks_baseline, spar=$method.methods_conditional.spar_baseline)\n \n             ############################### QC ###########################\n \n@@ -132,7 +132,7 @@\n \n                 msidata = smoothSignal(msidata, method="$method.methods_conditional.methods_for_smoothing.smoothing_method", window=$method.methods_conditional.window_smoothing, order = $method.methods_conditional.methods_for_smoothing.order_of_filters)\n             #elif str($method.methods_conditional.methods_for_smoothing.smoothing_method) == \'ma\':\n-                print(\'sgolay smoothing\')\n+                print(\'moving average smoothing\')\n \n                 msidata = smoothSignal(msidata, method="$method.methods_conditional.methods_for_smoothing.smoothing_method", window=$method.methods_conditional.window_smoothing, coef = $method.methods_conditional.methods_for_smoothing.coefficients_ma_filter)\n \n@@ -156,7 +156,7 @@\n             ## Peakpicking\n \n             ## remove duplicated coordinates, otherwise peak picking will fail\n-            print(paste0(sum(duplicated(coord(msidata))), " coordinates were removed"))\n+            print(paste0(sum(duplicated(coord(msidata))), " duplicated coordinates were removed"))\n             msidata <- msidata[,!duplicated(coord(msidata))]\n \n             #if str( $method.methods_conditional.methods_for_picking.picking_method) == \'adaptive\':\n@@ -364,14 +364,15 @@\n             sample_matrix = cbind(sample_matrix, subsample_calc)\n             count = count+1\n             }\n-            rownames(sample_matrix) = mz(msidata)\n-            colnames(sample_matrix) = levels(msidata\\$annotation)\n-            write.table(sample_matrix, file="$summarized_output_mean", quote = FALSE, row.names = TRUE, col.names=NA, sep = "\\t")\n+\n+            sample_matrix_mean = cbind(mz(msidata),sample_matrix)\n+            sample_matrix_mean = rbind(c("mz", levels(msidata\\$annotation)), sample_matrix_mean)\n+            write.table(sample_matrix_mean, file="$summarized_mean", quote = FALSE, row.names = FALSE, col.names=FALSE, sep = "\\t")\n         }else{\n-            full_sample_calc = as.data.frame(apply(spectra(msidata)[],1,mean, na.rm=TRUE))\n-            rownames(full_sample_calc) = mz(msidata)\n-            colnames(full_sample_calc) = "$infile.display_name"\n-            write.table(full_sample_calc, file="$summarized_output_mean", quote = FALSE, row.names = TRUE, col.names=NA, sep = "\\t")\n+            full_sample_calc_mean = as.data.frame(apply(spectra(msidata)[],1,mean, na.rm=TRUE))\n+            full_sample_calc_mean = cbind(mz(msidata),full_sample_calc_mean)\n+            full_sample_calc_mean = rbind(c("mz", "$infile.display_name"), full_sample_calc_mean)\n+            write.table(full_sample_calc_mean, file="$summarized_mean", quote = FALSE, row.names = FALSE, col.names=FALSE, sep = "\\t")\n         }\n \n     #end if\n@@ -391,14 +392,15 @@\n             count = count+1\n             }\n \n-            rownames(sample_matrix) = mz(msidata)\n-            colnames(sample_matrix) = levels(msidata\\$annotation)\n-            write.table(sample_matrix, file="$summarized_output_median", quote = FALSE, row.names = TRUE, col.names=NA, sep = "\\t")\n+            sample_matrix_median = cbind(mz(msidata),sample_matrix)\n+            sample_matrix_median = rbind(c("mz", levels(msidata\\$annotation)), sample_matrix_median)\n+            write.table(sample_matrix_median, file="$sum'..b'display_name preprocessed_sd">\n             <filter>summary_type and "sd" in summary_type</filter>\n         </data>\n-        <data format="tabular" name="matrixasoutput" label="$infile.display_name preprocessed_matrix">\n+        <data format="tabular" name="intensity_matrix" label="$infile.display_name preprocessed_matrix">\n             <filter>output_matrix</filter>\n         </data>\n     </outputs>\n@@ -737,7 +743,9 @@\n                     <param name="preprocessing_method" value="Smoothing"/>\n                     <conditional name="methods_for_smoothing">\n                         <param name="smoothing_method" value="gaussian"/>\n+                        <param name="sd_gaussian" value="4"/>\n                     </conditional>\n+                        <param name="window_smoothing" value="9"/>\n                 </conditional>\n             </repeat>\n             <repeat name="methods">\n@@ -748,6 +756,7 @@\n                     </conditional>\n                     <param name="blocks_picking" value="3"/>\n                     <param name="window_picking" value="3"/>\n+                    <param name="SNR_picking_method" value="3"/>\n                 </conditional>\n             </repeat>\n             <repeat name="methods">\n@@ -777,7 +786,7 @@\n             </conditional>\n             <param name="output_matrix" value="True"/>\n             <output name="msidata_preprocessed" file="preprocessing_results1.RData" compare="sim_size"/>\n-            <output name="matrixasoutput" file="preprocessing_results1.txt"/>\n+            <output name="intensity_matrix" file="preprocessing_results1.txt"/>\n             <output name="QC_overview" file="preprocessing_results1.pdf" compare="sim_size"/>\n         </test>\n         <test expect_num_outputs="4">\n@@ -811,8 +820,8 @@\n             </conditional>\n             <param name="summary_type" value="median,sd"/>\n             <output name="msidata_preprocessed" file="preprocessing_results2.RData" compare="sim_size"/>\n-            <output name="summarized_output_median" file="preprocessing_median2.txt" lines_diff="2"/>\n-            <output name="summarized_output_sd" file="preprocessing_sd2.txt" lines_diff="2"/>\n+            <output name="summarized_median" file="preprocessing_median2.txt" lines_diff="2"/>\n+            <output name="summarized_sd" file="preprocessing_sd2.txt" lines_diff="2"/>\n             <output name="QC_overview" file="preprocessing_results2.pdf" compare="sim_size"/>\n         </test>\n         <test expect_num_outputs="3">\n@@ -831,6 +840,7 @@\n                     <param name="preprocessing_method" value="Peak_picking"/>\n                     <param name="blocks_picking" value="100"/>\n                     <param name="window_picking" value="5"/>\n+                    <param name="SNR_picking_method" value="3"/>\n                         <param name="picking_method" value="limpic"/>\n                 </conditional>\n             </repeat>\n@@ -848,7 +858,7 @@\n             </conditional>\n             <output name="msidata_preprocessed" file="preprocessing_results3.RData" compare="sim_size"/>\n             <output name="QC_overview" file="preprocessing_results3.pdf" compare="sim_size"/>\n-            <output name="summarized_output_mean" file="preprocessing_mean3.txt" lines_diff="2"/>\n+            <output name="summarized_mean" file="preprocessing_mean3.txt" lines_diff="2"/>\n         </test>\n         <test expect_num_outputs="3">\n             <param name="infile" value="" ftype="analyze75">\n@@ -872,7 +882,7 @@\n             </conditional>\n             <param name="output_matrix" value="True"/>\n             <output name="msidata_preprocessed" file="preprocessing_results4.RData" compare="sim_size"/>\n-            <output name="matrixasoutput" file="preprocessing_results4.txt"/>\n+            <output name="intensity_matrix" file="preprocessing_results4.txt"/>\n             <output name="QC_overview" file="preprocessing_results4.pdf" compare="sim_size"/>\n         </test>\n         <test expect_num_outputs="2">\n'
b
diff -r 4d5578b57a77 -r df8d7f6f210b test-data/preprocessing_mean3.txt
--- a/test-data/preprocessing_mean3.txt Wed Aug 22 13:43:04 2018 -0400
+++ b/test-data/preprocessing_mean3.txt Tue Sep 04 13:42:22 2018 -0400
b
@@ -1,4 +1,4 @@
- Uploaded Composite Dataset (analyze75)
+mz Uploaded Composite Dataset (analyze75)
 1199.55615234375 3.35218415321305
 1200.09387207031 1.08671297501661
 1200.59020996094 2.15851707603805
b
diff -r 4d5578b57a77 -r df8d7f6f210b test-data/preprocessing_median2.txt
--- a/test-data/preprocessing_median2.txt Wed Aug 22 13:43:04 2018 -0400
+++ b/test-data/preprocessing_median2.txt Tue Sep 04 13:42:22 2018 -0400
b
@@ -1,4 +1,4 @@
- File1 File2 NA
+mz File1 File2 NA
 101.083335876465 0 0.133186891674995 0.266373783349991
 101.666664123535 0 0 0
 102.166664123535 0 0 0
b
diff -r 4d5578b57a77 -r df8d7f6f210b test-data/preprocessing_results1.RData
b
Binary file test-data/preprocessing_results1.RData has changed
b
diff -r 4d5578b57a77 -r df8d7f6f210b test-data/preprocessing_results1.pdf
b
Binary file test-data/preprocessing_results1.pdf has changed
b
diff -r 4d5578b57a77 -r df8d7f6f210b test-data/preprocessing_results1.txt
--- a/test-data/preprocessing_results1.txt Wed Aug 22 13:43:04 2018 -0400
+++ b/test-data/preprocessing_results1.txt Tue Sep 04 13:42:22 2018 -0400
b
@@ -1,3 +1,3 @@
-mz | spectra x = 1, y = 1 x = 2, y = 1 x = 3, y = 1 x = 1, y = 2 x = 2, y = 2 x = 3, y = 2 x = 1, y = 3 x = 2, y = 3 x = 3, y = 3
+mz x = 1, y = 1 x = 2, y = 1 x = 3, y = 1 x = 1, y = 2 x = 2, y = 2 x = 3, y = 2 x = 1, y = 3 x = 2, y = 3 x = 3, y = 3
 329 8.48069807321137 6.00276368862812 0 0 7.22240715797167 6.68463797360356 0 0 0
 345 0 0 4.70593890744759 0 0 0 5.23000350586712 4.17949067812964 5.08555910047608
b
diff -r 4d5578b57a77 -r df8d7f6f210b test-data/preprocessing_results2.pdf
b
Binary file test-data/preprocessing_results2.pdf has changed
b
diff -r 4d5578b57a77 -r df8d7f6f210b test-data/preprocessing_results3.RData
b
Binary file test-data/preprocessing_results3.RData has changed
b
diff -r 4d5578b57a77 -r df8d7f6f210b test-data/preprocessing_results3.pdf
b
Binary file test-data/preprocessing_results3.pdf has changed
b
diff -r 4d5578b57a77 -r df8d7f6f210b test-data/preprocessing_results4.RData
b
Binary file test-data/preprocessing_results4.RData has changed
b
diff -r 4d5578b57a77 -r df8d7f6f210b test-data/preprocessing_results4.pdf
b
Binary file test-data/preprocessing_results4.pdf has changed
b
diff -r 4d5578b57a77 -r df8d7f6f210b test-data/preprocessing_results4.txt
--- a/test-data/preprocessing_results4.txt Wed Aug 22 13:43:04 2018 -0400
+++ b/test-data/preprocessing_results4.txt Tue Sep 04 13:42:22 2018 -0400
b
@@ -1,4 +1,4 @@
-mz | spectra x = 1, y = 1 x = 2, y = 1 x = 3, y = 1 x = 1, y = 2 x = 2, y = 2 x = 3, y = 2 x = 1, y = 3 x = 2, y = 3 x = 3, y = 3
+mz x = 1, y = 1 x = 2, y = 1 x = 3, y = 1 x = 1, y = 2 x = 2, y = 2 x = 3, y = 2 x = 1, y = 3 x = 2, y = 3 x = 3, y = 3
 1199 1.90173968313755 1.13259535967648 2.08382650993109 2.34349737625869 1.33087314662273 2.14468085106383 3.43161925601751 1.32706902782797 2.22480967308554
 1200 1.39388874502695 0.970046951574763 1.52152411836238 1.35619061126081 1.10906095551895 1.66382978723404 2.22846006564551 1.19804842790025 1.7089117778773
 1201 1.13095882671438 0.99102093971692 1.23623834616944 1.19344773790952 1.05864909390445 1.31063829787234 1.67396061269147 1.07824358511023 1.28168383340797
b
diff -r 4d5578b57a77 -r df8d7f6f210b test-data/preprocessing_results5.RData
b
Binary file test-data/preprocessing_results5.RData has changed
b
diff -r 4d5578b57a77 -r df8d7f6f210b test-data/preprocessing_results5.pdf
b
Binary file test-data/preprocessing_results5.pdf has changed
b
diff -r 4d5578b57a77 -r df8d7f6f210b test-data/preprocessing_sd2.txt
--- a/test-data/preprocessing_sd2.txt Wed Aug 22 13:43:04 2018 -0400
+++ b/test-data/preprocessing_sd2.txt Tue Sep 04 13:42:22 2018 -0400
b
@@ -1,4 +1,4 @@
- File1 File2 NA
+mz File1 File2 NA
 101.083335876465 0.180910895583245 0.284914371691127 0.358878736172051
 101.666664123535 0 0 0
 102.166664123535 0 0 0