Skip to main content

RNAMoIP: Integer Programing Framework to predict RNA secondary structure

Project description

RNAMoIP

Setup

RNAMoIP can be installed via Pypi with the following command:

pip install rnamoip

You will also need ViennaRNA installed locally:

wget https://www.tbi.univie.ac.at/RNA/download/sourcecode/2_6_x/ViennaRNA-2.6.4.tar.gz
tar -zxvf ViennaRNA-2.6.4.tar.gz

cd ViennaRNA-2.6.4
./configure
make
sudo make install

Python Environment (Optional)

Use your favorite virtual environment for Python. The python venv module is recommended if you don't have any.

To create a Python version with venv:

python3 -m venv rnamoip-env

Afterward, you can use that environment with the following command:

source rnamoip-env/bin/activate

Python dependencies

To install the Python dependencies, run the following:

pip install -r requirements.txt

The Python bindings are already provided in the requirements file. Please note that RNAMoIP was built using ViennaRNA v2.6.4. For more information, check for the ViennaRNA Documentation.

IP Model Solver

Multiple solvers are supported to solve the RNAMoIP equations.

CP-SAT (Recommended)

Cp-SAT is a free, open-source IP solver from the OR-tools Package, made by Google. For more information, visit their GitHub here.

CBC

CBC (Coin-or branch and cut) is a free, open-source IP solver available here. It can be useful as an alternative to Gurobi, although considerably slower. It is automatically provided by the MIP python library for 64-bits Intel architecture. For more details, like manual installation, please refer to the MIP doc.

Gurobi (Need License)

To install, follow the directives here. Note that a free academic license can be used for a renewable two months period.

How to execute

To execute RNAMoIP, you can run the main.py with the following command:

cd src
python -m rnamoip.main --sequence "AAGGUUCC" --structure "........"

You can also provide a more detailed configuration file. By default, it will use the base configuration located in src/data/configuration.json. You can also run the prediction through the Prediction Python class:

# From agrs
from rnamoip.predicter import Predicter

Predicter(
  rna_sequence='AAGGUUCC',
  secondary_structure='........',
  alpha=0.1,
).iterate()

# With a config file path or dict
Predicter(configuration_file='my/path/to/configuration.json').iterate()

For more use cases, with configurations details, please see the Usage Documentation.

Motif Databases

RNAMoIP support two types of motif databases:

  • (default) The RIN database, of parser of type rin. RNAMoIP already provide a rins database of all local rins.
  • The original RNAMoIP database, of parser of type desc, available here.

You need to specify the path of the motif database accordingly in the motifs_path property, and the motif type with the parser property. For more info, see the Usage Documentation.

Scripts

Useful scripts related to the project can be found under the scripts folder.

Benchmark

To run a batch of multiple prediction RNAMoIP, with all chains that what used in the benchmark:

python -m rnamoip.multi_batch_analysis --chains_source="../data/chain/chains.json"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rnamoip-1.0.0.tar.gz (41.2 MB view hashes)

Uploaded Source

Built Distribution

rnamoip-1.0.0-py3-none-any.whl (1.3 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page