pertpy.metadata.Drug#

class pertpy.metadata.Drug[source]#

Utilities to fetch metadata for drug studies.

Methods table#

annotate(adata[, source, copy])

Annotates genes by their involvement in applied drugs.

lookup()

Generate LookUp object for Drug.

Methods#

annotate#

Drug.annotate(adata, source='chembl', copy=False)[source]#

Annotates genes by their involvement in applied drugs.

Genes need to be in HGNC format.

Parameters:
  • adata (AnnData) – AnnData object containing log-normalised data.

  • source (Literal['chembl', 'dgidb', 'pharmgkb']) – Source of the metadata, chembl, dgidb or pharmgkb. Defaults to chembl.

  • copy (bool) – Determines whether a copy of the adata is returned. Defaults to False.

Return type:

AnnData

Returns:

An AnnData object with a new column drug in the var slot.

lookup#

Drug.lookup()[source]#

Generate LookUp object for Drug.

The LookUp object provides an overview of the metadata to annotate. annotate function has a corresponding lookup function in the LookUp object, where users can search the compound and targets in the metadata.

Return type:

LookUp

Returns:

Returns a LookUp object specific for drug annotation.