Seurat (version 2.3.4)

Read10X: Load in data from 10X

Description

Enables easy loading of sparse data matrices provided by 10X genomics.

Usage

Read10X(data.dir = NULL)

Arguments

data.dir

Directory containing the matrix.mtx, genes.tsv, and barcodes.tsv files provided by 10X. A vector or named vector can be given in order to load several data directories. If a named vector is given, the cell barcode names will be prefixed with the name.

Value

Returns a sparse matrix with rows and columns labeled

Examples

Run this code
# NOT RUN {
data_dir <- 'path/to/data/directory'
list.files(data_dir) # Should show barcodes.tsv, genes.tsv, and matrix.mtx
expression_matrix <- Read10X(data.dir = data_dir)
seurat_object = CreateSeuratObject(raw.data = expression_matrix)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab