Skip to content

Commit

Permalink
Update param
Browse files Browse the repository at this point in the history
  • Loading branch information
keller-mark committed Jun 20, 2024
1 parent ed889a0 commit 3000b4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/bioc_to_zarr.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#' obj <- get_sce_obj()
#' sce_to_anndata_zarr(obj, out_path = "data/sce.zarr")
#' @importFrom SingleCellExperiment reducedDims reducedDims<-
sce_to_anndata_zarr <- function(sce_obj, out_path) {
sce_to_anndata_zarr <- function(sce_obj, out_path, to_dense = TRUE) {
obsm_keys <- names(as.list(reducedDims(sce_obj)))
for(obsm_key in obsm_keys) {
# If there are column names, then the obsm element will be stored as a data.frame,
Expand All @@ -19,7 +19,7 @@ sce_to_anndata_zarr <- function(sce_obj, out_path) {
}

store <- pizzarr::DirectoryStore$new(out_path)
anndataR::from_SingleCellExperiment(sce_obj, "ZarrAnnData", store = store, to_dense = TRUE)
anndataR::from_SingleCellExperiment(sce_obj, "ZarrAnnData", store = store, to_dense = to_dense)
return(TRUE)
}

Expand Down

0 comments on commit 3000b4d

Please sign in to comment.