readH5ADObsVar {CytoSimplex} | R Documentation |
Extract a variable from adata.obs stored in an H5AD file
Description
Primarily designed for fetching the annotation used for visualization.
Usage
readH5ADObsVar(filename, obsKey, named = TRUE, categoricalAsFactor = TRUE)
Arguments
filename |
File path to the H5AD file. |
obsKey |
The variable name to extract, must use only one character string. |
named |
Logical, whether to name the vector with cell IDs that came from
|
categoricalAsFactor |
Logical, whether to convert categorical variables
to factors. Default |
Value
A vector of the extracted variable, or a factor if the variable is
encoded to be categorical and categoricalAsFactor = TRUE
.
See Also
Other H5AD-reader:
readH5ADObsNames()
,
readH5ADUnsSpMat()
,
readVelocytoLoom()
Examples
## Not run:
h5adFile <- "path/to/analysis.h5ad"
cluster <- readH5ADObsVar(h5adFile, "leiden")
## End(Not run)
[Package CytoSimplex version 0.2.0 Index]