moscot.base.problems.BirthDeathProblem#

class moscot.base.problems.BirthDeathProblem(*args, **kwargs)[source]#

OT problem used to estimate the marginals with the birth-death process.

Parameters:

Methods

estimate_marginals(adata, 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.

load(path)

Load the model from a file.

prepare(xy, x, y[, a, b])

Prepare the OT problem.

pull([data, subset, normalize, split_mass, ...])

Pull data through the transport_matrix.

push([data, subset, normalize, split_mass, ...])

Push data through the transport_matrix.

save(path[, overwrite])

Save the problem to a file.

score_genes_for_marginals([...])

Compute gene scores to obtain prior knowledge about proliferation and apoptosis.

set_graph_x(data[, cost, t])

Set a graph for the source quadratic term.

set_graph_xy(data[, cost, t])

Set a graph for the linear term for graph based distances.

set_graph_y(data[, cost, t])

Set a graph for the target quadratic term.

set_solution(solution, *[, overwrite])

Set a solution to the OT problem.

set_x(data, tag)

Set a cost/kernel matrix for the source quadratic term.

set_xy(data, tag)

Set a cost/kernel matrix for the linear term.

set_y(data, tag)

Set a cost/kernel matrix for the target quadratic term.

solve([backend, device])

Solve the OT problem.

Attributes

a

Source marginals.

adata

Annotated data object.

adata_src

Source annotated data object.

adata_tgt

Target annotated data object.

apoptosis_key

Key in obs where cell apoptosis is stored.

b

Target marginals.

delta

Time difference between the source and the target.

posterior_growth_rates

Posterior estimate of the source growth rates.

prior_growth_rates

Prior estimate of the source growth rates.

problem_kind

Kind of the underlying problem.

proliferation_key

Key in obs where cell proliferation is stored.

shape

Shape of the OT problem.

solution

Solution of the OT problem.

solver

OT solver.

stage

Problem stage.

x

Geometry defining the source quadratic term.

xy

Geometry defining the linear term.

y

Geometry defining the target quadratic term.