diff --git a/tools/ramclustr/macros.xml b/tools/ramclustr/macros.xml index 1d68d514..58857c63 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") {