# HG changeset patch # User galaxyp # Date 1601205030 0 # Node ID 5abc3ab4792c0676fadae4c3dbfd61647ea1bada # Parent ca727a6dede6d6e6cce2e1f14403337284c4ac9c "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ca89f8e007c6b17f7c30066729e05b8686ab975a" diff -r ca727a6dede6 -r 5abc3ab4792c macros.xml --- a/macros.xml Thu Sep 24 11:43:31 2020 +0000 +++ b/macros.xml Sun Sep 27 11:10:30 2020 +0000 @@ -117,6 +117,13 @@ 0, for if conditions - npeaks= sum(as.matrix(spectra(msidata))>0, na.rm=TRUE) + npeaks= sum(int_matrix>0) ## Number of NA in spectra matrix - NAcount = sum(is.na(spectra(msidata))) - ## Number of NA in spectra matrix - infcount = sum(is.infinite(as.matrix(spectra(msidata)))) + infcount = sum(is.infinite(int_matrix)) ## Number of duplicated coordinates dupl_coord = sum(duplicated(coord(msidata))) properties = c("Number of m/z features", diff -r ca727a6dede6 -r 5abc3ab4792c preprocessing.xml --- a/preprocessing.xml Thu Sep 24 11:43:31 2020 +0000 +++ b/preprocessing.xml Sun Sep 27 11:10:30 2020 +0000 @@ -74,7 +74,7 @@ ## Choose random spectra for QC plots random_spectra = sample(pixels(msidata), 4, replace=FALSE) par(oma=c(0,0,2,0)) - print(plot(msidata, pixel=random_spectra)) + print(plot(msidata, pixel=random_spectra, col="black")) title("Input spectra", outer=TRUE, line=0) ############################### Preprocessing steps ########################### @@ -88,10 +88,6 @@ print('Normalization') ##normalization - if (class(msidata) == "MSProcessedImagingExperiment"){ - msidata = as(msidata, "MSContinuousImagingExperiment") - } - msidata = normalize(msidata, method="$method.methods_conditional.methods_for_normalization.normalization_method") msidata <- process(msidata, BPPARAM=MulticoreParam(workers=number_cpu)) @@ -105,7 +101,7 @@ normalized = c(minmz, maxmz,maxfeatures, pixelcount) QC_numbers= cbind(QC_numbers, normalized) vectorofactions = append(vectorofactions, "normalized") - print(plot(msidata, pixel=random_spectra)) + print(plot(msidata, pixel=random_spectra, col="black")) title("Spectra after normalization", outer=TRUE, line=0) ############################### Baseline reduction ########################### @@ -114,10 +110,6 @@ print('Baseline_reduction') ##baseline reduction - if (class(msidata) == "MSProcessedImagingExperiment"){ - msidata = as(msidata, "MSContinuousImagingExperiment") - } - msidata = reduceBaseline(msidata, method="median", blocks=$method.methods_conditional.blocks_baseline, spar=$method.methods_conditional.spar_baseline) msidata <- process(msidata, BPPARAM=MulticoreParam(workers=number_cpu)) @@ -130,7 +122,7 @@ baseline = c(minmz, maxmz,maxfeatures, pixelcount) QC_numbers= cbind(QC_numbers, baseline) vectorofactions = append(vectorofactions, "baseline red.") - print(plot(msidata, pixel=random_spectra)) + print(plot(msidata, pixel=random_spectra, col="black")) title("Spectra after baseline reduction", outer=TRUE, line=0) ############################### Smoothing ########################### @@ -139,11 +131,6 @@ print('Smoothing') ## Smoothing - if (class(msidata) == "MSProcessedImagingExperiment"){ - msidata = as(msidata, "MSContinuousImagingExperiment") - } - - #if str( $method.methods_conditional.methods_for_smoothing.smoothing_method) == 'gaussian': print('gaussian smoothing') @@ -176,7 +163,7 @@ smoothed = c(minmz, maxmz,maxfeatures, pixelcount) QC_numbers= cbind(QC_numbers, smoothed) vectorofactions = append(vectorofactions, "smoothed") - print(plot(msidata, pixel=random_spectra)) + print(plot(msidata, pixel=random_spectra, col="black")) title("Spectra after smoothing", outer=TRUE, line=0) @@ -211,7 +198,7 @@ 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)) + print(plot(msidata, pixel=random_spectra, col="black")) title("Spectra after m/z alignment", outer=TRUE, line=0) @@ -240,10 +227,6 @@ #end if msidata <- process(msidata, BPPARAM=MulticoreParam(workers=number_cpu)) - #if str($method.methods_conditional.imzml_output) == "cont_format": - #set $continuous_format = True - #end if - ############################### QC ########################### @@ -254,7 +237,7 @@ picked = c(minmz, maxmz,maxfeatures, pixelcount) QC_numbers= cbind(QC_numbers, picked) vectorofactions = append(vectorofactions, "picked") - print(plot(msidata, pixel=random_spectra)) + print(plot(msidata, pixel=random_spectra, col="black")) title("Spectra after peak picking", outer=TRUE, line=0) ############################### Peak alignment ########################### @@ -285,9 +268,6 @@ msidata <- process(msidata, BPPARAM=MulticoreParam(workers=number_cpu)) - #if str($method.methods_conditional.imzml_output) == "cont_format": - #set $continuous_format = True - #end if ############################### QC ########################### @@ -298,7 +278,7 @@ aligned = c(minmz, maxmz,maxfeatures, pixelcount) QC_numbers= cbind(QC_numbers, aligned) vectorofactions = append(vectorofactions, "aligned") - print(plot(msidata, pixel=random_spectra)) + print(plot(msidata, pixel=random_spectra, col="black")) title("Spectra after alignment", outer=TRUE, line=0) ############################### Peak filtering ########################### @@ -318,7 +298,7 @@ filtered = c(minmz, maxmz,maxfeatures, pixelcount) QC_numbers= cbind(QC_numbers, filtered) vectorofactions = append(vectorofactions, "filtered") - print(plot(msidata, pixel=random_spectra)) + print(plot(msidata, pixel=random_spectra, col="black")) title("Spectra after filtering", outer=TRUE, line=0) ############################### Peak binning ########################### @@ -343,7 +323,7 @@ peak_binned = c(minmz, maxmz,maxfeatures, pixelcount) QC_numbers= cbind(QC_numbers, peak_binned) vectorofactions = append(vectorofactions, "peak binned") - print(plot(msidata, pixel=random_spectra)) + print(plot(msidata, pixel=random_spectra, col="black")) title("Spectra after peak binning", outer=TRUE, line=0) @@ -387,7 +367,7 @@ reduced = c(minmz, maxmz,maxfeatures, pixelcount) QC_numbers= cbind(QC_numbers, reduced) vectorofactions = append(vectorofactions, "reduced") - print(plot(msidata, pixel=random_spectra)) + print(plot(msidata, pixel=random_spectra, col="black")) title("Spectra after m/z binning", outer=TRUE, line=0) ############################### Transformation ########################### @@ -430,7 +410,7 @@ transformed = c(minmz, maxmz,maxfeatures, pixelcount) QC_numbers= cbind(QC_numbers, transformed) vectorofactions = append(vectorofactions, "transformed") - print(plot(msidata, pixel=random_spectra)) + print(plot(msidata, pixel=random_spectra, col="black")) title("Spectra after transformation", outer=TRUE, line=0) #end if @@ -440,6 +420,10 @@ ################################################################################ ## save msidata as imzML file, will only work if there is at least 1 m/z left + + #if str($imzml_output) == "cont_format": + #set $continuous_format = True + #end if if (nrow(msidata) > 0){ ## make sure that coordinates are integers @@ -578,7 +562,6 @@ - - @@ -661,6 +643,7 @@ + @@ -696,13 +679,11 @@ - - @@ -719,6 +700,7 @@ + @@ -736,15 +718,14 @@ - - + diff -r ca727a6dede6 -r 5abc3ab4792c test-data/QC_analyze75.pdf Binary file test-data/QC_analyze75.pdf has changed diff -r ca727a6dede6 -r 5abc3ab4792c test-data/QC_empty_spectra.pdf Binary file test-data/QC_empty_spectra.pdf has changed diff -r ca727a6dede6 -r 5abc3ab4792c test-data/QC_imzml.pdf Binary file test-data/QC_imzml.pdf has changed diff -r ca727a6dede6 -r 5abc3ab4792c test-data/QC_rdata.pdf Binary file test-data/QC_rdata.pdf has changed diff -r ca727a6dede6 -r 5abc3ab4792c test-data/analyze75_filtered2.pdf Binary file test-data/analyze75_filtered2.pdf has changed diff -r ca727a6dede6 -r 5abc3ab4792c test-data/imzml_filtered3.pdf Binary file test-data/imzml_filtered3.pdf has changed diff -r ca727a6dede6 -r 5abc3ab4792c test-data/imzml_filtered4.pdf Binary file test-data/imzml_filtered4.pdf has changed diff -r ca727a6dede6 -r 5abc3ab4792c test-data/imzml_filtered5.pdf Binary file test-data/imzml_filtered5.pdf has changed diff -r ca727a6dede6 -r 5abc3ab4792c test-data/imzml_filtered8.pdf Binary file test-data/imzml_filtered8.pdf has changed diff -r ca727a6dede6 -r 5abc3ab4792c test-data/out3.ibd Binary file test-data/out3.ibd has changed diff -r ca727a6dede6 -r 5abc3ab4792c test-data/out3.imzml --- a/test-data/out3.imzml Thu Sep 24 11:43:31 2020 +0000 +++ b/test-data/out3.imzml Sun Sep 27 11:10:30 2020 +0000 @@ -9,8 +9,8 @@ - - + + diff -r ca727a6dede6 -r 5abc3ab4792c test-data/out3.imzml.txt --- a/test-data/out3.imzml.txt Thu Sep 24 11:43:31 2020 +0000 +++ b/test-data/out3.imzml.txt Sun Sep 27 11:10:30 2020 +0000 @@ -1,4 +1,4 @@ imzML file: total 24 --rw-rw-r-- 1 meli meli 9616 Aug 23 17:39 ibd --rw-rw-r-- 1 meli meli 8958 Aug 23 17:39 imzml +-rw-rw-r-- 1 meli meli 9616 Sep 27 10:51 ibd +-rw-rw-r-- 1 meli meli 8958 Sep 27 10:51 imzml diff -r ca727a6dede6 -r 5abc3ab4792c test-data/out4.ibd Binary file test-data/out4.ibd has changed diff -r ca727a6dede6 -r 5abc3ab4792c test-data/out4.imzml --- a/test-data/out4.imzml Thu Sep 24 11:43:31 2020 +0000 +++ b/test-data/out4.imzml Sun Sep 27 11:10:30 2020 +0000 @@ -9,8 +9,8 @@ - - + + diff -r ca727a6dede6 -r 5abc3ab4792c test-data/out4.imzml.txt --- a/test-data/out4.imzml.txt Thu Sep 24 11:43:31 2020 +0000 +++ b/test-data/out4.imzml.txt Sun Sep 27 11:10:30 2020 +0000 @@ -1,4 +1,4 @@ imzML file: total 44 --rw-rw-r-- 1 meli meli 28792 Aug 23 17:39 ibd --rw-rw-r-- 1 meli meli 12046 Aug 23 17:39 imzml +-rw-rw-r-- 1 meli meli 28792 Sep 27 10:52 ibd +-rw-rw-r-- 1 meli meli 12046 Sep 27 10:52 imzml diff -r ca727a6dede6 -r 5abc3ab4792c test-data/out5.ibd Binary file test-data/out5.ibd has changed diff -r ca727a6dede6 -r 5abc3ab4792c test-data/out5.imzml --- a/test-data/out5.imzml Thu Sep 24 11:43:31 2020 +0000 +++ b/test-data/out5.imzml Sun Sep 27 11:10:30 2020 +0000 @@ -9,8 +9,8 @@ - - + + diff -r ca727a6dede6 -r 5abc3ab4792c test-data/out5.imzml.txt --- a/test-data/out5.imzml.txt Thu Sep 24 11:43:31 2020 +0000 +++ b/test-data/out5.imzml.txt Sun Sep 27 11:10:30 2020 +0000 @@ -1,4 +1,4 @@ imzML file: total 20 --rw-rw-r-- 1 meli meli 380 Aug 23 17:40 ibd --rw-rw-r-- 1 meli meli 13525 Aug 23 17:40 imzml +-rw-rw-r-- 1 meli meli 380 Sep 27 10:53 ibd +-rw-rw-r-- 1 meli meli 13525 Sep 27 10:53 imzml diff -r ca727a6dede6 -r 5abc3ab4792c test-data/out6.ibd Binary file test-data/out6.ibd has changed diff -r ca727a6dede6 -r 5abc3ab4792c test-data/out6.imzml --- a/test-data/out6.imzml Thu Sep 24 11:43:31 2020 +0000 +++ b/test-data/out6.imzml Sun Sep 27 11:10:30 2020 +0000 @@ -9,8 +9,8 @@ - - + + diff -r ca727a6dede6 -r 5abc3ab4792c test-data/out6.imzml.txt --- a/test-data/out6.imzml.txt Thu Sep 24 11:43:31 2020 +0000 +++ b/test-data/out6.imzml.txt Sun Sep 27 11:10:30 2020 +0000 @@ -1,4 +1,4 @@ imzML file: total 164 --rw-rw-r-- 1 meli meli 146896 Aug 23 17:41 ibd --rw-rw-r-- 1 meli meli 18221 Aug 23 17:41 imzml +-rw-rw-r-- 1 meli meli 146896 Sep 27 10:53 ibd +-rw-rw-r-- 1 meli meli 18221 Sep 27 10:53 imzml diff -r ca727a6dede6 -r 5abc3ab4792c test-data/out7.ibd Binary file test-data/out7.ibd has changed diff -r ca727a6dede6 -r 5abc3ab4792c test-data/out7.imzml --- a/test-data/out7.imzml Thu Sep 24 11:43:31 2020 +0000 +++ b/test-data/out7.imzml Sun Sep 27 11:10:30 2020 +0000 @@ -9,8 +9,8 @@ - - + + diff -r ca727a6dede6 -r 5abc3ab4792c test-data/out7.imzml.txt --- a/test-data/out7.imzml.txt Thu Sep 24 11:43:31 2020 +0000 +++ b/test-data/out7.imzml.txt Sun Sep 27 11:10:30 2020 +0000 @@ -1,4 +1,4 @@ imzML file: total 116 --rw-rw-r-- 1 meli meli 95976 Aug 23 17:41 ibd --rw-rw-r-- 1 meli meli 18199 Aug 23 17:41 imzml +-rw-rw-r-- 1 meli meli 95976 Sep 27 10:54 ibd +-rw-rw-r-- 1 meli meli 18199 Sep 27 10:54 imzml diff -r ca727a6dede6 -r 5abc3ab4792c test-data/out8.ibd Binary file test-data/out8.ibd has changed diff -r ca727a6dede6 -r 5abc3ab4792c test-data/out8.imzml --- a/test-data/out8.imzml Thu Sep 24 11:43:31 2020 +0000 +++ b/test-data/out8.imzml Sun Sep 27 11:10:30 2020 +0000 @@ -9,9 +9,9 @@ - - - + + + @@ -90,15 +90,15 @@ - - + + - - - + + + @@ -118,16 +118,16 @@ - - - + + + - - - + + + @@ -147,16 +147,16 @@ - - - + + + - - - + + + @@ -176,16 +176,16 @@ - - - + + + - - - + + + @@ -205,16 +205,16 @@ - - - + + + - - - + + + diff -r ca727a6dede6 -r 5abc3ab4792c test-data/out8.imzml.txt --- a/test-data/out8.imzml.txt Thu Sep 24 11:43:31 2020 +0000 +++ b/test-data/out8.imzml.txt Sun Sep 27 11:10:30 2020 +0000 @@ -1,4 +1,4 @@ imzML file: -total 348 --rw-rw-r-- 1 meli meli 335976 Aug 23 17:42 ibd --rw-rw-r-- 1 meli meli 12402 Aug 23 17:42 imzml +total 260 +-rw-rw-r-- 1 meli meli 248824 Sep 27 11:44 ibd +-rw-rw-r-- 1 meli meli 12397 Sep 27 11:44 imzml diff -r ca727a6dede6 -r 5abc3ab4792c test-data/rdata_notfiltered.pdf Binary file test-data/rdata_notfiltered.pdf has changed