Skip to content

Commit

Permalink
use base namespace to save RDS file:
Browse files Browse the repository at this point in the history
 - otherwise this throws an error on R 4.4.2 (Bioc 3.20)
  • Loading branch information
borauyar committed Nov 14, 2024
1 parent 4ed2fb5 commit 1794453
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion scripts/convert_loom_to_Seurat.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}


Expand Down
6 changes: 3 additions & 3 deletions scripts/convert_loom_to_singleCellExperiment.R
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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
Expand All @@ -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)

}

Expand Down

0 comments on commit 1794453

Please sign in to comment.