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 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-bit 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-month 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 configuration details, please see the Usage Documentation.

Motif Databases

RNAMoIP supports two types of motif databases:

  • (default) The RIN database, parser of type rin. RNAMoIP already provides a rins database of all local rins.
  • The original RNAMoIP database, parser of type desc, is 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. Note that a dependency (forgi) doesn't support Python 3.11 yet on OSX, so you might need Python 3.10.

pip install -r requirements-analysis.txt
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.1.2.tar.gz (41.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rnamoip-1.1.2-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

Details for the file rnamoip-1.1.2.tar.gz.

File metadata

  • Download URL: rnamoip-1.1.2.tar.gz
  • Upload date:
  • Size: 41.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for rnamoip-1.1.2.tar.gz
Algorithm Hash digest
SHA256 f6d80f08e7ffdcd593c73833374c3e1a6d2643875ea1c54842dc0988fe2457ab
MD5 fa1fcaf9e35d0ba6c713afe13f0294b1
BLAKE2b-256 d1a755ae478caa2dce13023cc498cb32248efc8efa7b4cc145ef81e6d67d8d45

See more details on using hashes here.

File details

Details for the file rnamoip-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: rnamoip-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for rnamoip-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6a60f0df4270b22c3c96a7467fa49e9cdcbd8682fcfe9c12b4fddeb00c5211f7
MD5 792f96b5a588b2eab1b2ad1270820aa8
BLAKE2b-256 6d56e32a6a083db2ebe70989be2971bc38a4a3c19450002a3f96bc16b917909c

See more details on using hashes here.

Supported by

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