moscot.utils.subset_policy.SequentialPolicy#

class moscot.utils.subset_policy.SequentialPolicy(adata, key=None, verify_integrity=True)[source]#

Policy which connects immediate successors.

Parameters:
  • adata (Union[AnnData, Series, Categorical]) – Annotated data object.

  • upper – Whether to use subsequent nodes instead of the preceding ones.

  • kwargs – Additional keyword arguments.

  • key (str | None) –

  • verify_integrity (bool) –

Methods

add_node(node[, only_existing])

Add a node to the policy graph.

create_graph(**kwargs)

Create a policy graph.

create_mask(value, *[, allow_empty])

Create a mask used to subset the data.

create_masks([discard_empty])

Create masks based on the policy graph.

plan([filter, explicit_steps])

Compute a sequence of steps based on the policy graph.

remove_node(node)

Remove a node from the policy graph.

reverse()

Reverse the policy.

Attributes

key

Key in obs defining the policy.