read_10x: Read 10x data and generate scNMF object

Description Usage Arguments Details Value Examples

View source: R/utils.R

Description

Read count, gene, and barcode annotation data in 10x format and create an object of class scNMFSet.

Usage

1
2
read_10x(dir, count = "matrix.mtx", genes = "genes.tsv",
  barcodes = "barcodes.tsv", remove.zeros = TRUE)

Arguments

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 TRUE, empty rows/columns are removed.

Details

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).

Value

Object of class scNMFSet

Examples

1
2
3
4
5
6
7
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

hjunwoo/ccfindR documentation built on Oct. 4, 2019, 10:31 a.m.