read_umi_tools() reads a (optionally gzipped) tab-separated condensed
count matrix from umi_tools, with the columns gene, cell and count,
into an AnnData() object with a sparse (CSR) X, as Python's
read_umi_tools().
The obs and var names are the sorted unique cells and genes (Python's
category order), with the index names "cell" and "gene".
Repeated cell and gene pairs are summed and other columns are ignored.
Value
An AnnData() object with a sparse (CSR) X.
Examples
path <- tempfile(fileext = ".tsv")
writeLines(
c("gene\tcell\tcount", "g2\tc2\t3", "g1\tc1\t1", "g3\tc1\t2"),
path
)
read_umi_tools(path)
#> AnnData object with n_obs × n_vars = 2 × 3
#> layers: None (.X)