Skip to content
Francesco Palozzi edited this page Jun 5, 2026 · 2 revisions

RNA2DUnifier

A Java library for unifying RNA secondary structure annotations from multiple tools into a single extended BPSEQ format.

RNA2DUnifier reads the output of seven popular RNA structure analysis tools, normalizes their heterogeneous representations, and produces a standardized extended BPSEQ file with full Leontis–Westhof classification of base pairs.


🚀 Key Features

  • Parses 7 different tools: FR3D, RNAview, RNApolis, mc-annotate, Barnaba, bpnet (BPFIND), x3dna-DSSR
  • Automatic tool detection – just give it a file, no need to specify the tool
  • Leontis–Westhof classification – all 12 geometric families (cWW, tWH, cHS, …)
  • Two output formats:
    • Canonical BPSEQ – classic three‑column format (Watson‑Crick pairs only)
    • Extended BPSEQ – one column per LW family, supports multiple partners (e.g., base triples)
  • Robust ANTLR4‑based parsers with informative error messages
  • Java 21+ – modern language features, easy to integrate into Maven projects

🔬 Supported Tools

Tool Format Detection signature
FR3D JSON "annotations" key
RNAview Plain text BEGIN_base-pair
RNApolis FASTA + tabular > and seq
mc-annotate Plain text Residue conformations
Barnaba Tabular annotations N_INT_INT N_INT_INT XXc
bpnet (BPFIND) Tabular annotations ? separator + W:WC tokens
x3dna-DSSR JSON "pairs" key

📦 Quick Example

RnaUnifier unifier = new RnaUnifier();
String result = unifier.process(new File("barnaba_output.out"), true);
System.out.println(result);

The output is an extended BPSEQ file:

Index	Nucleotide	cWW	tWW	cWH	tWH	cWS	tWS	cHH	tHH	cHS	tHS	cSS	tSS
1	G	29	0	0	0	0	0	0	0	0	0	0	0
2	G	28	0	0	0	0	0	0	0	0	0	0	0
5	U	25	0	0	0	0	0	0	0	0	35	0	0

Clone this wiki locally