Home
Tutorials
Concepts
Secondary Structure
FAQ
Commands
Python

Download
Installing
Examples
Contact

Online Submission

AMU Homepage

Installing



Supported platforms

ModeRNA runs on any modern Windows or UNIX system (including Mac OS X). There are two versions available:
  • Source code - full functionality, but requires some libraries.
  • Windows Binary - easy to install, but limited functionality.

Moreover, only the ModeRNA's source version allows to refine RNA models, therefore we encourge all users to install ModeRNA from source.

Using the installation instructions below, we have successfully run ModeRNA on Ubuntu (ver. >= 8.10), Mac OS X (Snow Leopard) and Microsoft Windows XP. However, the refinement procedure is only available on UNIX systems (we have tested it on Ubuntu (ver. >= 8.10) and Mac OS X (Snow Leopard)).


Dependencies

ModeRNA requires the following dependencies:

  • Python (>= 2.5)
  • BioPython (>= 1.4)
  • Numpy (>= 1.3)

RNA models generated with ModeRNA might require a refinement. ModeRNA source code contains a Python script for doing energy minimization of RNA structure. It requires the MMTK package, which relies on the following software:

  • Python Numeric (ver. == 23.8.2)
  • netCDF (ver. >= 4.0.1)
  • Python Scientific (ver. >= 2.9.0)

Important notice! Only Numeric in version 23.8.2 works with MMTK. In most cases, problems encountered when installing MMTK are related to having a different version of Numeric installed. See Installing MMTK (UNIX only) for more details.


Installing ModeRNA from source on Mac OS X

If you do not have BioPython and / or Numpy installed, you can install them using MacPorts (if you don't have MacPorts on your OS X, you can get them from the Mac Ports web page):

  • Install Numpy & BioPython (replace XX with 25 if you use Python 2.5 or 26 if you use Python 2.6):
    sudo port install pyXX-numpy
    sudo port install pyXX-biopython

You can obviously install Numpy and BioPython from source instead.

Once you've done that (or you've already had BioPython & Numpy installed), you can start using ModeRNA:

  1. Download and unpack the source distribution [Moderna Version 1.7.0 (source) - 14 MB].
  2. Make the main program of ModeRNA executable:
    chmod a+x ModeRNA/moderna/moderna.py
  3. There are two options for installing. You can either run the following command in the ModeRNA_source_X.X directory
    sudo python setup.py install
    which will put ModeRNA in Python site-packages, or you can add the path to a directory where you've extracted ModeRNA archive to your PYTHONPATH environment variable. Assuming you have ModeRNA_source_X.X folder in your home directory (e.g. /Users/your_name/), type:
    PYTHONPATH=$PYTHONPATH:/Users/your_name/ModeRNA_source_X.X/
    export PYTHONPATH

Adding MMTK support:

  1. If you want to have a shell script for running ModeRNA (moderna.py) and a script for running RNA energy minimization (refine_model_mmtk.py) available from any location on your Mac, modify ~/.profile file. If you've installed ModeRNA in site-packages and you're using Python 2.6, add to ~/.profile:
    PATH=$PATH:/opt/local/Library/Frameworks/Python.framework/\
    Versions/2.6/include/python2.6/moderna/:\
    /opt/local/Library/Frameworks/Python.framework/\
    Versions/2.6/include/python2.6/moderna/minimize/
    export PATH
    or if you use ModeRNA from moderna folder in your home directory (e.g. /Users/your_name/), add:
    PATH=$PATH:/Users/your_name/ModeRNA/moderna/:/Users/your_name/\
    ModeRNA/moderna/minimize/
    export PATH
    
  2. Write:
    source ~/.profile
  3. After this, you can from any location write:
    python
    
    >>> from moderna import *
    
  4. and also from terminal:
    moderna.py -h
    refine_model_mmtk.py -h
    
    although refine_model_mmtk.py will not work, unless you have MMTK installed (see Installing MMTK (UNIX only) for more details).

Installing ModeRNA from source on Ubuntu

To install ModeRNA on Ubuntu, you need to:

  1. Download the source distribution [Moderna Version 1.7.1 (source) - 14 MB].
  2. Unzip the archive. A directory with the main program moderna.py is created.
  3. Make sure Python 2.5 or a higher version is installed. Make sure you have in "System -> Administration -> Software Sources" checked option "Community-maintained Open Source Software (universe)". Then type in terminal:
    sudo apt-get install python
  4. Make sure Numpy and BioPython are installed
    sudo apt-get install python-numpy
    sudo apt-get install python-biopython
  5. Make the main program of ModeRNA executable:
    chmod a+x ModeRNA/moderna/moderna.py
  6. There are two options for installing. You can either run the following command in the ModeRNA directory
    sudo python setup.py install
    which will put ModeRNA in the Python site-packages folder (or dist-packages depending on the Ubuntu flavour), or you can add the path to a directory where you've extracted ModeRNA archive to your PYTHONPATH environment variable. Assuminig you have a ModeRNA folder in your home directory (e.g. /home/your_name/), type:
    PYTHONPATH=$PYTHONPATH:/home/your_name/ModeRNA
    export PYTHONPATH

