mira.tl.get_NITE_score_genes#

mira.tl.get_NITE_score_genes(adata, counts_layer=None, median_nonzero_expression=None)#

Calculates the NITE score (Non-locally Influence Transcriptional Expression) for each gene. The NITE score quantifies how well changes in local chromatin accessibility explain changes in gene expression.

Parameters
adataanndata.AnnData

Adata of expression features per cell. This data must first be annotated with “LITE_logp” and “NITE_logp” using LITE and NITE RP models’ get_logp function.

median_nonzero_expressionint > 0 or None, default = None

The NITE score is normalized for nonzero counts per gene, which means the test is dependent on the genome-wide distribution of nonzero counts per gene. If you are not testing a large quantity of genes simultaneously, then the median of the distribution of nonzero counts will be noisy. You may provide your own value for the median number of nonzero counts per cell in this instance.

Returns
adataanndata.AnnData
.var[“NITE_score”]np.ndarray[float] of shape (n_genes,)

Gene NITE score. Genes that were not tested will be assigned np.nan.

Raises
KeyErrorif adata is missing “LITE_logp” or “NITE_logp”

Examples

>>> rp_args = dict(expr_adata = atac_data, expr_adata = rna_data)
>>> litemodel.predict(**rp_args)
>>> nitemodel.predict(**rp_args)
>>> mira.tl.get_NITE_score_genes(rna_data)