1. Installation

The following is a brief guide to installing the ObjTables Python API and command line program. The Dockerfile in the ObjTables Git repository contains detailed instructions for how to install ObjTables in Ubuntu Linux.

1.1. Prerequisites

First, install the following third-party packages:

  • ChemAxon Marvin (optional): to calculate major protonation and tautomerization states

  • Git (optional): to revision schemas and datasets

  • Graphviz (optional): to generate UML diagrams of schemas

  • Open Babel (optional): to represent and validate chemical structures

  • Pip >= 18.0

  • Python >= 3.6

  • SSH (optional): to use Git with SSH to revision schemas and datasets

To use ChemAxon Marvin, set JAVA_HOME to the path to your Java virtual machine (JVM) and add Marvin to the Java class path:

export JAVA_HOME=/usr/lib/jvm/default-java
export CLASSPATH=$CLASSPATH:/opt/chemaxon/marvinsuite/lib/MarvinBeans.jar

1.2. Installing the latest release from PyPI

Second, we recommend that users run the following command to install the latest release of ObjTables from PyPI:

pip install obj_tables

1.3. Installing the latest revision from GitHub

We recommend that developers use the following commands to install the latest revision of ObjTables and its dependencies from GitHub:

pip install git+https://github.com/KarrLab/pkg_utils.git#egg=pkg_utils
pip install git+https://github.com/KarrLab/wc_utils.git#egg=wc_utils[chem]
pip install git+https://github.com/KarrLab/bpforms.git#egg=bpforms
pip install git+https://github.com/KarrLab/bcforms.git#egg=bcforms
pip install git+https://github.com/KarrLab/obj_tables.git#egg=obj_tables

1.4. Installing the optional features

ObjTables includes several optional features:

  • bio: Biology attributes for sequences, sequence features, and frequency position matrices (obj_tables.bio)

  • chem: Chemistry attributes for chemical formulas and structures (obj_tables.chem)

  • grammar: Encoding/decoding objects and their relationships into and out of individual cells in tables (obj_tables.grammary)

  • math: Mathematics attributes for arrays, tables, and symbolic expressions (obj_tables.math)

  • web: Web service (obj_tables.web_service)

  • revisioning: Revisioning schemas and data sets with Git (obj_tables.migrate)

  • sci: Science attributes for units, quantities, uncertainty, ontology terms, and references (obj_tables.sci)

  • viz: Methods to generate UML diagrams of schemas (obj_tables.utils.viz_schema())

These features can be installed by installing ObjTables with the desired options. For example, the bio and chem features can installed by running one of the following commands:

pip install obj_tables[bio,chem]
pip install git+https://github.com/KarrLab/obj_tables.git#egg=obj_tables[bio,chem]

1.5. Configuring access to GitHub

To use the revisioning and migration features, developers must configure ObjTables to access GitHub.

  • Install the revisioning features by running pip install obj_tables[revisioning].

  • Generate an API token for GitHub.

  • Create the directory ~/.wc/ (Ubuntu: /home/<username>/.wc, Windows: c:\Users\<username>\.wc\).

  • Create the file ~./wc/wc_utils.cfg with the following content:

            github_api_token = <GitHub API token>
  • Follow these steps to configure SSH access GitHub:

    • Follow these instructions to generate an SSH key and add it to your GitHub account

    • Create the file ~/.gitconfig (Ubuntu: /home/<username>/.gitconfig, Windows: c:\Users\<username>\.gitconfig\) with the following content:

      [url "ssh://git@github.com/"]
          insteadOf = https://github.com/