From 1794453bf3e53e22bf60aa6b4ca0a2512a5f3579 Mon Sep 17 00:00:00 2001 From: Bora Uyar Date: Thu, 14 Nov 2024 19:11:26 +0100 Subject: [PATCH] use base namespace to save RDS file: - otherwise this throws an error on R 4.4.2 (Bioc 3.20) --- scripts/convert_loom_to_Seurat.R | 2 +- scripts/convert_loom_to_singleCellExperiment.R | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/convert_loom_to_Seurat.R b/scripts/convert_loom_to_Seurat.R index 74d5336..c5a0389 100755 --- a/scripts/convert_loom_to_Seurat.R +++ b/scripts/convert_loom_to_Seurat.R @@ -53,7 +53,7 @@ convert_loom_to_seurat = function( seu = ScaleData(object = seu) seu@meta.data$CellID = colnames(seu) - saveRDS(seu, outfile) + base::saveRDS(seu, outfile) } diff --git a/scripts/convert_loom_to_singleCellExperiment.R b/scripts/convert_loom_to_singleCellExperiment.R index dba7cba..7a597e7 100644 --- a/scripts/convert_loom_to_singleCellExperiment.R +++ b/scripts/convert_loom_to_singleCellExperiment.R @@ -142,7 +142,7 @@ loomToSingleCellExperiment = function( sce = loom2sce(path = loom_file) outname = str_replace(outfile,'.RDS','') - saveRDS(object = sce, file = paste0(outname, '.raw.RDS')) + base::saveRDS(object = sce, file = paste0(outname, '.raw.RDS')) #4.1.1 Subset the sce object, remove cells that don't exist in the metaDataFile @@ -186,7 +186,7 @@ loomToSingleCellExperiment = function( "scale" = scaled_counts ) - saveRDS(object = sce, file = paste0(outname, '.intermediate.RDS')) + base::saveRDS(object = sce, file = paste0(outname, '.intermediate.RDS')) # 4.8 Map gene ids to gene names and update rowData @@ -197,7 +197,7 @@ loomToSingleCellExperiment = function( rowData(sce)$gene_name = gtf[match(rowData(sce)$gene_id, gtf$gene_id),]$gene_name #5 save SingleCellExperiment object in .RDS format - saveRDS(object = sce, file = outfile) + base::saveRDS(object = sce, file = outfile) }