- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| configs | ||
| src | ||
| environment.yml | ||
| example.pdb | ||
| inference.py | ||
| LICENSE | ||
| model.png | ||
| README.md | ||
| reproduce.py | ||
| train.py | ||
AlignIF
AlignIF is a deep learning framework for functional RNA design that integrates 3D structural constraints with evolutionary principles from Multiple Structure Alignments (MStA). It enables biologically plausible RNA sequence generation while preserving structural functionality.
Data and Model Checkpoint
Please download the data and model checkpoints from Google Drive link and then put all files into the current folder.
Installation
First, download the repository and create the environment.
git clone https://github.com/sfwang-auto/AlignIF.git
cd ./AlignIF
conda env create -f environment.yml
AlignIF relies on the US-align. You can install US-align using the following command.
git clone https://github.com/pylelab/USalign.git
cd USalign
g++ -static -O3 -ffast-math -lm -o USalign USalign.cpp
AlignIF incorporates RibonanzaNet to compute the scMCC, thereby facilitating the ranking process.
git clone --recursive https://github.com/DasLab/rnet-inference.git
Note: We have tested the environment on Ubuntu 20.04.6 and CUDA 12.1. If you are using a different CUDA version, please install torch and torch-geometric according to the corresponding CUDA version.
Training
The train.py script can be used to train new AlignIF models. Simply run:
python train.py
Reproduce
To reproduce figures in the paper, we offer a single-command script that generates perplexity scores, sampled sequences, and profiles for AlignIF and baseline methods across the benchmark and independent test sets. All results are saved in the reproduce directory.
python reproduce.py
Usage
You are required to input the structure file (.pdb or .cif) of the RNA structures. AlignIF will subsequently output the designed sequences (outputs).
python inference.py --input_structure_path ./example.pdb --n_samples 1 --use_msta True --temperature 0.1
Furthermore, you can specify the max number of alignment (the MStA depth).
python inference.py --input_structure_path ./example.pdb --n_samples 1 --use_msta True --max_n_aligns 16 -temperature 0.1
License
This project is licensed under the CC-BY-NC-4.0.
Online service
We also provide online service http://www.csbio.sjtu.edu.cn/bioinf/AlignIF.