From 4bd862924217d243f3154be6c5345c0cc89b47bc Mon Sep 17 00:00:00 2001 From: vertesy Date: Thu, 1 Feb 2024 06:47:03 +0100 Subject: [PATCH] ... --- R/Seurat.Utils.Metadata.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/R/Seurat.Utils.Metadata.R b/R/Seurat.Utils.Metadata.R index 0432014..1c217dd 100644 --- a/R/Seurat.Utils.Metadata.R +++ b/R/Seurat.Utils.Metadata.R @@ -584,7 +584,8 @@ set.all.genes <- function(obj = combined.obj) iprint("Use calc.q99.Expression.an #' The function currently contains a `browser()` call for debugging purposes, which should be removed in production. #' #' @export -writeCombinedMetadataToTsvFromLsObj <- function(ls.Obj, cols.remove = character(), write_out = TRUE, ...) { +writeCombinedMetadataToTsvFromLsObj <- function(ls.Obj, cols.remove = character(), + save_as_qs = TRUE, save_as_tsv = TRUE, ...) { warning("writeMetadataToTsv is EXPERIMENTAL. It writes out subset of columns", immediate. = TRUE) stopifnot(is.list(ls.Obj)) # Validate that input is a list @@ -615,7 +616,8 @@ writeCombinedMetadataToTsvFromLsObj <- function(ls.Obj, cols.remove = character( # Print dimensions of the merged data frame print(dim(mergedMetaData)) - if (write_out) ReadWriter::write.simple.tsv(mergedMetaData, ...) + if (save_as_qs) xsave(mergedMetaData) + if (save_as_tsv) ReadWriter::write.simple.tsv(mergedMetaData, ...) # Return the merged data frame invisible(mergedMetaData)