scHOT_buildFromMatrix: scHOT_buildFromMatrix

View source: R/build.R

scHOT_buildFromMatrixR Documentation

scHOT_buildFromMatrix

Description

Create scHOT object from a matrix

Usage

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


shazanfar/scHOT documentation built on June 29, 2023, 5:29 p.m.