Skip to content

junior1p/RNAStructure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RNAStructure

RNA Secondary Structure Prediction & Design Engine

A pure NumPy implementation of RNA secondary structure analysis — no ViennaRNA, no Mfold, no external binaries. Every algorithm is implemented directly in Python using published thermodynamic parameters.

Features

Module Algorithm Description
1 Nussinov O(N³) DP maximizing base pairs
1 Turner Nearest-neighbor MFE with Turner 2004 parameters
2 McCaskill Partition function & base-pair probabilities
3 ΔMFE Scanning All SNV mutation impact analysis
4 Inverse Folding Design RNA sequences to target structures
5 Comparative Analysis Structure similarity & covariation

Quick Start

from rnastructure import turner_mfe, delta_mfe_scan

# Predict MFE structure
seq = "GCGGAUUUAGCUCAGUUGGGAGAGCGCCA"
result = turner_mfe(seq)
print(f"MFE: {result.mfe:.2f} kcal/mol")
print(f"Structure: {result.structure}")

# Scan all SNVs
dmfe = delta_mfe_scan(seq)
print(f"Most destabilizing: {dmfe[0]}")

Installation

pip install -e .

Modules

Module 1 — MFE Prediction

Nussinov (1980) maximizes base pairs; Turner nearest-neighbor model uses thermodynamically accurate free energy with Turner 2004 parameters.

Module 2 — Partition Function (McCaskill)

Computes full partition function Z and derives base-pair probability matrices — more informative than a single MFE structure.

Module 3 — ΔMFE Mutation Scanning

Evaluates every single-nucleotide variant across an RNA sequence, computing ΔMFE = MFE_mutant − MFE_WT.

Module 4 — Inverse Folding

Given a target dot-bracket structure, finds an RNA sequence that folds to it using simulated annealing.

Module 5 — Comparative Analysis

Computes pairwise structure similarity (tree-edit distance) and covariation at paired positions.

Examples

cd examples && python demo.py

Citation

If you use RNAStructure in your research, please cite:

Max. (2026). RNAStructure: RNA Secondary Structure Prediction & Design Engine. https://github.com/junior1p/RNAStructure

About

RNA Secondary Structure Prediction & Design Engine in Pure NumPy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors