readVelocytoLoom {CytoSimplex}R Documentation

Extract the raw counts from a LOOM file

Description

This function is primarily designed for fetching the raw count data from a LOOM file, output by Velocyto. We by default use the spliced counts.

Usage

readVelocytoLoom(
  filename,
  matrixPath = "layers/spliced",
  cellID = "CellID",
  featureID = "Gene",
  chunkSize = 1000
)

Arguments

filename

File path to the LOOM file.

matrixPath

A path in the LOOM file to the matrix to extract, following the inner HDF5 structure. Default "layers/spliced". See Details.

cellID

The name of the cell ID column in the LOOM column-attributes. The same thing as argument obs_names of scanpy.read_loom. Default "CellID".

featureID

The name of the feature ID column in the LOOM row-attributes. The same thing as argument var_names of scanpy.read_loom. Default "Gene".

chunkSize

The maximum size of the chunk to load the matrix. Default 1000.

Details

The velocyto output LOOM file is HDF5 based and is roughly organized as follows:

An AnnData object created with Scanpy by default loads the data with a different structure, so that all the four matrices are accessible in adata.layers and set one of them (by default "layers/spliced") to adata.X.

Value

A sparse matrix of class "dgCMatrix", with cells as columns and genes as rows.

See Also

Other H5AD-reader: readH5ADObsNames(), readH5ADObsVar(), readH5ADUnsSpMat()

Examples

## Not run: 
loomFile <- "velocyto/out/analysis.loom"
rawCounts <- readVelocytoLoom(loomFile)

## End(Not run)

[Package CytoSimplex version 0.2.0 Index]