View source: R/preprocessing_filtering_reduction.R
read_sparse_matrix | R Documentation |
Given one or multiple directories, look in each directory for a combination of the following files :
A 'features' file containing unique feature genomic locations -in tab separated format ( *_features.bed / .txt / .tsv / .gz), e.g. chr, start and end
A 'barcodes' file containing unique barcode names ( _barcode.txt / .tsv / .gz)
A 'matrix' A file containing indexes of non zero entries (_matrix.mtx / .gz)
read_sparse_matrix(
files_dir_list,
ref = c("hg38", "mm10", "ce11")[1],
verbose = TRUE
)
files_dir_list |
A named character vector containing the full path towards folders. Each folder should contain only the Feature file, the Barcode file and the Matrix file (see description). |
ref |
Reference genome (used to filter non-canonical chromosomes). |
verbose |
Print ? |
Returns a list containing a datamatrix and cell annotation
## Not run:
sample_dirs = c("/path/to/folder1/", "/path/to/folder2/")
names(sample_dirs) = c("sample_1", "sample_2")
out <- read_sparse_matrix(sample_dirs, ref = "hg38")
head(out$datamatrix)
head(out$annot_raw)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.