Fast RNA Design via Motif-level Divide-Conquer-Combine and Structure-level Rival Search
-
Clone the repository:
git clone https://github.com/shanry/FastDesign.git cd FastDesign -
Install dependencies: This project is developed using Python 3.11, and should also work for other Python versions.
pip install -r requirements.txt
-
Optional: Enable Rival Search To enable structure-level rival search for boosting MFE-based metrics, download and build the RNA-Undesign repository.
Then, set the
PATH_UNDESIGNenvironment variable:export PATH_UNDESIGN=/path/to/RNA-Undesign
pytest main.py -sYou can run FastDesign directly from the command line.
Fast Version:
echo ".((((((((((..((((......((((((((.......)))))))).(((..(((((.....)))).)..)))))))....))))))))))" | python main.py --onlineFull Version:
echo ".((((((((((..((((......((((((((.......)))))))).(((..(((((.....)))).)..)))))))....))))))))))" | python main.py --online --poststep 2500The primary command-line parameters are:
-
--path:
Path to the input file containing target RNA secondary structures, one structure per line.
Examples:data/rnasolo764.txt,data/eterna100.txt. -
--step:
Number of optimization steps for leaf-node (motif-level) design. Default: 5000. -
--poststep:
Number of optimization steps for root-node (full-structure) refinement. A flexible parameter that balances quality and efficiency. Default values:
• 0 for the fast version
• 2500 for the full version -
--repeat:
Number of repeated experiments to run. Default: 1. -
--worker_count:
Number of CPU cores to use for parallel execution. -
--batch_size:
Number of structures processed in parallel per batch. Must be ≥worker_count. -
--k_prune:
Beam size for cubic pruning. For each node, the topk_prunecandidate designs are retained during search. -
--motif_path:
Path to easy-to-design motifs.
The replicatable results (RNAsolo_full.zip, RNAsolo_fast.zip, Eterna100_full.zip, Eterna100_fast.zip, 16SMFE_fast.zip) are available on Google Drive.
python main.py --path data/rnasolo764.txt --step 5000 --poststep 0 --batch_size 200 --worker_count 20 --repeat 5
python main.py --path data/eterna100.txt --step 5000 --poststep 0 --batch_size 50 --worker_count 20 --repeat 5
python main.py --path data/16s.txt --step 5000 --poststep 0 --batch_size 10 --worker_count 10 --repeat 5 --motif_path data/helix_motifs.txt --k_prune 20This runs 5 repeated experiments and produces 5 CSV files plus a meta_data.json file under:
results/output_timestamp/
python utils/metrics.py --meta results/output_timestamp/meta_data.json --evalThis will evaluate and output the metrics without rival search.
python utils/metrics.py --meta results/output_timestamp/meta_data.json -rThis generates improved MFE and uMFE results and saves them to:
results/output_timestamp/rival_serach_results.csv
python main.py --path data/rnasolo764.txt --step 5000 --poststep 2500 --batch_size 200 --worker_count 20 --repeat 5
python main.py --path data/eterna100.txt --step 5000 --poststep 2500 --batch_size 50 --worker_count 20 --repeat 5As with the fast version, this generates 5 CSV files and a meta_data.json file in: results/output_timestamp/
python utils/metrics.py --meta results/output_timestamp/meta_data.json --evalThis will evaluate and output the metrics without rival search.
python utils/metrics.py --meta results/output_timestamp/meta_data.json -rThis generates improved MFE and uMFE results and saves them to:
results/output_timestamp/rival_serach_results.csv