viennarna-structure-prediction
Predict RNA secondary structure, MFE folding, base-pair probabilities, RNA-RNA interactions via ViennaRNA Python bindings. Pipeline: sequence → MFE → partition function and pair-probability matrix → dot-bracket → duplex. Use for siRNA/sgRNA targeting, ribozyme design, RNA accessibility. Use RNAfold CLI for batch use without Python.
npx skills add BioTender-max/awesome-bio-agent-skills --skill viennarna-structure-prediction --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Predicts RNA secondary structure, MFE folding, base-pair probabilities, and RNA-RNA interactions using ViennaRNA bindings. Provides a pipeline: sequence → MFE → partition function and pair-probability matrix → dot-bracket → duplex. Includes both Python API usage and CLI demonstrations for batch work.
How it works
The skill describes using the ViennaRNA toolkit and Python bindings to perform:
- MFE folding with RNA.fold() or fold_compound.mfe() to obtain a structure and MFE value.
- Partition function computation and retrieval of base-pair probability matrices via fold_compound.pf() and fold_compound.bpp(), with optional rescaling for numerical stability.
- Deriving dot-bracket structures from MFE results and analyzing base-pair probabilities to identify high-confidence pairs.
- RNA-RNA duplex prediction using RNA.cofold() for co-folding between two sequences separated by an ampersand.
- RNA accessibility analysis using a sliding-window approach and per-position unpaired probability from the base-pair probability matrix.
- Command-line batch folding using RNAfold, including parsing its output to extract structure and MFE.
- Constrained folding with hard constraints (hc_add_bp) and enumeration of suboptimal structures via subopt.
- Visualizing the base pair probability matrix as a heatmap and providing sample Python code for batch workflows.
The instructions include concrete code snippets for preparing sequences, creating fold compounds, computing MFE, deriving partition functions, obtaining base-pair probabilities, performing co-folding, and conducting accessibility analyses. It also shows how to execute RNAfold via CLI and parse its output.
Key steps explicitly described include:
- Prepare sequence, normalize (uppercase, T→U).
- Create RNA.fold_compound(sequence) and compute MFE with fc.mfe(); parse structure and mfe.
- Compute partition function with fc.pf() after setting up and optionally fc.exp_params_rescale(mfe).
- Retrieve base-pair probabilities with fc.bpp() and convert to a usable matrix; identify high-confidence pairs (>0.9).
- Build and visualize the base-pair probability matrix with matplotlib.
- Use RNA.cofold(cofold_seq) for duplex prediction and parse the result structure.
- Compute accessibility across a target by deriving per-position unpaired probabilities from bpp and plotting results.
- Run RNAfold from CLI to process sequences in batch and parse outputs.
- Apply constraints with hc_add_bp and enumerate suboptimal structures with RNA.subopt.
When to use it
- When predicting the minimum free-energy (MFE) secondary structure of an RNA sequence.
- When computing base-pair probability matrices to assess structural uncertainty.
- When evaluating siRNA accessibility by folding the target mRNA region for potential exposure.
- When assessing sgRNA targeting efficiency by predicting whether guide RNA forms structures that could impact activity.
- When modeling RNA-RNA interactions via co-folding/duplex prediction.
- When calculating folding energies across multiple sequences for stability comparisons.
- When batch-processing sequences via RNAfold CLI for non-Python workflows.
What it can touch
- Tools explicitly referenced: RNAfold, RNA.fold (via Python bindings), RNA.fold_compound, RNA.cofold, RNA.bpp, RNA.pf, RNA.subopt, RNA.hc_add_bp.
- It demonstrates using Python imports like import RNA and commands such as fc.mfe(), fc.pf(), fc.bpp(), and subprocess-based RNAfold calls for batch processing.
Caveats
- License: MIT for the skill description, but repository license is NOASSERTION per the provided facts.
- It notes dependencies: Python 3.8+, ViennaRNA Python bindings, matplotlib, numpy; conda recommended to manage C library dependencies.
- It emphasizes using Turner's 2004 parameters and advises alternatives (mfold, RNAstructure) for specific algorithms or different param sets.
- It includes sample code that assumes valid input sequences and may require adaptation for large-scale or production use.
# ViennaRNA Structure Prediction ## Overview ViennaRNA is the gold-standard toolkit for RNA secondary structure prediction based on thermodynamic nearest-neighbor parameters. It predicts the minimum free energy (MFE) structure and dot-bracket notation for a given RNA sequence, computes the full partition function to obtain base pair probabilities, and models RNA-RNA interactions via co-folding and duplex prediction. The Python bindings (`import RNA`) expose the full ViennaRNA C library with sequence-level and fold-compound APIs. Command-line programs (`RNAfold`, `RNAalifold`, `RNAduplex`) are also available and demonstrated here. ## When to Use - Predicting the minimum free energy secondary structure of an RNA sequence (mRNA, lncRNA, miRNA precursor, aptamer) - Computing base pair probability matrices to assess structural uncertainty and identify well-defined stem-loops - Designing or evaluating siRNA accessibility by folding the target mRNA region and checking for double-stranded structure - Assessing sgRNA targeting efficiency by predicting guide RNA secondary structure that may reduce on-target activity - Modeling RNA-RNA interactions (co-folding or duplex prediction) for miRNA-
- Overview
- When to Use
- Prerequisites
- Quick Start
- Workflow
- Step 1: Sequence Preparation and MFE Folding
- Step 2: Create a Fold Compound for Advanced Analysis
- Step 3: Partition Function and Base Pair Probabilities
- Step 4: Visualize Base Pair Probability Matrix
- Step 5: RNA-RNA Duplex Prediction (Co-folding)
- Step 6: RNA Accessibility Analysis for siRNA Design
- Step 7: Command-Line RNAfold and Output Parsing
- Step 8: Constrained Folding and Suboptimal Structures
- Key Parameters
Install via conda (recommended) conda install -c conda-forge -c bioconda viennarna Verify installation python -c "import RNA; print(RNA.__version__)" Install additional Python dependencies pip install matplotlib numpy pandas RNAfold --version RNAfold 2.6.4 Fold a single sequence from stdin echo "GCGGAUUUAGCUCAGUUGGGAGAGCGCCAGACUGAAGAUCUGGAGGUCCUGUGUUCGAUCCACAGAAUUCGCACCA" | RNAfold
What does the viennarna-structure-prediction skill do?
Predict RNA secondary structure, MFE folding, base-pair probabilities, RNA-RNA interactions via ViennaRNA Python bindings. Pipeline: sequence → MFE → partition function and pair-probability matrix → dot-bracket → duplex. Use for siRNA/sgRNA targeting, ribozyme design, RNA accessibility. Use RNAfold CLI for batch use without Python.
How do I install it?
Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill viennarna-structure-prediction --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From BioTender-max/awesome-bio-agent-skills, a repository with 135 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
