Python Jupyter Notebook JavaScript HTML Shell Ruby
Latest commit a47c5fd Feb 24, 2017 @bgyori bgyori committed on GitHub Merge pull request #174 from bgyori/json_stmts
New JSON serialization
Failed to load latest commit information.
bioentities @ e0c7b78 Update resources Feb 3, 2017
data Add RAS pathway proteins as data file Feb 5, 2017
models Squashed commit of the following: Feb 15, 2017
.gitignore Add some extensions to gitignore Jan 31, 2017
.gitmodules Change submodule from ssh to https to fix Travis build Aug 31, 2016
.travis.yml Set verbose travis Jan 31, 2017
LICENSE License and readme update Aug 7, 2015 Prepare for new INDRA release Oct 14, 2016 Add more details on installation and dependencies Feb 8, 2017
setup.cfg Update version Apr 7, 2016

Build Status Documentation Status


INDRA (Integrated Network and Dynamical Reasoning Assembler) generates executable models of pathway dynamics from natural language (using the TRIPS and REACH parsers), and BioPAX and BEL sources (including the Pathway Commons database and NDEx.


Documentation is available at

Installing INDRA

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+

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

$ git clone
$ cd indra
$ pip install .

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

$ git clone
$ cd indra
$ python 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 (e.g. rdflib, requests, pysb). These packages are installed by either setup method (using pip or running install). For certain modules and use cases, other dependencies may be needed, which are described in detail in the documentation.


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

from indra.assemblers import PysbAssembler
from indra import trips
pa = PysbAssembler()
# Process a natural language description of a mechanism
trips_processor = trips.process_text('MEK2 phosphorylates ERK1 at Thr-202 and Tyr-204')
# Collect extracted mechanisms in PysbAssembler
# Assemble the model
model = pa.make_model(policies='two_step')

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

from indra import reach
# Process the neighborhood of BRAF and MAP2K1
reach_processor = reach.process_pmc('3717945')
# At this point, reach_processor.statements contains a list of INDRA statements
# extracted 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.

from indra import reach
from indra.literature import pubmed_client
# Search for 10 most recent abstracts in PubMed on 'BRAF'
pmids = pubmed_client.get_ids('BRAF', retmax=10)
all_statements = []
for 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
# At this point, the all_statements list contains all the statements
# extracted 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.

from indra import bel
# Process the neighborhood of BRAF and MAP2K1
bel_processor = bel.process_ndex_neighborhood(['BRAF', 'MAP2K1'])
# At this point, bel_processor.statements contains a list of INDRA statements
# extracted 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.

from indra import biopax
# Process the neighborhood of BRAF and MAP2K1
biopax_processor = biopax.process_pc_pathsfromto(['BRAF', 'RAF1'], ['MAP2K1', 'MAP2K2'])
# Query the resulting BioPAX object model for phosphorylation
# At this point, biopax_processor.statements contains a list of INDRA 
# Phosphorylation statements extracted from the paths-from-to query.