readSingleCellMatrix: Read single cell expression matrix

Description Usage Arguments Value Examples

View source: R/readSingleCellMatrix.R

Description

Automatically detact the format of the input file and read the file.

Usage

1
2
3
4
5
6
7
readSingleCellMatrix(
  file,
  class = c("Matrix", "matrix"),
  delayedArray = TRUE,
  colIndexLocation = NULL,
  rowIndexLocation = NULL
)

Arguments

file

Path to input file. Supported file endings include .mtx, .txt, .csv, .tab, .tsv, .npz, and their corresponding gzip, bzip2, or xz compressed extensions (*.gz, *.bz2, or *.xz).

class

Character. Class of matrix. One of "Matrix" or "matrix". Specifying "Matrix" will convert to a sparse format which should be used for datasets with large numbers of cells. Default "Matrix".

delayedArray

Boolean. Whether to read the expression matrix as DelayedArray object or not. Default TRUE.

colIndexLocation

Character. For Optimus output, the path to the barcode index .npy file. Used only if file has .npz extension. Default NULL.

rowIndexLocation

Character. For Optimus output, The path to the feature (gene) index .npy file. Used only if file has .npz extension. Default NULL.

Value

A DelayedArray object or matrix.

Examples

1
2
mat <- readSingleCellMatrix(system.file("extdata/hgmm_1k_v3_20x20/outs/",
    "filtered_feature_bc_matrix/matrix.mtx.gz", package = "singleCellTK"))

singleCellTK documentation built on Nov. 8, 2020, 5:21 p.m.