moscot.problems.space.AlignmentProblem#

class moscot.problems.space.AlignmentProblem(adata, **kwargs)[source]#

Class for aligning spatial omics data, based on [Zeira et al., 2022].

Parameters:

Methods

add_problem(key, problem, *[, overwrite])

Add a subproblem.

align([reference, mode, spatial_key, key_added])

Align the spatial data.

annotation_mapping(mapping_mode, ...[, ...])

Transfer annotations between distributions.

cell_transition(source, target[, ...])

Aggregate the transport matrix.

compute_entropy(source, target[, forward, ...])

Compute the conditional entropy per cell.

compute_feature_correlation(obs_key[, ...])

Compute correlation of push-forward or pull-back distribution with features.

load(path)

Load the model from a file.

prepare(batch_key[, spatial_key, ...])

Prepare the alignment problem problem.

pull(*args, **kwargs)

Pull mass from target to source.

push(*args, **kwargs)

Push mass from source to target.

remove_problem(key)

Remove a subproblem.

save(path[, overwrite])

Save the problem to a file.

solve([alpha, epsilon, tau_a, tau_b, rank, ...])

Solve the alignment problem.

Attributes

adata

Annotated data object.

batch_key

Batch key in obs.

problem_kind

Kind of the underlying problem.

problems

OT subproblems that define the biological problem.

solutions

Solutions to the problems.

spatial_key

Spatial key in obsm.

stage

Problem stage.