Create scHOT object from a matrix

scHOT_buildFromMatrix(
  mat,
  cellData = NULL,
  positionType = NULL,
  positionColData = NULL
)

Arguments

mat

A matrix with rows for genes and columns for cells

cellData

A dataframe or DataFrame object with rows for cells

positionType

A string indicating 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

dat <- rbind(rnorm(50), rnorm(50), rnorm(50))
colnames(dat) <- paste0("cell_", 1:ncol(dat))
rownames(dat) <- c("gene_1","gene_2", "gene_2")

scHOT <- scHOT_buildFromMatrix(dat, cellData = data.frame(1:ncol(dat)))

scHOT
#> class: scHOT 
#> dim: 3 50 
#> metadata(0):
#> assays(1): expression
#> rownames(3): gene_1 gene_2 gene_2
#> rowData names(0):
#> colnames(50): cell_1 cell_2 ... cell_49 cell_50
#> colData names(1): X1.ncol.dat.
#> reducedDimNames(0):
#> mainExpName: NULL
#> altExpNames(0):
#> testingScaffold dim: 0 0 
#> weightMatrix dim: 0 0 
#> scHOT_output colnames (0):
#> param names (0):
#> position type: