Geneways (indra.sources.geneways)

Geneways API (indra.sources.geneways.api)

This module provides a simplified API for invoking the Geneways input processor , which converts extracted information collected with Geneways into INDRA statements.

See publication: Rzhetsky, Andrey, Ivan Iossifov, Tomohiro Koike, Michael Krauthammer, Pauline Kra, Mitzi Morris, Hong Yu et al. “GeneWays: a system for extracting, analyzing, visualizing, and integrating molecular pathway data.” Journal of biomedical informatics 37, no. 1 (2004): 43-53.

indra.sources.geneways.api.process_geneways_files(input_folder='/home/docs/checkouts/readthedocs.org/user_builds/indra/checkouts/latest/indra/sources/geneways/../../../data', get_evidence=True)[source]

Reads in Geneways data and returns a list of statements.

Parameters:
  • input_folder (Optional[str]) – A folder in which to search for Geneways data. Looks for these Geneways extraction data files: human_action.txt, human_actionmention.txt, human_symbols.txt. Omit this parameter to use the default input folder which is indra/data.
  • get_evidence (Optional[bool]) – Attempt to find the evidence text for an extraction by downloading the corresponding text content and searching for the given offset in the text to get the evidence sentence. Default: True
Returns:

gp – A GenewaysProcessor object which contains a list of INDRA statements generated from the Geneways action mentions.

Return type:

GenewaysProcessor

Geneways Processor (indra.sources.geneways.processor)

This module provides an input processor for information extracted using the Geneways software suite, converting extraction data in Geneways format into INDRA statements.

See publication: Rzhetsky, Andrey, Ivan Iossifov, Tomohiro Koike, Michael Krauthammer, Pauline Kra, Mitzi Morris, Hong Yu et al. “GeneWays: a system for extracting, analyzing, visualizing, and integrating molecular pathway data.” Journal of biomedical informatics 37, no. 1 (2004): 43-53.

class indra.sources.geneways.processor.GenewaysProcessor(search_path, get_evidence=True)[source]

The GenewaysProcessors converts extracted Geneways action mentions into INDRA statements.

Parameters:search_path (list[str]) – A list of directories in which to search for Geneways data
statements

list[indra.statements.Statement] – A list of INDRA statements converted from Geneways action mentions, populated by calling the constructor

make_statement(action, mention)[source]

Makes an INDRA statement from a Geneways action and action mention.

Parameters:
  • action (GenewaysAction) – The mechanism that the Geneways mention maps to. Note that several text mentions can correspond to the same action if they are referring to the same relationship - there may be multiple Geneways action mentions corresponding to each action.
  • mention (GenewaysActionMention) – The Geneways action mention object corresponding to a single mention of a mechanism in a specific text. We make a new INDRA statement corresponding to each action mention.
Returns:

statement – An INDRA statement corresponding to the provided Geneways action mention, or None if the action mention’s type does not map onto any INDRA statement type in geneways_action_type_mapper.

Return type:

indra.statements.Statement

indra.sources.geneways.processor.geneways_action_to_indra_statement_type(actiontype, plo)[source]

Return INDRA Statement corresponding to Geneways action type.

Parameters:
  • actiontype (str) – The verb extracted by the Geneways processor
  • plo (str) – A one character string designating whether Geneways classifies this verb as a physical, logical, or other interaction
Returns:

If there is no mapping to INDRA statements from this action type the return value is None. If there is such a mapping, statement_generator is an anonymous function that takes in the subject agent, object agent, and evidence, in that order, and returns an INDRA statement object.

Return type:

statement_generator