scHOT_buildFromSCE: scHOT_buildFromSCE

Description Usage Arguments Value Examples

View source: R/build.R

Description

Create scHOT object from a SingleCellExperiment object

Usage

1
2
3
4
5
6
scHOT_buildFromSCE(
  sce,
  assayName = "counts",
  positionType = NULL,
  positionColData = NULL
)

Arguments

sce

A SingleCellExperiment object

assayName

is a single assay to pull out from sce as the expression matrix input of scHOT

positionType

A string indicates the position type, either trajectory or spatial

positionColData

Strings indicate the position information stored in colData. If positionType is "trajectory" then positionColData should be a sortable vector if positionType is "spatial" then positionColData should be a matrix type object.

Value

A scHOT object

Examples

1
2
3
4
5
6
7
8
library(SingleCellExperiment)
dat <- rbind(rnorm(50), rnorm(50), rnorm(50))
colnames(dat) <- paste0("cell_", 1:ncol(dat))
rownames(dat) <- c("gene_1","gene_2", "gene_2")

sce <- SingleCellExperiment::SingleCellExperiment(assays =
S4Vectors::SimpleList(counts = dat))
scHOT <- scHOT_buildFromSCE(sce)

scHOT documentation built on Nov. 8, 2020, 5:06 p.m.