read_10x {ccfindR} | R Documentation |
Read count, gene, and barcode annotation data in 10x format
and create an object of class scNMFSet
.
read_10x(dir, count = "matrix.mtx", genes = "genes.tsv", barcodes = "barcodes.tsv", remove.zeros = TRUE)
dir |
Name of directory containing data files. |
count |
Name of count matrix file. |
genes |
Name of gene annotation file. |
barcodes |
Name of cell annotation file. |
remove.zeros |
If |
Files for count
, genes
, and barcodes
are
assumed to be present in dir
.
Count data are in sparse "Matrix Market" format
(https://math.nist.gov/MatrixMarket/formats.html).
Object of class scNMFSet
library(S4Vectors) s <- scNMFSet(count=matrix(rpois(n=12,lambda=3),4,3)) rowData(s) <- DataFrame(seq_len(4)) colData(s) <- DataFrame(seq_len(3)) write_10x(s,dir='.') s <- read_10x(dir='.') s