# HG changeset patch # User recetox # Date 1684939825 0 # Node ID 755ff0afaaffddd76ed8206315646d567222f091 # Parent c69a12bfc2fb621754f0ec7ed7f501d6901cad76 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/recetox_aplcms commit 724ecb1b81ebd8a67488b8a9397177b2ff0357db diff -r c69a12bfc2fb -r 755ff0afaaff help.xml --- a/help.xml Mon Apr 03 14:57:30 2023 +0000 +++ b/help.xml Wed May 24 14:50:25 2023 +0000 @@ -110,7 +110,6 @@ ================================= Group features with `mz` and `rt` using tolerances within the tolerance into clusters, creating larger features from raw data points. -Custom tolerances for `mz` and `rt` are computed based on the given parameters. The tool takes a collection of all detected features and computes the clusters over a global feature table, adding the `sample_id` and `cluster` columns to the table. Example Output @@ -133,7 +132,7 @@ recetox-aplcms - correct time ============================= -Apply spline-based retention time correction to a feature table given the template table and the computed `mz` and `rt` tolerances. +Apply spline-based retention time correction to a feature table given the template table and the `mz` and `rt` tolerances. Example Output -------------- diff -r c69a12bfc2fb -r 755ff0afaaff macros.xml --- a/macros.xml Mon Apr 03 14:57:30 2023 +0000 +++ b/macros.xml Wed May 24 14:50:25 2023 +0000 @@ -1,5 +1,5 @@ - 0.10.3 + 0.11.0 r-recetox-aplcms @@ -93,32 +93,11 @@ - - - - - - - - - - - - - - - - - + + + diff -r c69a12bfc2fb -r 755ff0afaaff recetox_aplcms_recover_weaker_signals.xml --- a/recetox_aplcms_recover_weaker_signals.xml Mon Apr 03 14:57:30 2023 +0000 +++ b/recetox_aplcms_recover_weaker_signals.xml Wed May 24 14:50:25 2023 +0000 @@ -35,8 +35,6 @@ rt_table <- load_data_from_parquet_file('$rt_file') intensity_table <- load_data_from_parquet_file('$intensity_file') - tolerances <- load_data_from_parquet_file('$tolerances') - recovered <- recover.weaker( filename = '$input_file', sample_name = sample_name, @@ -46,8 +44,8 @@ rt_table = rt_table, intensity_table = intensity_table, mz_tol = $mz_tol/1e6, - mz_tol_relative = get_mz_tol(tolerances), - rt_tol_relative = get_rt_tol(tolerances), + mz_tol_relative = $mz_tol_relative_ppm * 1e-06, + rt_tol_relative = $rt_tol, #if $recover_mz_range: recover_mz_range = $recover_mz_range/1e6, #else: @@ -94,8 +92,7 @@ help="Table with retention times for features (rows) across samples (columns)." /> - + diff -r c69a12bfc2fb -r 755ff0afaaff test-data/remove_noise_docker.parquet Binary file test-data/remove_noise_docker.parquet has changed diff -r c69a12bfc2fb -r 755ff0afaaff utils.R --- a/utils.R Mon Apr 03 14:57:30 2023 +0000 +++ b/utils.R Wed May 24 14:50:25 2023 +0000 @@ -39,11 +39,11 @@ return(features) } -save_parquet_collection <- function(table, sample_names, subdir) { +save_parquet_collection <- function(feature_tables, sample_names, subdir) { dir.create(subdir) - for (i in seq_len(length(table$feature_tables))) { + for (i in seq_len(length(feature_tables))) { filename <- file.path(subdir, paste0(subdir, "_", sample_names[i], ".parquet")) - feature_table <- as.data.frame(table$feature_tables[[i]]) + feature_table <- as.data.frame(feature_tables[[i]]) feature_table <- save_sample_name(feature_table, sample_names[i]) arrow::write_parquet(feature_table, filename) } @@ -59,14 +59,6 @@ arrow::write_parquet(data.frame(mz_tolerance, rt_tolerance), tol_file) } -get_mz_tol <- function(tolerances) { - return(tolerances$mz_tolerance) -} - -get_rt_tol <- function(tolerances) { - return(tolerances$rt_tolerance) -} - save_aligned_features <- function(aligned_features, metadata_file, rt_file, intensity_file) { save_data_as_parquet_file(aligned_features$metadata, metadata_file) save_data_as_parquet_file(aligned_features$rt, rt_file)