Adding MMTK support:

  1. If you want to have a shell script for running ModeRNA (moderna.py) and a script for running RNA energy minimization (refine_model_mmtk.py) available from any location, modify ~/.bashrc file. If you've installed ModeRNA in site-packages (or dist-packages) and you're using Python 2.6, add to ~/.bashrc:
    PATH=$PATH:/usr/lib/python2.6/dist-packages/moderna/:\
    /usr/lib/python2.6/dist-packages/moderna/minimize/
    export PATH
    
    or if you use ModeRNA from moderna folder in your home directory (e.g. /home/your_name/), add:
    PATH=$PATH:/home/your_name/ModeRNA/moderna/:\
    /home/your_name/ModeRNA/moderna/minimize/
    export PATH
    
  2. Write:
    source ~/.bashrc
  3. After this, you can from any location write:
    python
    
    >>> from moderna import *
    
  4. and also from terminal:
    moderna.py -h
    refine_model_mmtk.py -h
    
    although refine_model_mmtk.py will not work, unless you have MMTK installed (see Installing MMTK (UNIX only) for more details).

Installing ModeRNA from source on Microsoft Windows XP

To install ModeRNA on Microsoft Windows XP, you need to:

  1. Download the source distribution [Moderna Version 1.7.1 (source)].
  2. Unzip the archive. A catalog with the main program moderna.py is created (it should be named ModeRNA.
  3. Make sure Python 2.5 or a higher version is installed. [download]
  4. Make sure Numpy is installed. [download].
  5. Make sure BioPython is installed. [download].
  6. Change an environment variable:
    Start -> Settings -> Control Panel -> System -> 
    Advanced -> Environment variables
    
    In the field Environment variables for user YOUR_NAME*, click **New, and next in the field Variable name type PYTHONPATH, and in the field Variable value type the full path to the directory with ModeRNA (e.g. C:\Moderna\). Don't add the moderna subdirectory there!)
  7. Add the path to the Python interpreter to the environment variable PATH, as the value C:\Python25. If there is something already, add a semicolon, and the new value then, e.g.: C:\somethingalreadythere\;C:\Python25\. Moreover, add C:\ModeRNA\moderna\, where C:\ModeRNA is a direcory where you've unpacked ModeRNA archive.
  8. After this, you can from any location write:
    python
    
    >>> from moderna import *
    
  9. and also:
    moderna.py -h
    

Using the Windows Binary

On Microsoft Windows XP all you need to do is:

  1. Download the latest binary [Moderna Version 1.7.0 (.exe) - 23MB].
  2. Unzip the archive.
  3. Add directory with moderna.exe to PATH environment vairable. Go to: Start -> Settings -> Control Panel -> System -> Advanced -> Environment variables. In Environment variables for user YOUR_NAME*, click **New (or Edit if this variable already exists - mulitple paths have to be separated with semicolon), and next in the field Variable name type PATH, and in the field Variable value type the full path to the directory with moderna.exe (e.g. C:\dir_with_moderna\moderna\;).
  4. If all goes well, you can from any location type
    moderna.exe -h
    to see available options.
  5. If it does not work: On some machines, it is necessary to install the C++ redistributable package.

Technical details

ModeRNA uses a number of other Python libraries, which are briefly covered in the following:
  • Time-critical calculations involving float values are done by the C-based NumPy library (not Numeric).
  • For parsing PDB files, superposition, and neighbor search, the PDB package from BioPython is used. In particular, the modules PDB parser, NeighborSearch, and Superimposer are imported. However, there are a few binary files that require compilation (e.g. KDTree), which is why the library cannot be delivered as source.

Installing MMTK (UNIX only)

Please follow the installation procedure exactly as shown below. If you already have Numeric, Python Scientific or NetCDF installed, please uninstall them before starting with the procedure described below.

  1. Download Numeric 23.8.2 - only this version of Numeric works with MMTK. Install it:
    sudo python setup.py install
    sudo sh makeclean.sh
    You should now be able to import Numeric in your Python shell:
    >>> import Numeric
  2. Download NetCDF. Configure it first:
    ./configure --enable-shared
    If any problems related to Fortran compiler occur, try typing:
    ./configure --enable-shared --disable-f77
    This trick allowed us to configure NetCDF on Mac OS X 10.6.2. Then, install NetCDF:
    sudo make check install
    sudo make clean
    After that you should be able to run NetCDF controller:
    nc-config
  3. Download Scientific Python. Build it first.
    python setup.py build
    You should be able to see "building 'Scientific_netcdf' extension" in the build logs. If everything goes fine, install it:
    sudo python setup.py install
    python setup.py clean
    You should now be able to import Scientific in your Python shell:
    >>> import Scientific
  4. Download MMTK. Unpack the tar.gz archive and create a Scientific directory inside Include/MMTK/, which is inside the extracted archive:
    mkdir Include/MMTK/Scientific
    Find the following files on your system: netcdf.h & netcdfmodule.h (check the installation logs for Python Scientific). When you find those two files, copy them inside Include/MMTK/Scientific, for example:

    on Ubuntu:
    cp /usr/local/include/python2.6/Scientific/netcdf*\
    Include/MMTK/Scientific/
    on OS X:
    cp /opt/local/Library/Frameworks/Python.framework/Versions\
    /2.6/include/python2.6/Scientific/netcdf*\
    Include/MMTK/Scientific/
    You are ready to install MMTK now:
    python setup.py build
    sudo python setup.py install
    python setup.py clean
    If the installation finished successfully, you should be able to import MMTK in your Python shell:
    >>> import MMTK

Valid HTML 4.01!