read_10x {ccfindR} | R Documentation

## Read 10x data and generate scNMF object

### Description

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

### Usage

    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

    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

[Package ccfindR version 1.6.0 Index]