Skip to content

Commit

Permalink
Use SummarizedExperiment::colData/rowData()
Browse files Browse the repository at this point in the history
  • Loading branch information
nh3 committed Oct 10, 2019
1 parent 1fb0502 commit e95cb94
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ sce2anndata <- function(

X <- SummarizedExperiment::assay(obj, main_layer)

obs <- .regularise_df(as.data.frame(SingleCellExperiment::colData(obj)))
obs <- .regularise_df(as.data.frame(SummarizedExperiment::colData(obj)))

var <- .regularise_df(as.data.frame(SingleCellExperiment::rowData(obj)))
var <- .regularise_df(as.data.frame(SummarizedExperiment::rowData(obj)))

obsm <- NULL
reductions <- SingleCellExperiment::reducedDimNames(obj)
Expand Down Expand Up @@ -147,8 +147,8 @@ seurat2sce <- function(obj, outFile = NULL, main_layer=NULL, assay='RNA', ...) {
}

sce2loom <- function(obj, outFile, main_layer = NULL, ...) {
SingleCellExperiment::colData(obj) <- .regularise_df(SingleCellExperiment::colData(obj))
SingleCellExperiment::rowData(obj) <- .regularise_df(SingleCellExperiment::rowData(obj))
SummarizedExperiment::colData(obj) <- .regularise_df(SummarizedExperiment::colData(obj))
SummarizedExperiment::rowData(obj) <- .regularise_df(SummarizedExperiment::rowData(obj))
writeExchangeableLoom(obj, outFile, main_layer = main_layer, ...)
}

Expand Down

0 comments on commit e95cb94

Please sign in to comment.