Skip to contents

Conversion to BlaseData

Usage

as.BlaseData(x, ...)

# S4 method for class 'SingleCellExperiment'
as.BlaseData(
  x,
  pseudotime_slot = "slingPseudotime_1",
  n_bins = 20,
  split_by = "pseudotime_range"
)

Arguments

x

An object to take counts from

...

additional arguments passed to object-specific methods.

pseudotime_slot

The SingleCellExperiment::SingleCellExperiment slot containing pseudotime values for each cell to be passed to assign_pseudotime_bins().

n_bins

The number of bins to create, passed to assign_pseudotime_bins().

split_by

The split_by method to be passed on to assign_pseudotime_bins().

Value

An BlaseData object

Examples

counts <- matrix(rpois(100, lambda = 10), ncol = 10, nrow = 10)
sce <- SingleCellExperiment::SingleCellExperiment(
    assays = list(normcounts = counts)
)
sce$pseudotime <- seq_len(10) - 1
data <- as.BlaseData(sce, pseudotime_slot = "pseudotime", n_bins = 3)
genes(data) <- as.character(seq_len(10))

genes(data)
#>  [1] "1"  "2"  "3"  "4"  "5"  "6"  "7"  "8"  "9"  "10"