pertpy.metadata.Moa¶
Methods table¶
Methods¶
annotate¶
- Moa.annotate(adata, query_id='perturbation', target=None, verbosity=5, copy=False)[source]¶
Annotate cells affected by perturbations by mechanism of action.
For each cell, we fetch the mechanism of action and molecular targets of the compounds sourced from clue.io.
- Parameters:
adata (
AnnData
) – The data object to annotate.query_id (
str
) – The column of .obs with the name of a perturbagen. Defaults to ‘perturbation’.target (
str
|None
) – The column of .obs with target information. If set to None, all MoAs are retrieved without comparing molecular targets. Defaults to None.verbosity (
int
|str
) – The number of unmatched identifiers to print, can be either non-negative values or ‘all’. Defaults to 5.copy (
bool
) – Determines whether a copy of the adata is returned. Defaults to False.
- Return type:
- Returns:
Returns an AnnData object with MoA annotation.
lookup¶
- Moa.lookup()[source]¶
Generate LookUp object for Moa metadata.
The LookUp object provides an overview of the metadata to annotate. annotate_moa function has a corresponding lookup function in the LookUp object, where users can search the query_ids and targets in the metadata.
- Return type:
LookUp
- Returns:
Returns a LookUp object specific for MoA annotation.