Skip to contents

Load a counts matrix from various file formats including 10X outputs, tab-delimited text files, or h5ad files.

Usage

load_counts(counts_file)

Arguments

counts_file

Path to counts file. Supported formats:

  • .h5ad - AnnData format (requires anndata package)

  • .mtx.gz or .mtx - 10X sparse matrix format

  • .tsv, .txt, .csv - Tab or comma delimited text files

Value

A list containing:

  • counts: Sparse matrix (cells x genes)

  • cell_names: Character vector of cell barcodes

  • gene_names: Character vector of gene names

Examples

if (FALSE) { # \dontrun{
data <- load_counts("path/to/matrix.mtx.gz")
dim(data$counts)
} # }