From 1451499f98512523fe4c60047eea4413b173bc19 Mon Sep 17 00:00:00 2001 From: Zargham Ahmad Date: Tue, 21 May 2024 14:15:55 +0200 Subject: [PATCH 1/3] updated ramclustr to allow tsv for rectetox-aplcms inputs --- tools/ramclustr/macros.xml | 4 ++-- tools/ramclustr/ramclustr.xml | 4 +++- tools/ramclustr/ramclustr_wrapper.R | 19 ++++++++++++++++--- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/tools/ramclustr/macros.xml b/tools/ramclustr/macros.xml index 1d68d514..3c534c3a 100644 --- a/tools/ramclustr/macros.xml +++ b/tools/ramclustr/macros.xml @@ -67,9 +67,9 @@
- - diff --git a/tools/ramclustr/ramclustr.xml b/tools/ramclustr/ramclustr.xml index e08e409e..98229485 100644 --- a/tools/ramclustr/ramclustr.xml +++ b/tools/ramclustr/ramclustr.xml @@ -1,4 +1,4 @@ - + A feature clustering algorithm for non-targeted mass spectrometric metabolomics data. macros.xml @@ -56,6 +56,8 @@ ramclustObj = read_ramclustr_aplcms( ms1_featuredefinitions = "$filetype.ms_dataframe.ms1_featureDefinitions", ms1_featurevalues = "$filetype.ms_dataframe.ms1_featureValues", + ms1_featuredefinitions_ext = "$filetype.ms_dataframe.ms1_featureDefinitions.ext", + ms1_featurevalues_ext = "$filetype.ms_dataframe.ms1_featureValues.ext", #if $filetype.ms_dataframe.df_phenoData: df_phenodata = "$filetype.ms_dataframe.df_phenoData", phenodata_ext = "${filetype.ms_dataframe.df_phenoData.ext}", diff --git a/tools/ramclustr/ramclustr_wrapper.R b/tools/ramclustr/ramclustr_wrapper.R index eefe4931..45bf1cfa 100644 --- a/tools/ramclustr/ramclustr_wrapper.R +++ b/tools/ramclustr/ramclustr_wrapper.R @@ -46,9 +46,22 @@ read_ramclustr_aplcms <- function(ms1_featuredefinitions = NULL, phenodata_ext = NULL, exp_des = NULL, st = NULL, - ensure_no_na = TRUE) { - ms1_featuredefinitions <- arrow::read_parquet(ms1_featuredefinitions) - ms1_featurevalues <- arrow::read_parquet(ms1_featurevalues) + ensure_no_na = TRUE, + ms1_featuredefinitions_ext = "parquet", + ms1_featurevalues_ext = "parquet") { + if (ms1_featuredefinitions_ext == "parquet") { + ms1_featuredefinitions <- arrow::read_parquet(ms1_featuredefinitions) + } else { + ms1_featuredefinitions <- read.csv(ms1_featuredefinitions, + header = TRUE, sep = "\t" + ) + } + + if (ms1_featurevalues_ext == "parquet") { + ms1_featurevalues <- arrow::read_parquet(ms1_featurevalues) + } else { + ms1_featurevalues <- read.csv(ms1_featurevalues, header = TRUE, sep = "\t") + } if (!is.null(df_phenodata)) { if (phenodata_ext == "csv") { From 2533ebefb6a69a0e0e6ff72b85a56f854eda5586 Mon Sep 17 00:00:00 2001 From: Helge Hecht Date: Tue, 21 May 2024 12:27:42 +0000 Subject: [PATCH 2/3] Update tools/ramclustr/macros.xml --- tools/ramclustr/macros.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ramclustr/macros.xml b/tools/ramclustr/macros.xml index 3c534c3a..70a7886b 100644 --- a/tools/ramclustr/macros.xml +++ b/tools/ramclustr/macros.xml @@ -67,7 +67,7 @@
- From 25f2e23b0b9c03b8a3c9ea3cf33a9fe86939ab0a Mon Sep 17 00:00:00 2001 From: Helge Hecht Date: Tue, 21 May 2024 12:27:47 +0000 Subject: [PATCH 3/3] Update tools/ramclustr/macros.xml --- tools/ramclustr/macros.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ramclustr/macros.xml b/tools/ramclustr/macros.xml index 70a7886b..58857c63 100644 --- a/tools/ramclustr/macros.xml +++ b/tools/ramclustr/macros.xml @@ -69,7 +69,7 @@
-