createLiger: Create a liger object.

View source: R/rliger.R

createLigerR Documentation

Create a liger object.

Description

This function initializes a liger object with the raw data passed in. It requires a list of expression (or another single-cell modality) matrices (gene by cell) for at least two datasets. By default, it converts all passed data into sparse matrices (dgCMatrix) to reduce object size. It initializes cell.data with nUMI and nGene calculated for every cell.

Usage

createLiger(
  raw.data,
  take.gene.union = FALSE,
  remove.missing = TRUE,
  format.type = "10X",
  data.name = NULL,
  indices.name = NULL,
  indptr.name = NULL,
  genes.name = NULL,
  barcodes.name = NULL,
  verbose = TRUE
)

Arguments

raw.data

List of expression matrices (gene by cell). Should be named by dataset.

take.gene.union

Whether to fill out raw.data matrices with union of genes across all datasets (filling in 0 for missing data) (requires make.sparse = TRUE) (default FALSE).

remove.missing

Whether to remove cells not expressing any measured genes, and genes not expressed in any cells (if take.gene.union = TRUE, removes only genes not expressed in any dataset) (default TRUE).

format.type

HDF5 format (10X CellRanger by default).

data.name

Path to the data values stored in HDF5 file.

indices.name

Path to the indices of data points stored in HDF5 file.

indptr.name

Path to the pointers stored in HDF5 file.

genes.name

Path to the gene names stored in HDF5 file.

barcodes.name

Path to the barcodes stored in HDF5 file.

verbose

Print messages (TRUE by default)

Value

liger object with raw.data slot set.

Examples

ligerex <- createLiger(list(ctrl = ctrl, stim = stim))

rliger documentation built on Nov. 9, 2023, 1:07 a.m.