AnnData-like live facade for a Daf object
AnnData-like live facade for a Daf object
Details
Wraps a Daf object and provides AnnData-compatible accessors ($X, $obs,
$var, $layers, $uns). This is a zero-copy live facade: reads are
lazy and go through to the underlying Daf data on demand.
The facade maps AnnData concepts to Daf data:
$X- the primary matrix (obs_axis x var_axis, named x_name)$obs- data frame of observation (obs_axis) vectors$var- data frame of variable (var_axis) vectors$layers- named list of additional matrices (obs_axis x var_axis)$uns- named list of scalars$obs_names- character vector of observation names$var_names- character vector of variable names$n_obs- number of observations$n_vars- number of variables$shape- c(n_obs, n_vars)
All reads are lazy and cached via dafr's caching system.
Public fields
dafThe underlying Daf object
obs_axisName of the observations axis
var_axisName of the variables axis
x_nameName of the primary matrix
Active bindings
XThe primary matrix (obs x var)
obsData frame of observation vectors
varData frame of variable vectors
layersNamed list of additional matrices (excluding X)
unsNamed list of scalars
obs_namesCharacter vector of observation names
var_namesCharacter vector of variable names
n_obsNumber of observations
n_varsNumber of variables
shapeDimensions c(n_obs, n_vars)
Methods
Method new()
Create a new DafAnnData facade
Usage
DafAnnData$new(daf, obs_axis = NULL, var_axis = NULL, x_name = "UMIs")