snapatac2.AnnDataSet#
- class snapatac2.AnnDataSet(adatas, *, filename, add_key='sample', backend=None)#
Similar to
AnnData
,AnnDataSet
contains annotations of observationsobs
(obsm
,obsp
), variablesvar
(varm
,varp
), and unstructured annotationsuns
. Additionally it provides lazy access to concatenated component AnnData objects, includingX
,obs
,obsm
,obsp
.- Parameters:
adatas (list[(str, Path)] | list[(str, AnnData)]) – List of key and file name (or backed AnnData object) pairs.
filename (Path) – File name of the output file containing the AnnDataSet object.
add_key (str) – The column name in obs to store the keys
backend (str) – The backend to use for the AnnDataSet object.
Note
AnnDataSet does not copy underlying AnnData objects. It stores the references to individual anndata files. If you move the anndata files to a new location, remember to update the anndata file locations when opening an AnnDataSet object.
See also
Attributes
Data matrix of shape n_obs × n_vars.
View into the component AnnData objects.
Whether the AnnDataSet object is backed.
Number of observations.
Number of variables/features.
Observation annotations.
Names of observations.
Shape of data matrix (
n_obs
,n_vars
).Unstructured annotation (ordered dictionary).
Variable annotations.
Names of variables.
Methods
chunked_X
([chunk_size])- type chunk_size:
close
()Close the AnnDataSet object.
If the AnnDataSet object has been closed.
obs_ix
(names)subset
([obs_indices, var_indices, out, backend])Subsetting the AnnDataSet object.
to_adata
([obs_indices, var_indices, copy_x, ...])Convert AnnDataSet to AnnData object.
var_ix
(names)