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 or use a virtual Linux environment. Alternatively, you can perform lots of analyses online (MMTB).

While the project has been discontinued, we observe slightly better performance with CVXMOD than with CVXPY, when using Python 2.7. The CVXMOD 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 for Python 2. Alternatively, you can download it here.

Prerequisites

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

  • Python 3 (recommended) or Python 2.7
  • NumPy
  • OpenOpt
  • Swiglpk
  • PyMathProg v1.0
  • CVXOPT
  • CVXPY or CVXMOD (Python 2.7)

Installation instructions

Install all packages that can be installed automatically:

In OpenSUSE type in a Terminal window:

zypper install python3 python3-pip python3-numpy-devel gcc-c++

In Debian/Ubuntu type in a Terminal window:

apt-get install python3 python3-pip python3-numpy

Install metano

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

Build and install metano with all dependencies:

pip install 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 or downloaded here. To perform a flux balance analysis simply type

fba.py -r rea_sulfolobus.txt -p sce_sulfolobus.txt -o fba_sulfolobus.csv

in your bash shell.

The example folder contains the reaction file (rea_sulfolobus.txt) of the model of Sulfolobus solfataricus (Stark et al, 2017) and the corresponding parameter file for a glucose scenario (sce_sulfolobus.txt) in metano format. Furthermore, we provide a precomputed solution calculated by the FBA implementation of metano (fba_sulfolobus.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_*.tar.gz file.
  • 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):
    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
    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
    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):
    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.