Drug Gene Interaction (DGI) Database (indra.sources.dgi)

A processor for the Drug Gene Interaction DB.

Interactions data from the January 2021 release can be obtained at the following URLs:

DGI API (indra.sources.dgi.api)

API for Drug Gene Interaction DB.

indra.sources.dgi.api.get_version_df(version=None)[source]

Get the latest version of the DGI interaction dataframe.

Return type

Tuple[str, DataFrame]

indra.sources.dgi.api.process_df(df, version=None, skip_databases=None)[source]

Get a processor that extracted INDRA Statements from DGI content based on the given dataframe.

Parameters
  • df (pd.DataFrame) – A pandas DataFrame for the DGI interactions file.

  • version (Optional[str]) – The optional version of DGI to use. If not given, statements will not be annotated with a version number.

  • skip_databases (Optional[set[str]]) – A set of primary database sources to skip. If not given, DrugBank is skipped since there is a dedicated module in INDRA for obtaining DrugBank statements.

Returns

dp – A DGI processor with pre-extracted INDRA statements

Return type

DGIProcessor

indra.sources.dgi.api.process_version(version=None, skip_databases=None)[source]

Get a processor that extracted INDRA Statements from DGI content.

Parameters
  • version (Optional[str]) – The optional version of DGI to use. If not given, the version is automatically looked up.

  • skip_databases (Optional[set[str]]) – A set of primary database sources to skip. If not given, DrugBank is skipped since there is a dedicated module in INDRA for obtaining DrugBank statements.

Returns

dp – A DGI processor with pre-extracted INDRA statements

Return type

DGIProcessor

DGI Processor (indra.sources.dgi.processor)

Processor for the Drug Gene Interaction DB.

class indra.sources.dgi.processor.DGIProcessor(df=None, version=None, skip_databases=None)[source]

Processor to extract INDRA Statements from DGI content.

Parameters
  • df (pd.DataFrame) – A pandas DataFrame for the DGI interactions file. If none given, the most recent version will be automatically looked up.

  • version (str) – The optional version of DGI to use. If no df is given, this is also automatically looked up.

extract_statements()[source]

Extract statements from DGI.

Return type

List[Statement]

row_to_statements(gene_name, ncbigene_id, source, interactions, drug_name, drug_curie, pmids)[source]

Convert a row in the DGI dataframe to a statement.

Return type

Iterable[Statement]

statements: List[Statement]

A list of INDRA Statements that were extracted from DGI content.