writeMatrixFiles: Write a Matrix to a folder.

Description Usage Arguments Value Examples

View source: R/TooManyCellsR.R

Description

This function will write a Matrix from the Matrix library to a temporary directory containing matrix.mtx, genes.tsv, barcodes.tsv, and optionally a labels.csv file.

Usage

1

Arguments

mat

The input Matrix with gene row names and cell barcode column names.

labels

The input labels data frame with item (cell barcodes) and label (whatever labels you want to give them, such as tissue of origin, celltype, etc.) columns. Optional.

Value

None

Examples

1
2
3
4
input <- system.file("extdata", "mat.csv", package="TooManyCellsR")
df = read.csv(input, row.names = 1, header = TRUE)
mat = Matrix::Matrix(as.matrix(df), sparse = TRUE)
writeMatrixFiles(mat)

GregorySchwartz/tooManyCellsR documentation built on March 3, 2020, 3:31 p.m.