# HG changeset patch # User galaxyp # Date 1630221607 0 # Node ID aa479a0cfb434324bca7ee731407dbb49846f295 # Parent e0bbaf9f7da0f705e3bb019eb8c38e4a3584089f "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit c8d3adac445b4e08e2724e22d7201bfc38bbf40f" diff -r e0bbaf9f7da0 -r aa479a0cfb43 macros.xml --- a/macros.xml Tue Nov 03 22:41:21 2020 +0000 +++ b/macros.xml Sun Aug 29 07:20:07 2021 +0000 @@ -1,5 +1,5 @@ - 2.6.0 + 2.10.0 diff -r e0bbaf9f7da0 -r aa479a0cfb43 preprocessing.xml --- a/preprocessing.xml Tue Nov 03 22:41:21 2020 +0000 +++ b/preprocessing.xml Sun Aug 29 07:20:07 2021 +0000 @@ -1,4 +1,4 @@ - + mass spectrometry imaging preprocessing @@ -7,7 +7,7 @@ r-gridextra - r-ggplot2 + r-ggplot2 = $method.methods_conditional.mz_range.min_mz & mz(msidata) <= $method.methods_conditional.mz_range.max_mz,] - msidata = mse_bin = mzBin(msidata,resolution=$method.methods_conditional.bin_width, units="$method.methods_conditional.bin_units", fun="$method.methods_conditional.bin_fun") - #end if - #elif str( $method.methods_conditional.mz_range.features_filtering) == 'none': + #elif str($method.methods_conditional.mz_range.features_filtering) == 'none': msidata = mse_bin = mzBin(msidata,resolution=$method.methods_conditional.bin_width, units="$method.methods_conditional.bin_units", fun=$method.methods_conditional.bin_fun) + #elif str($method.methods_conditional.mz_range.features_filtering) == 'bin_to_reference': + + bin_reference_mz = read.delim("$method.methods_conditional.mz_range.mz_tabular", header = $method.methods_conditional.mz_range.feature_header, stringsAsFactors = FALSE) + bin_reference_mz = bin_reference_mz[,$method.methods_conditional.mz_range.feature_column] + + msidata = mse_bin = mzBin(msidata,resolution=$method.methods_conditional.bin_width, units="$method.methods_conditional.bin_units", fun=$method.methods_conditional.bin_fun, + ref=bin_reference_mz) + #end if msidata <- process(msidata, BPPARAM=MulticoreParam(workers=number_cpu)) @@ -385,7 +418,7 @@ print('log2 transformation') ## replace 0 with NA to prevent Inf - spectra_df = spectra(msidata) ## convert into R matrix + spectra_df = as.matrix(spectra(msidata)) ## convert into R matrix spectra_df[spectra_df ==0] = NA print(paste0("Number of 0 which were converted into NA:",sum(is.na(spectra_df)))) spectra(msidata) = spectra_df @@ -422,25 +455,14 @@ ################################################################################ ## 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 coord(msidata)\$y = as.integer(coord(msidata)\$y) coord(msidata)\$x = as.integer(coord(msidata)\$x) - #if $used_peak_picking: - #if $continuous_format: - msidata = as(msidata, "MSContinuousImagingExperiment") - #end if - #elif $used_peak_alignment - #if $continuous_format: - msidata = as(msidata, "MSContinuousImagingExperiment") - #end if - #end if - writeImzML(msidata, "out") + ## only continuous files can currently be exported + msidata = as(msidata, "MSContinuousImagingExperiment") + writeImzML(msidata, "out") } plot(0,type='n',axes=FALSE,ann=FALSE) @@ -463,6 +485,7 @@ + @@ -541,6 +564,26 @@ + + + + + + + + + + + + + + + + + - + + + + + @@ -645,7 +692,6 @@ - @@ -666,10 +712,8 @@ - - + - @@ -702,7 +746,6 @@ - @@ -727,7 +770,6 @@ - @@ -753,13 +795,11 @@ - - @@ -783,6 +823,16 @@ + + + + + + + + + + @@ -850,7 +900,7 @@ **Output** -- MSI data as continuous or processed imzML file +- MSI data as continuous imzML file - pdf with key values and four random mass spectra after each processing step ]]> diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/Heatmaps_LM8_file16.pdf Binary file test-data/Heatmaps_LM8_file16.pdf has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/Heatmaps_analyze75.pdf Binary file test-data/Heatmaps_analyze75.pdf has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/Heatmaps_imzml.pdf Binary file test-data/Heatmaps_imzml.pdf has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/Heatmaps_processed.pdf Binary file test-data/Heatmaps_processed.pdf has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/Heatmaps_rdata.pdf Binary file test-data/Heatmaps_rdata.pdf has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/Plot_analyze75.pdf Binary file test-data/Plot_analyze75.pdf has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/Plot_analyze75_allpixels.pdf Binary file test-data/Plot_analyze75_allpixels.pdf has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/Plot_imzml.pdf Binary file test-data/Plot_imzml.pdf has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/Plot_picked.pdf Binary file test-data/Plot_picked.pdf has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/Plot_processed.pdf Binary file test-data/Plot_processed.pdf has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/Plot_rdata.pdf Binary file test-data/Plot_rdata.pdf has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/QC_imzml_shortreport.pdf Binary file test-data/QC_imzml_shortreport.pdf has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/centroids_proc.pdf Binary file test-data/centroids_proc.pdf has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/pixels_test6.tabular --- a/test-data/pixels_test6.tabular Tue Nov 03 22:41:21 2020 +0000 +++ b/test-data/pixels_test6.tabular Sun Aug 29 07:20:07 2021 +0000 @@ -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 diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/preprocessing_results1.ibd Binary file test-data/preprocessing_results1.ibd has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/preprocessing_results1.imzml --- a/test-data/preprocessing_results1.imzml Tue Nov 03 22:41:21 2020 +0000 +++ b/test-data/preprocessing_results1.imzml Sun Aug 29 07:20:07 2021 +0000 @@ -9,8 +9,8 @@ - - + + @@ -86,15 +86,15 @@ - - + + - - - + + + @@ -115,15 +115,15 @@ - - + + - - - + + + @@ -144,15 +144,15 @@ - - + + - - - + + + @@ -173,15 +173,15 @@ - - + + - - - + + + @@ -202,15 +202,15 @@ - - + + - - - + + + @@ -231,15 +231,15 @@ - - + + - - - + + + @@ -260,15 +260,15 @@ - - + + - - - + + + @@ -289,15 +289,15 @@ - - + + - - - + + + @@ -318,15 +318,15 @@ - - + + - - - + + + diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/preprocessing_results1.imzml.txt --- a/test-data/preprocessing_results1.imzml.txt Tue Nov 03 22:41:21 2020 +0000 +++ b/test-data/preprocessing_results1.imzml.txt Sun Aug 29 07:20:07 2021 +0000 @@ -1,4 +1,4 @@ imzML file: total 24 --rw-rw-r-- 1 meli meli 216 Oct 5 19:57 ibd --rw-rw-r-- 1 meli meli 18090 Oct 5 19:57 imzml +-rw-rw-r-- 1 meli meli 336 Nov 29 01:14 ibd +-rw-rw-r-- 1 meli meli 18092 Nov 29 01:14 imzml diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/preprocessing_results1.pdf Binary file test-data/preprocessing_results1.pdf has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/preprocessing_results2.ibd Binary file test-data/preprocessing_results2.ibd has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/preprocessing_results2.imzml --- a/test-data/preprocessing_results2.imzml Tue Nov 03 22:41:21 2020 +0000 +++ b/test-data/preprocessing_results2.imzml Sun Aug 29 07:20:07 2021 +0000 @@ -9,8 +9,8 @@ - - + + diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/preprocessing_results2.imzml.txt --- a/test-data/preprocessing_results2.imzml.txt Tue Nov 03 22:41:21 2020 +0000 +++ b/test-data/preprocessing_results2.imzml.txt Sun Aug 29 07:20:07 2021 +0000 @@ -1,4 +1,4 @@ imzML file: total 64 --rw-rw-r-- 1 meli meli 37404 Oct 5 19:57 ibd --rw-rw-r-- 1 meli meli 22796 Oct 5 19:57 imzml +-rw-rw-r-- 1 meli meli 37404 Nov 29 18:03 ibd +-rw-rw-r-- 1 meli meli 22796 Nov 29 18:03 imzml diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/preprocessing_results2.pdf Binary file test-data/preprocessing_results2.pdf has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/preprocessing_results3.ibd Binary file test-data/preprocessing_results3.ibd has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/preprocessing_results3.imzml --- a/test-data/preprocessing_results3.imzml Tue Nov 03 22:41:21 2020 +0000 +++ b/test-data/preprocessing_results3.imzml Sun Aug 29 07:20:07 2021 +0000 @@ -9,9 +9,9 @@ - - - + + + @@ -86,15 +86,15 @@ - - + + - - - + + + @@ -114,16 +114,16 @@ - - - + + + - - - + + + @@ -143,16 +143,16 @@ - - - + + + - - - + + + @@ -172,16 +172,16 @@ - - - + + + - - - + + + @@ -201,16 +201,16 @@ - - - + + + - - - + + + @@ -230,16 +230,16 @@ - - - + + + - - - + + + @@ -259,16 +259,16 @@ - - - + + + - - - + + + @@ -288,16 +288,16 @@ - - - + + + - - - + + + @@ -317,16 +317,16 @@ - - - + + + - - - + + + diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/preprocessing_results3.imzml.txt --- a/test-data/preprocessing_results3.imzml.txt Tue Nov 03 22:41:21 2020 +0000 +++ b/test-data/preprocessing_results3.imzml.txt Sun Aug 29 07:20:07 2021 +0000 @@ -1,4 +1,4 @@ imzML file: total 24 --rw-rw-r-- 1 meli meli 960 Oct 5 19:58 ibd --rw-rw-r-- 1 meli meli 18112 Oct 5 19:58 imzml +-rw-rw-r-- 1 meli meli 1456 Nov 29 18:04 ibd +-rw-rw-r-- 1 meli meli 18133 Nov 29 18:04 imzml diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/preprocessing_results3.pdf Binary file test-data/preprocessing_results3.pdf has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/preprocessing_results4.ibd Binary file test-data/preprocessing_results4.ibd has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/preprocessing_results4.imzml --- a/test-data/preprocessing_results4.imzml Tue Nov 03 22:41:21 2020 +0000 +++ b/test-data/preprocessing_results4.imzml Sun Aug 29 07:20:07 2021 +0000 @@ -9,8 +9,8 @@ - - + + @@ -42,7 +42,7 @@ - + diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/preprocessing_results4.imzml.txt --- a/test-data/preprocessing_results4.imzml.txt Tue Nov 03 22:41:21 2020 +0000 +++ b/test-data/preprocessing_results4.imzml.txt Sun Aug 29 07:20:07 2021 +0000 @@ -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 diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/preprocessing_results4.pdf Binary file test-data/preprocessing_results4.pdf has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/test1.pdf Binary file test-data/test1.pdf has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/test2.pdf Binary file test-data/test2.pdf has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/test3.pdf Binary file test-data/test3.pdf has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/test4.pdf Binary file test-data/test4.pdf has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/test5.pdf Binary file test-data/test5.pdf has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/test6.pdf Binary file test-data/test6.pdf has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/test6.rdata Binary file test-data/test6.rdata has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/test7.pdf Binary file test-data/test7.pdf has changed diff -r e0bbaf9f7da0 -r aa479a0cfb43 test-data/test7.rdata Binary file test-data/test7.rdata has changed