BirthDeathProblem.estimate_marginals(adata, source, proliferation_key=None, apoptosis_key=None, scaling=None, **kwargs)[source]#

Estimate the source or target marginals based on marker genes, either with the birth-death process, as suggested in [Schiebinger et al., 2019], or with an exponential kernel.

See score_genes_for_marginals() on how to compute the proliferation and apoptosis scores.

  • adata (AnnData) – Annotated data object.

  • source (bool) – Whether to estimate the source or the target marginals.

  • proliferation_key (Optional[str]) – Key in obs where proliferation scores are stored.

  • apoptosis_key (Optional[str]) – Key in obs where apoptosis scores are stored.

  • scaling (Optional[float]) – A parameter for prior growth rate estimation. If float is passed, it will be used as a scaling parameter in an exponential kernel with proliferation and apoptosis scores. If None, parameters corresponding to the birth and death processes will be used.

  • kwargs (Any) – Keyword arguments for beta() and delta().

Return type:

ndarray[Any, dtype[float64]]


: The estimated source or target marginals of shape [n,] or [m,], depending on the source. If source = True, also updates the following fields: