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 inobswhere proliferation scores are stored.apoptosis_key (
Optional[str]) – Key inobswhere apoptosis scores are stored.scaling (
Optional[float]) – A parameter for prior growth rate estimation. Iffloatis passed, it will be used as a scaling parameter in an exponential kernel with proliferation and apoptosis scores. IfNone, parameters corresponding to the birth and death processes will be used.
- Return type:
- Returns:
: The estimated source or target marginals of shape
[n,]or[m,], depending on thesource. Ifsource = True, also updates the following fields:prior_growth_rates- prior estimate of the source growth rates.
Examples