read_count_output: Read matrix along with barcode and gene names

Description Usage Arguments Value Examples

View source: R/utils.R

Description

This function takes in a directory and name and reads the mtx file, genes, and barcodes from the output of bustools to return a sparse matrix with column names and row names.

Usage

1

Arguments

dir

Directory with the bustools count outputs.

name

The files in the output directory should be "name".mtx, "name".genes.txt, and "name".barcodes.txt.

tcc

Logical, whether the matrix of interest is a TCC matrix. Defaults to FALSE.

Value

A dgCMatrix with barcodes as column names and genes as row names.

Examples

1
2
3
# Internal toy data used for unit testing
toy_path <- system.file("testdata", package = "BUSpaRse")
m <- read_count_output(toy_path, name = "genes", tcc = FALSE)

BUSpaRse documentation built on March 3, 2021, 2:01 a.m.