moscot.base.problems.BirthDeathProblem.estimate_marginals

BirthDeathProblem.estimate_marginals(adata, source, proliferation_key=None, apoptosis_key=None, scaling=None, beta_max=1.7, beta_min=0.3, beta_center=0.25, beta_width=0.5, delta_max=1.7, delta_min=0.3, delta_center=0.1, delta_width=0.2)[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.

Parameters:
  • 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.

  • beta_max (float) – Argument for beta()

  • beta_min (float) – Argument for beta()

  • beta_center (float) – Argument for beta()

  • beta_width (float) – Argument for beta()

  • delta_max (float) – Argument for delta()

  • delta_min (float) – Argument for delta()

  • delta_center (float) – Argument for delta()

  • delta_width (float) – Argument for delta()

Return type:

Union[ndarray[Any, dtype[floating]], Array]

Returns:

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

Examples