anndata.AnnData.layers

property AnnData.layers

Dictionary-like object with values of the same dimensions as X.

Layers in AnnData are inspired by loompy’s Layers.

Return the layer named "unspliced":

adata.layers["unspliced"]

Create or replace the "spliced" layer:

adata.layers["spliced"] = ...

Assign the 10th column of layer "spliced" to the variable a:

a = adata.layers["spliced"][:, 10]

Delete the "spliced" layer:

del adata.layers["spliced"]

Return layers’ names:

adata.layers.keys()
Return type

LayersBaseLayersBase