readVelocytoLoom | R Documentation |
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.
readVelocytoLoom(
filename,
matrixPath = "layers/spliced",
cellID = "CellID",
featureID = "Gene",
chunkSize = 1000
)
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 |
cellID |
The name of the cell ID column in the LOOM column-attributes.
The same thing as argument |
featureID |
The name of the feature ID column in the LOOM
row-attributes. The same thing as argument |
chunkSize |
The maximum size of the chunk to load the matrix. Default 1000. |
The velocyto output LOOM file is HDF5 based and is roughly organized as follows:
"matrix"
: The whole raw counts, which is the sum of spliced, unspliced
and ambiguous counts.
layers: A group like a folder
"layers/spliced"
: The spliced counts.
"layers/unspliced"
: The unspliced counts.
"layers/ambiguous"
: The ambiguous counts.
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
.
A sparse matrix of class "dgCMatrix", with cells as columns and genes as rows.
Other H5AD-reader:
readH5ADObsNames()
,
readH5ADObsVar()
,
readH5ADUnsSpMat()
## Not run:
loomFile <- "velocyto/out/analysis.loom"
rawCounts <- readVelocytoLoom(loomFile)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.