Python library and utilities for constructing 3D models of RNA molecules, developed as part of my master's thesis with Professor Jérôme Waldispühl.
Provides the rna_builder, rna_insert_loops and bp2_bridge command line utilities, and the rna_bits Python library for programmatic access.
Note that BayesPairing2 is a separate utility developed by Roman Sarrazin-Gendron for predicting loop motif insertion sites.
Link to the original rna_bits repo on Jérôme's gitlab: https://jwgitlab.cs.mcgill.ca/pheneg1/rna_bits
Python >= 3.8
Requires numpy, biopython, mmtf-python, which will be installed automatically.
Running certain data generation pipelines requires MC-Annotate, which needs to be downloaded separately. For convenience, I have included the output of MC-Annotate for those pipelines. (TODO: MC-Annotate installation pointer.)
As of now, I have only tested on Linux.
Make sure you're inside the directory and run:
pip3 install -e .It will automatically install the python requirements, and make the python library and command line utilities available.
Assembles a 3D RNA structure from a ".rass" file and .pdb files of fragments.
cd examples/rna_builder
rna_builder 1MMS_native_motifs.rass
Given an RNA secondary structure and sequence, will annotate loops, that can then be assembled using rna_builder. Outputs a .rass file.
Before using this, the loop database needs to be generated by running generate_loops.py (Or by running the numbered scripts in src/rna_bits/data/loops/) (Note: the rna_bits library must first be installed). This might take multiple hours.
python3 generate_loops.py
Then, we can insert loops and assemble structures:
cd examples/rna_builder
rna_insert_loops 1MMS_no_motifs.rass
rna_builder il_out/*.rass
Turns an output from BayesPairing2 (https://jwgitlab.cs.mcgill.ca/sarrazin/rnabayespairing2) into an input that can be passed to rna_builder.
First, install BayesPairing2 (follow instructions in above link.)
Next, run BayesPairing2 using the BayesPairing command (if you installed BayesPairing2 in a new conda environment, make sure that conda environment is active). Example command:
mkdir bp2b_example # create an empty directory
cd bp2b_example
BayesPairing -seq "UUUUUUAAGGAAGAUCUGGCCUUCCCACAAGGGAAGGCCAAAGAAUUUCCUU" -samplesize 1000 -d RELIABLE
Next, use bp2_bridge to generate the rass files.
bp2_bridge has 2 required arguments: the output.json from BayesPairing2, and the models json file that BayesPairing2 used. (The --chefs_choice flag is optional, to restrict to using only the "chef's choice" motifs as output by BayesPairing2.)
bp2_bridge --bp2_result output.json --database ~/where_you_installed_bp2/rnabayespairing2/bayespairing/models/RELIABLE.json --chefs_choice
This might take some time because it will download PDB files to generate the 3d motifs.
Finally, assemble the 3d structures:
rna_builder bp2b_out/*.rass
