Installation of metano

n is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.

n has been designed to work in any Linux environment. For the time being, installation instructions are only given for Debian/Ubuntu and openSUSE distributions, but anyone experienced with installing software on Linux systems should easily be able to adapt these instructions to other Linux distributions.
If you intend to use n on a Windows OS, please run it as a Docker container instead.

While the project has been discontinued, we observe slightly better performance with CVXMOD than with CVXPY. This module was created by Mattingley & Boyd. (originally downloaded from http://cvxmod.net – website no longer available) and it is provided with metano and will be automatically installed via pip. Alternatively, you can download it here.

Prerequisites

n requires the following packages. See below for installation instructions.

  • Python 2.7 including dev-packages
  • NumPy
  • OpenOpt
  • Swiglpk
  • PyMathProg v1.0
  • CVXOPT before v1.1.9
  • CVXMOD and/or CVXPY
The following packages can be installed for extra features:
  • lpsolve 5.5 including dev-package, an additional Linear Program solver
  • lpsolve Python driver
  • gfortran for installing ALGENCAN
  • ALGENCAN (tested with v2.3.1), an NLP solver
  • an MPI implementation, such as MPICH2 and
  • mpi4py for parallelization in knockout analysis

Installation instructions

Install all packages that can be installed automatically:

In OpenSUSE type in a Terminal window:

sudo zypper install python-devel python-pip python-numpy-devel gcc-c++

In Debian/Ubuntu type in a Terminal window:

sudo apt-get install python-dev python-pip python-numpy liblapack-dev  

Install metano

n was released on PyPI in January 2017. You can download it and install all dependencies manually or you can follow the instructions to install it via pip:

Update pip:

sudo pip install -U pip

Build and install metano:

sudo pip install -U metano

You can verify the installation success by typing

import metano

in the Python shell. Installation was successful if there is no error message.

Example model

You can test your metano installation with the example model which can be found in the metano installation folder at /src/example. To perform a flux balance analysis simply type

sh fba.sh

in your bash shell.

The example folder contains the reaction file (rea_Ecoli_iAF1260_bigg.txt) of the iAF1260 model of E. coli (Feist et al, 2007) and the corresponding parameter file for an aerobic glucose scenario (para_Ecoli_iAF1260_bigg.txt) in the metano format. Furthermore, we provide a precomputed solution calculated by the FBA implementation of metano (flux__Ecoli_iAF1260_bigg.txt).

Installation instructions for optional functionality

Installation of AMEBA

AMEBA is the optional addon of metano which allows metabolic branch point analysis and flux visualization. The Installation instructions can be found on the AMEBA page.


Note: The following optional installation instructions were not tested since the first release of n. We can not guarantee the functionality of neither the installation process nor the compatibility with n.

[Optional] Install Python driver for lpsolve55

  • Download the appropriate lp_solve_5.5.xx.yy._Python_source.tar.gz file. Alternatively, you can use this preconfigured version.
  • Extract the archive to a temporary folder, e.g. ~/software
  • Change to the temporary folder where you stored the archive’s contents
  • Change to lp_solve_5.5/extra/Python by typing
    cd lp_solve_5.5/extra/Python
  • If you are not using the preconfigured version, you may have to modify setup.py and possibly other files at this point.
  • Build and install (as superuser):
    sudo python setup.py install
  • On some systems, it may be necessary to manually put a link to liblpsolve55.so in /usr/lib, e.g. by typing
    sudo ln -s /usr/lib/lp_solve/liblpsolve55.so /usr/lib
    if the lpsolve55 library is installed in /usr/lib/lp_solve.
  • You can verify the installation success by typing
    import lpsolve55
    in the Python shell. Installation was successful if there is no error message.

[Optional] Install ALGENCAN

  • Download source package and extract the archive to a temporary folder, e.g. ~/software
  • Change to the temporary folder where you stored the archive’s contents
  • You may have to modify Makefile and possibly other files at this point. (adjust PYTHONINC and PYTHONLIB variables for your version of Python)
  • Build ALGENCAN with Python interface:
    make algencan-py
  • This will create the files pywrapper.so and algencan.py in subfolder bin/py.
  • Either move these two files to a directory that is in the PYTHONPATH or add the directory to the PYTHONPATH, e.g. by adding the line export PYTHONPATH=$PYTHONPATH:<install folder>/bin/py to ~/.bashrc

[Optional] Install mpi4py

  • Make sure that you have an MPI implementation installed. For instance, under Debian/Ubuntu, MPICH2 can be installed by typing
    sudo apt-get install mpich2
    in a Terminal window. Under OpenSUSE, MPICH2 can be downloaded from http://www.mcs.anl.gov/research/projects/mpich2staging/goodell/downloads/index.php?s=downloads.
  • Download source package and extract the archive to a temporary folder, e.g. ~/software
  • Change to the temporary folder where you stored the archive’s contents
  • You may have to modify mpi.cfg at this point to set the specific paths of your MPI installation.
  • Build and install (as superuser):
    sudo python setup.py install
  • You can verify the installation success by typing
    import mpi4py
    in the Python shell. Installation was successful if there is no error message.