diff utils.R @ 4:755ff0afaaff draft

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/recetox_aplcms commit 724ecb1b81ebd8a67488b8a9397177b2ff0357db
author recetox
date Wed, 24 May 2023 14:50:25 +0000
parents c69a12bfc2fb
children fd66fc063ce8
line wrap: on
line diff
--- 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)