harreman.preprocessing.extract_interaction_db

harreman.preprocessing.extract_interaction_db#

harreman.preprocessing.extract_interaction_db(adata, use_raw=False, species=None, database=None, extracellular_only=True, verbose=False)[source]#

Extract the metabolite transporter or ligand-receptor (LR) database from .csv files.

Parameters:
  • adata (AnnData) – AnnData object to compute database for.

  • use_raw (bool (default: False)) – Whether to use adata.raw.X for database computation.

  • species (Optional[Literal['mouse', 'human']] (default: None)) – Species identity to select the LR database from CellChatDB.

  • database (Optional[Literal['transporter', 'LR', 'both']] (default: None)) – Whether to use the transporter database, the LR database, or both.

  • extracellular_only (Optional[bool] (default: True)) – Whether to restrict the communication inference to extracellular metabolites.

  • verbose (Optional[bool] (default: False)) – Whether to print progress and status messages.

Return type:

Genes by metabolites (or LRs) dataframe. Index is aligned to genes from adata.