GNBR (indra.sources.gnbr)

This module extracts INDRA Statements from the Global Network of Biomedical Relationships resource

GNBR API (indra.sources.gnbr.api)

indra.sources.gnbr.api.process_chemical_disease(part1_path, part2_path, indicator_only=True)[source]

Process chemical–disease interactions.

Parameters
  • part1_path (str) – Path to the first dataset which contains dependency paths and themes.

  • part2_path (str) – Path to the second dataset which contains dependency paths and entity pairs.

  • indicator_only (bool) – A switch to filter the data which is part of the flagship path set for each theme.

Return type

GnbrProcessor

Returns

A GnbrProcessor object which contains a list of extracted INDRA Statements in its statements attribute.

indra.sources.gnbr.api.process_chemical_disease_from_web(indicator_only=True)[source]

Call process_chemical_disease function on the GNBR datasets.

Parameters

indicator_only (bool) – A switch to filter the data which is part of the flagship path set for each theme.

Return type

GnbrProcessor

Returns

A GnbrProcessor object which contains a list of extracted INDRA Statements in its statements attribute.

indra.sources.gnbr.api.process_chemical_gene(part1_path, part2_path, indicator_only=True)[source]

Process chemical–gene interactions.

Parameters
  • part1_path (str) – Path to the first dataset of dependency paths and themes.

  • part2_path (str) – Path to the second dataset of dependency paths and entity pairs.

  • indicator_only (bool) – A switch to filter the data which is part of the flagship path set for each theme.

Return type

GnbrProcessor

Returns

A GnbrProcessor object which contains a list of extracted INDRA Statements in its statements attribute.

indra.sources.gnbr.api.process_chemical_gene_from_web(indicator_only=True)[source]

Call process_chemical_gene function on the GNBR datasets.

Parameters

indicator_only (bool) – A switch to filter the data which is part of the flagship path set for each theme.

Return type

GnbrProcessor

Returns

A GnbrProcessor object which contains a list of extracted INDRA Statements in its statements attribute.

indra.sources.gnbr.api.process_from_files(part1_path, part2_path, first_type, second_type, indicator_only=True)[source]

Loading the databases from the given files.

Parameters
  • part1_path (str) – Path to the first dataset which contains dependency paths and themes.

  • part2_path (str) – Path to the second dataset which contains dependency paths and themes.

  • first_type (str) – Type of the first agent.

  • second_type (str) – Type of the second agent.

  • indicator_only (bool) – A switch to filter the data which is part of the flagship path set for each theme.

Return type

GnbrProcessor

Returns

A GnbrProcessor object which contains a list of extracted INDRA Statements in its statements attribute.

indra.sources.gnbr.api.process_from_web(first_type, second_type, indicator_only=True)[source]

Loading the databases from the given urls.

Parameters
  • first_type – Type of the first agent.

  • second_type – Type of the second agent.

  • indicator_only (bool) – A switch to filter the data which is part of the flagship path set for each theme.

Return type

GnbrProcessor

Returns

A GnbrProcessor object which contains a list of extracted INDRA Statements in its statements attribute.

indra.sources.gnbr.api.process_gene_disease(part1_path, part2_path, indicator_only=True)[source]

Process gene–disease interactions.

Parameters
  • part1_path (str) – Path to the first dataset which contains dependency paths and themes.

  • part2_path (str) – Path to the second dataset which contains dependency paths and entity pairs.

  • indicator_only (bool) – A switch to filter the data which is part of the flagship path set for each theme.

Return type

GnbrProcessor

Returns

A GnbrProcessor object which contains a list of extracted INDRA Statements in its statements attribute.

indra.sources.gnbr.api.process_gene_disease_from_web(indicator_only=True)[source]

Call process_gene_disease function on the GNBR datasets.

Parameters

indicator_only (bool) – A switch to filter the data which is part of the flagship path set for each theme.

Return type

GnbrProcessor

Returns

A GnbrProcessor object which contains a list of extracted INDRA Statements in its statements attribute.

indra.sources.gnbr.api.process_gene_gene(part1_path, part2_path, indicator_only=True)[source]

Process gene–gene interactions.

Parameters
  • part1_path (str) – Path to the first dataset which contains dependency paths and themes.

  • part2_path (str) – Path to the second dataset which contains dependency paths and entity pairs.

  • indicator_only (bool) – A switch to filter the data which is part of the flagship path set for each theme.

Return type

GnbrProcessor

Returns

A GnbrProcessor object which contains a list of extracted INDRA Statements in its statements attribute.

indra.sources.gnbr.api.process_gene_gene_from_web(indicator_only=True)[source]

Call process_gene_gene function on the GNBR datasets.

Parameters

indicator_only (bool) – A switch to filter the data which is part of the flagship path set for each theme.

Return type

GnbrProcessor

Returns

A GnbrProcessor object which contains a list of extracted INDRA Statements in its statements attribute.

GNBR Processor (indra.sources.gnbr.processor)

This module contains the processor for GNBR. There are several, each corresponding to different kinds of interactions.

class indra.sources.gnbr.processor.GnbrProcessor(df1, df2, first_type, second_type, indicator_only=True)[source]

A processor for interactions in the GNBR dataset.

Parameters
  • df1 (DataFrame) – Dataframe of dependency paths and themes.

  • df2 (DataFrame) – Dataframe of dependency paths and agents.

  • first_type (str) – The type of the first entity in the data frame.

  • second_type (str) – The type of the second entity in the data frame.

extract_stmts()[source]

Extend the statements list with mappings.

indra.sources.gnbr.processor.get_evidence(row)[source]

Return evidence for a Statement.

Parameters

row (Series) – Currently investigated row of the dataframe.

Return type

Evidence

Returns

Evidence object with the source_api, the PMID and the original sentence.

indra.sources.gnbr.processor.get_std_chemical(raw_string, db_id)[source]

Standardize chemical names.

Parameters
  • raw_string (str) – Name of the agent in the GNBR dataset.

  • db_id (str) – Entrez identifier of the agent.

Return type

List[Agent]

Returns

A standardized Agent object.

indra.sources.gnbr.processor.get_std_disease(raw_string, db_id)[source]

Standardize disease names.

Parameters
  • raw_string (str) – Name of the agent in the GNBR dataset.

  • db_id (str) – Entrez identifier of the agent.

Return type

List[Agent]

Returns

A standardized Agent object.

indra.sources.gnbr.processor.get_std_gene(raw_string, db_id)[source]

Standardize gene names.

Parameters
  • raw_string (str) – Name of the agent in the GNBR dataset.

  • db_id (str) – Entrez identifier of the agent.

Return type

List[Agent]

Returns

A standardized Agent object.