Skip to content
Snippets Groups Projects
Commit 779ff32f authored by Luke Zappia's avatar Luke Zappia
Browse files

Switch to BiocGenerics::counts

parent 81ed90d1
No related branches found
No related tags found
No related merge requests found
......@@ -33,15 +33,15 @@ addFeatureStats <- function(sce, value = c("counts", "cpm", "tpm", "fpkm"),
switch(value,
counts = {
values = SummarizedExperiment::assays(sce)$counts
values = BiocGenerics::counts(sce)
suffix <- "Counts"
},
cpm = {
values = SummarizedExperiment::assays(sce)$cpm
values = SingleCellExperiment::cpm(sce)
suffix <- "CPM"
},
tpm = {
values = SummarizedExperiment::assays(sce)$tpm
values = SingleCellExperiment::tpm(sce)
suffix <- "TPM"
},
fpkm = {
......
......@@ -25,7 +25,7 @@ lunEstimate <- function(counts, params = newLunParams()) {
#' @rdname lunEstimate
#' @export
lunEstimate.SingleCellExperiment <- function(counts, params = newLunParams()) {
counts <- SummarizedExperiment::assays(counts)$counts
counts <- BiocGenerics::counts(counts)
lunEstimate(counts, params)
}
......
......@@ -40,7 +40,7 @@ lun2Estimate.SingleCellExperiment <- function(counts, plates,
params = newLun2Params(),
min.size = 200, verbose = TRUE,
BPPARAM = SerialParam()) {
counts <- SummarizedExperiment::assays(counts)$counts
counts <- BiocGenerics::counts(counts)
lun2Estimate(counts, plates, params, min.size = min.size, verbose = verbose)
}
......
......@@ -40,7 +40,7 @@ scDDEstimate.SingleCellExperiment <- function(counts, conditions,
params = newSCDDParams(),
verbose = TRUE,
BPPARAM = SerialParam()) {
counts <- SummarizedExperiment::assays(counts)$counts
counts <- BiocGenerics::counts(counts)
scDDEstimate(counts, conditions, params, verbose, BPPARAM)
}
......
......@@ -28,7 +28,7 @@ simpleEstimate <- function(counts, params = newSimpleParams()) {
#' @export
simpleEstimate.SingleCellExperiment <- function(counts,
params = newSimpleParams()) {
counts <- SummarizedExperiment::assays(counts)$counts
counts <- BiocGenerics::counts(counts)
simpleEstimate(counts, params)
}
......
......@@ -28,7 +28,7 @@ splatEstimate <- function(counts, params = newSplatParams()) {
#' @export
splatEstimate.SingleCellExperiment <- function(counts,
params = newSplatParams()) {
counts <- SummarizedExperiment::assays(counts)$counts
counts <- BiocGenerics::counts(counts)
splatEstimate(counts, params)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment