# HG changeset patch # User galaxyp # Date 1589394108 14400 # Node ID 87bb011a4ee8eba83e34cf1429d0e2daed2c5fe7 # Parent 44a4b31fcbf3b9214b8bc020f1075a5d261417df "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit d008f6ea0f5c8435fb975a34cb99ea4d42c5ebd2" diff -r 44a4b31fcbf3 -r 87bb011a4ee8 macros.xml --- a/macros.xml Thu Apr 23 08:07:20 2020 -0400 +++ b/macros.xml Wed May 13 14:21:48 2020 -0400 @@ -32,6 +32,12 @@ + mass spectrometry imaging preprocessing @@ -92,7 +92,7 @@ msidata = as(msidata, "MSContinuousImagingExperiment") } - msidata = normalize(msidata, method="tic") + msidata = normalize(msidata, method="$method.methods_conditional.methods_for_normalization.normalization_method") msidata <- process(msidata, BPPARAM=MulticoreParam(workers=number_cpu)) @@ -179,6 +179,42 @@ print(plot(msidata, pixel=random_spectra)) title("Spectra after smoothing", outer=TRUE, line=0) + + ############################### Mz alignment ########################### + + #elif str( $method.methods_conditional.preprocessing_method ) == 'mz_alignment': + print('M/z alignment') + ## M/z alignment + + #if str( $method.methods_conditional.mzalign_ref_type.align_reference_datatype) == 'align_table': + + reference_mz = read.delim("$method.methods_conditional.mzalign_ref_type.mz_tabular", header = $method.methods_conditional.mzalign_ref_type.feature_header, stringsAsFactors = FALSE) + reference_mz = reference_mz[,$method.methods_conditional.mzalign_ref_type.feature_column] + + msidata = mzAlign(msidata, ref=reference_mz, tolerance = $method.methods_conditional.alignment_tol, units = "$method.methods_conditional.alignment_units", quantile = $method.methods_conditional.quantile, span = $method.methods_conditional.span) + + + #elif str( $method.methods_conditional.mzalign_ref_type.align_reference_datatype) == 'align_noref': + + msidata = mzAlign(msidata,tolerance = $method.methods_conditional.alignment_tol, units = "$method.methods_conditional.alignment_units", , quantile = $method.methods_conditional.quantile, span = $method.methods_conditional.span) + + #end if + + msidata <- process(msidata, BPPARAM=MulticoreParam(workers=number_cpu)) + + ############################### QC ########################### + + maxfeatures =nrow(msidata) + pixelcount = ncol(msidata) + minmz = round(min(mz(msidata)), digits=2) + maxmz = round(max(mz(msidata)), digits=2) + mz_aligned = c(minmz, maxmz,maxfeatures, pixelcount) + QC_numbers= cbind(QC_numbers, mz_aligned) + vectorofactions = append(vectorofactions, "mz aligned") + print(plot(msidata, pixel=random_spectra)) + title("Spectra after m/z alignment", outer=TRUE, line=0) + + ############################### Peak picking ########################### #elif str( $method.methods_conditional.preprocessing_method) == 'Peak_picking': @@ -438,6 +474,7 @@ + @@ -487,6 +524,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -537,9 +603,10 @@ - + - + + @@ -728,6 +795,11 @@ + + + + + @@ -761,7 +833,7 @@ - + diff -r 44a4b31fcbf3 -r 87bb011a4ee8 test-data/QC_analyze75.pdf Binary file test-data/QC_analyze75.pdf has changed diff -r 44a4b31fcbf3 -r 87bb011a4ee8 test-data/QC_empty_spectra.pdf Binary file test-data/QC_empty_spectra.pdf has changed diff -r 44a4b31fcbf3 -r 87bb011a4ee8 test-data/QC_imzml.pdf Binary file test-data/QC_imzml.pdf has changed diff -r 44a4b31fcbf3 -r 87bb011a4ee8 test-data/QC_rdata.pdf Binary file test-data/QC_rdata.pdf has changed diff -r 44a4b31fcbf3 -r 87bb011a4ee8 test-data/preprocessing_results1.ibd Binary file test-data/preprocessing_results1.ibd has changed diff -r 44a4b31fcbf3 -r 87bb011a4ee8 test-data/preprocessing_results1.imzml --- a/test-data/preprocessing_results1.imzml Thu Apr 23 08:07:20 2020 -0400 +++ b/test-data/preprocessing_results1.imzml Wed May 13 14:21:48 2020 -0400 @@ -9,8 +9,8 @@ - - + + diff -r 44a4b31fcbf3 -r 87bb011a4ee8 test-data/preprocessing_results1.imzml.txt --- a/test-data/preprocessing_results1.imzml.txt Thu Apr 23 08:07:20 2020 -0400 +++ b/test-data/preprocessing_results1.imzml.txt Wed May 13 14:21:48 2020 -0400 @@ -1,4 +1,4 @@ imzML file: total 24 --rw-r--r-- 1 meli meli 216 Mär 24 10:39 ibd --rw-r--r-- 1 meli meli 18090 Mär 24 10:39 imzml +-rw-r--r-- 1 meli meli 216 Mai 10 17:37 ibd +-rw-r--r-- 1 meli meli 18090 Mai 10 17:37 imzml diff -r 44a4b31fcbf3 -r 87bb011a4ee8 test-data/preprocessing_results1.pdf Binary file test-data/preprocessing_results1.pdf has changed diff -r 44a4b31fcbf3 -r 87bb011a4ee8 test-data/preprocessing_results2.ibd Binary file test-data/preprocessing_results2.ibd has changed diff -r 44a4b31fcbf3 -r 87bb011a4ee8 test-data/preprocessing_results2.imzml --- a/test-data/preprocessing_results2.imzml Thu Apr 23 08:07:20 2020 -0400 +++ b/test-data/preprocessing_results2.imzml Wed May 13 14:21:48 2020 -0400 @@ -9,8 +9,8 @@ - - + + diff -r 44a4b31fcbf3 -r 87bb011a4ee8 test-data/preprocessing_results2.imzml.txt --- a/test-data/preprocessing_results2.imzml.txt Thu Apr 23 08:07:20 2020 -0400 +++ b/test-data/preprocessing_results2.imzml.txt Wed May 13 14:21:48 2020 -0400 @@ -1,4 +1,4 @@ imzML file: total 64 --rw-r--r-- 1 meli meli 37404 Mär 24 10:40 ibd --rw-r--r-- 1 meli meli 22796 Mär 24 10:40 imzml +-rw-r--r-- 1 meli meli 37404 Mai 10 17:38 ibd +-rw-r--r-- 1 meli meli 22796 Mai 10 17:38 imzml diff -r 44a4b31fcbf3 -r 87bb011a4ee8 test-data/preprocessing_results2.pdf Binary file test-data/preprocessing_results2.pdf has changed diff -r 44a4b31fcbf3 -r 87bb011a4ee8 test-data/preprocessing_results3.ibd Binary file test-data/preprocessing_results3.ibd has changed diff -r 44a4b31fcbf3 -r 87bb011a4ee8 test-data/preprocessing_results3.imzml --- a/test-data/preprocessing_results3.imzml Thu Apr 23 08:07:20 2020 -0400 +++ b/test-data/preprocessing_results3.imzml Wed May 13 14:21:48 2020 -0400 @@ -9,8 +9,8 @@ - - + + diff -r 44a4b31fcbf3 -r 87bb011a4ee8 test-data/preprocessing_results3.imzml.txt --- a/test-data/preprocessing_results3.imzml.txt Thu Apr 23 08:07:20 2020 -0400 +++ b/test-data/preprocessing_results3.imzml.txt Wed May 13 14:21:48 2020 -0400 @@ -1,4 +1,4 @@ imzML file: total 24 --rw-r--r-- 1 meli meli 960 Apr 22 15:36 ibd --rw-r--r-- 1 meli meli 18112 Apr 22 15:36 imzml +-rw-r--r-- 1 meli meli 960 Mai 10 17:39 ibd +-rw-r--r-- 1 meli meli 18112 Mai 10 17:39 imzml diff -r 44a4b31fcbf3 -r 87bb011a4ee8 test-data/preprocessing_results3.pdf Binary file test-data/preprocessing_results3.pdf has changed diff -r 44a4b31fcbf3 -r 87bb011a4ee8 test-data/preprocessing_results4.ibd Binary file test-data/preprocessing_results4.ibd has changed diff -r 44a4b31fcbf3 -r 87bb011a4ee8 test-data/preprocessing_results4.imzml --- a/test-data/preprocessing_results4.imzml Thu Apr 23 08:07:20 2020 -0400 +++ b/test-data/preprocessing_results4.imzml Wed May 13 14:21:48 2020 -0400 @@ -9,8 +9,8 @@ - - + + diff -r 44a4b31fcbf3 -r 87bb011a4ee8 test-data/preprocessing_results4.imzml.txt --- a/test-data/preprocessing_results4.imzml.txt Thu Apr 23 08:07:20 2020 -0400 +++ b/test-data/preprocessing_results4.imzml.txt Wed May 13 14:21:48 2020 -0400 @@ -1,4 +1,4 @@ imzML file: total 84 --rw-r--r-- 1 meli meli 63256 Mär 24 11:35 ibd --rw-r--r-- 1 meli meli 18199 Mär 24 11:35 imzml +-rw-r--r-- 1 meli meli 63256 Mai 10 17:40 ibd +-rw-r--r-- 1 meli meli 18199 Mai 10 17:40 imzml diff -r 44a4b31fcbf3 -r 87bb011a4ee8 test-data/preprocessing_results4.pdf Binary file test-data/preprocessing_results4.pdf has changed diff -r 44a4b31fcbf3 -r 87bb011a4ee8 test-data/preprocessing_results5.ibd Binary file test-data/preprocessing_results5.ibd has changed diff -r 44a4b31fcbf3 -r 87bb011a4ee8 test-data/preprocessing_results5.imzml --- a/test-data/preprocessing_results5.imzml Thu Apr 23 08:07:20 2020 -0400 +++ b/test-data/preprocessing_results5.imzml Wed May 13 14:21:48 2020 -0400 @@ -9,8 +9,8 @@ - - + + diff -r 44a4b31fcbf3 -r 87bb011a4ee8 test-data/preprocessing_results5.imzml.txt --- a/test-data/preprocessing_results5.imzml.txt Thu Apr 23 08:07:20 2020 -0400 +++ b/test-data/preprocessing_results5.imzml.txt Wed May 13 14:21:48 2020 -0400 @@ -1,4 +1,4 @@ imzML file: total 428 --rw-r--r-- 1 meli meli 415936 Apr 19 21:07 ibd --rw-r--r-- 1 meli meli 18569 Apr 19 21:07 imzml +-rw-r--r-- 1 meli meli 415936 Mai 10 17:40 ibd +-rw-r--r-- 1 meli meli 18569 Mai 10 17:40 imzml diff -r 44a4b31fcbf3 -r 87bb011a4ee8 test-data/preprocessing_results5.pdf Binary file test-data/preprocessing_results5.pdf has changed