sorgerlab/indra

Name: indra

Owner: sorgerlab

Description: Integrated Network and Dynamical Reasoning Assembler

Created: 2014-08-11 17:44:05.0

Updated: 2017-12-17 07:14:53.0

Pushed: 2017-12-16 01:51:51.0

Homepage:

Size: 98323

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Build Status Documentation Status

INDRA

INDRA (Integrated Network and Dynamical Reasoning Assembler) is an automated model assembly system, originally developed for molecular systems biology and currently being generalized to other domains. INDRA draws on natural language processing systems and structured databases to collect mechanistic and causal assertions, represents them in a standardized form (INDRA Statements), and assembles them into various modeling formalisms including causal graphs and dynamical models. INDRA also provides knowledge assembly procedures that operate on INDRA Statements and correct certain errors, find and resolve redundancies, infer missing information, filter to a scope of interest and assess belief.

Knowledge sources

INDRA is currently integrated with the following natural language processing systems:

and can collect information from these databases:

These input modules (available in indra.sources) all produce INDRA Statements.

Output model assemblers

INDRA also provides several model output assemblers that take INDRA Statements as input. INDRA can assemble into the following modeling formalisms

Internal knowledge assembly

The internal assembly steps of INDRA are exposed in the indra.tools.assemble_corpus submodule. This submodule contains functions that take Statements as input and produce processed Statements as output. They can be composed to form an assembly pipeline connecting knowledge collected from sources with an output model.

INDRA also contains utility modules to access literature content (e.g. PubMed), ontological information (e.g. UniProt, HGNC), and other resources.

Citation

From word models to executable models of signal transduction using automated assembly, Molecular Systems Biology (2017)

Documentation

Documentation is available at http://indra.readthedocs.io.

Installation

For detailed installation instructions, see the documentation.

INDRA works with both Python 2 and 3 (tested with 2.7 and 3.5).

The preferred way to install INDRA is by pointing pip to the source repository as

$ pip install git+https://github.com/sorgerlab/indra.git

or by cloning the repository and then using pip to install the package as

$ git clone https://github.com/sorgerlab/indra.git
$ cd indra
$ pip install .

You can also install INDRA by cloning this repository and running setup.py as

$ git clone https://github.com/sorgerlab/indra.git
$ cd indra
$ python setup.py install

Releases of INDRA are also available on PyPI, you can install the latest release as

$ pip install indra

However, releases will usually be behind the latest code available in this repository.

INDRA depends on a few standard Python packages. These packages are installed by either setup method (using pip or running setup.py install). For certain modules and use cases, other dependencies may be needed, which are described in detail in the documentation.

Using INDRA

In this example INDRA assembles a PySB model from the natural language description of a mechanism via the TRIPS reading web service.

 indra.sources import trips
 indra.assemblers import PysbAssembler
 PysbAssembler()
ocess a natural language description of a mechanism
s_processor = trips.process_text('MEK2 phosphorylates ERK1 at Thr-202 and Tyr-204')
llect extracted mechanisms in PysbAssembler
dd_statements(trips_processor.statements)
semble the model
l = pa.make_model(policies='two_step')

INDRA also provides an interface for the REACH natural language processor. In this example, a full paper from PubMed Central is processed. The paper's PMC ID is PMC3717945.

 indra.sources import reach
ocess the neighborhood of BRAF and MAP2K1
h_processor = reach.process_pmc('3717945')
 this point, reach_processor.statements contains a list of INDRA statements
tracted from the PMC paper.

Next we look at an example of reading the 10 most recent PubMed abstracts on BRAF and collecting the results in INDRA statements.

 indra.sources import reach
 indra.literature import pubmed_client
arch for 10 most recent abstracts in PubMed on 'BRAF'
s = pubmed_client.get_ids('BRAF', retmax=10)
statements = []
pmid in pmids:
abs = pubmed_client.get_abstract(pmid)
if abs is not None:
    reach_processor = reach.process_text(abs)
    if reach_processor is not None:
        all_statements += reach_processor.statements
 this point, the all_statements list contains all the statements
tracted from the 10 abstracts.

The next example shows querying the BEL large corpus network through NDEx for a neighborhood of a given list of proteins using their HGNC gene names.

 indra.sources import bel
ocess the neighborhood of BRAF and MAP2K1
processor = bel.process_ndex_neighborhood(['BRAF', 'MAP2K1'])
 this point, bel_processor.statements contains a list of INDRA statements
tracted from the neihborhood query.

Next, we look at an example of querying the Pathway Commons database for paths between two lists of proteins. Note: see installation notes above for installing jnius, which is required for using the BioPAX API of INDRA.

 indra.sources import biopax
ocess the neighborhood of BRAF and MAP2K1
ax_processor = biopax.process_pc_pathsfromto(['BRAF', 'RAF1'], ['MAP2K1', 'MAP2K2'])
 this point, biopax_processor.statements contains a list of INDRA 
atements extracted from the paths-from-to query.

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.