mira.tl.get_chromatin_differential#
- mira.tl.get_chromatin_differential(adata, *, add_layer='chromatin_differential', sparse=True)#
The per-cell difference in predictions between LITE and NITE models of gene is called “chromatin differential”, and reflects the over or under- estimation of expression levels by local chromatin. Positive chromatin differential means local chromatin over-estimates expression in that cell, negative chromatin differential means lcoal chromatin under-estimates expression.
- Parameters
- adataanndata.AnnData
Adata of expression features per cell. This data must first be annotated with “LITE_prediction” and “NITE_prediction” using LITE and NITE RP models’ predict function.
- Returns
- adataanndata.AnnData
- .layers[“chromatin_differential”]scipy.spmatrix of shape (n_cells, n_genes)
Chromatin differential matrix. Genes that were not modeled are left empty.
- Raises
- KeyErrorif adata is missing “LITE_prediction” or “NITE_prediction”.
Examples
>>> rp_args = dict(expr_adata = atac_data, expr_adata = rna_data) >>> litemodel.predict(**rp_args) >>> nitemodel.predict(**rp_args) >>> mira.tl.get_chromatin_differential(rna_data)