Enhance auto layout with RNApuzzler, covariation rectangles, and font adjustments#209
Merged
AntonPetrov merged 7 commits intomainfrom Mar 29, 2026
Merged
Enhance auto layout with RNApuzzler, covariation rectangles, and font adjustments#209AntonPetrov merged 7 commits intomainfrom
AntonPetrov merged 7 commits intomainfrom
Conversation
Run RNApuzzler as part of the template-free auto layout selection and adjust ordering/selection logic. The puzzler run is now executed (with work/result folders created and exceptions handled), its overlap count compared alongside R2R and RNArtist, and candidate ordering/printing updated. The CLI --auto option is changed to --auto/--no-auto and defaults to true; auto mode only runs when no specific engine is chosen. Added example input (examples/rnapuzzler-auto.fasta) and expected SVG fixture (tests/examples/rnapuzzler-auto/9ZCC.colored.svg) and updated tests accordingly.
Draw coloured rectangles spanning both nucleotides of a base pair instead of per-nucleotide circles. Dual rectangles are drawn when a pair has both pair-level (dark green) and helix-level (light green) covariation signals.
Scale nucleotide font size based on median nearest-neighbour spacing: new_font = max(current, min(20, max(2, 0.56 * median_nn))) Never decreases existing fonts. Replaces the old nucleotide-count heuristic that only ran for Rfam/GtRNAdb.
Update documentation to describe rectangle-based visualization. Regenerate 9LEL images with rectangles and adjusted font size (14px).
ViennaRNA's RNA.svg_rna_plot produces nan coordinates for hairpin loops with fewer than 3 unpaired bases (e.g. '()' or '(.)'). Add _remove_small_hairpins() to iteratively strip such pairs before layout generation. Both template and target FASTA files are kept in sync so Traveler does not attempt to draw pairs without coordinates. Add _write_linear_colored_svg() fallback for when hairpin removal strips all base pairs, producing a Traveler-compatible SVG directly from ViennaRNA coordinates. Update 9MME reference SVG to reflect font-size adjustment.
Split normalization into two structures: layout_structure (all bracket types mapped to () for ViennaRNA coordinate generation) and template_structure (only original () retained; other brackets become dots so Traveler sees the same pair-tree topology). Apply small-hairpin removal to both, detect removed pairs by comparing against the original ()-only template, and write the template FASTA using template_structure. This preserves pseudoknot rendering in the final target while ensuring coordinates and template topology match.
Improve R-scape alignment processing
|
Docker image tag(s) pushed: Labels added to images: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.