Skip to content

Add nucleic acid secondary structure analysis (DSSR integration) #18

Description

@wilke

Context

With DNA/RNA structure support added to protein_compare (feature/dna branch), the characterization pipeline can now load and report on nucleic acid structures. However, secondary structure analysis is skipped for DNA/RNA because DSSP only works on proteins.

Why DSSP doesn't work on DNA/RNA

DSSP assigns secondary structure by detecting hydrogen bond patterns in the protein backbone (N-H...O=C between amide groups). It requires N, CA, C, O atoms per residue and classifies based on specific H-bond geometries (i to i+4 for alpha helix, inter-strand for beta sheet).

DNA/RNA has a completely different backbone chemistry:

  • Protein: -N-Ca-C(=O)-N-Ca-C(=O)- (amide bonds)
  • DNA: -O-P(=O)-O-C5'-C4'-C3'-O- (phosphodiester bonds)

DSSP cannot find the atoms it needs and fails.

DNA/RNA does have secondary structure — A-form, B-form, Z-form helices, hairpins, bulges, G-quadruplexes, pseudoknots — but these are defined by base pairing and stacking geometry, not backbone hydrogen bonds.

Proposed Solution

Integrate DSSR (Dissecting the Spatial Structure of RNA) from the 3DNA suite as an optional nucleic acid secondary structure analyzer:

  • DSSR handles both DNA and RNA
  • Assigns base pairs, stacking, helical form (A/B/Z), hairpins, junctions
  • Outputs JSON with rich structural annotations

Implementation (in protein_structure_analysis repo)

  1. Add DSSRAnalyzer class alongside the existing DSSP-based SecondaryStructureAnalyzer
  2. Auto-select analyzer based on ProteinStructure.molecule_type
  3. Map DSSR output to report sections: base pair counts, helical form, stacking geometry
  4. Add visualization: base pair diagram, stacking pattern

Alternative tools

  • x3dna-dssr: Most comprehensive, requires license for commercial use
  • RNApdbee: Web-based, not suitable for batch processing
  • forgi (ViennaRNA): RNA-focused, limited DNA support

Current Behavior

DNA/RNA structures show all-coil for secondary structure, and the SS composition/profile plots are omitted from HTML/PDF reports. Confidence, contacts, and nucleotide composition work correctly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions