moscot.base.problems.BirthDeathProblem

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

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

Notes

If source/target mask is specified, adata_src/adata_tgt will be a view.

Methods

estimate_marginals(adata, source[, ...])

load(path)

Load the model from a file.

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

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, solver_name, 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.

Parameters: