Summary
Add new color schemes that color residues based on GC annotation data from R2R and R-scape tools.
New Color Schemes
1. RF Match (:color rf)
Color residues by match/mismatch to the reference sequence (#=GC RF):
- Green - matches RF consensus
- Red - differs from RF consensus
2. R2R Label (:color r2r)
Color by structural element labels from R2R (#=GC R2R_LABEL):
- Different colors for labeled regions (pseudoknots, groups, etc.)
3. Covariation (:color cov)
Color base pairs by R-scape covariation significance:
- Green - significant covariation (
cov_SS_cons = 2)
- Light green - in significant helix (
cov_h_SS_cons = 3)
- Blue - paired but no covariation data
R-scape Annotation Format
R-scape outputs .R2R.sto Stockholm files with these GC annotations:
| Annotation |
Values |
Meaning |
cov_SS_cons |
. or 2 |
. = no covariation, 2 = significant |
cov_h_SS_cons |
. or 3 |
. = not in helix, 3 = significant helix |
RF |
A/C/G/U |
Reference sequence (upper=conserved) |
Implementation
Files to Modify
| File |
Changes |
src/app.rs |
Add RfMatch, R2rLabel, Covariation to ColorScheme enum |
src/color/schemes.rs |
Implement color functions, add match arms in get_color() |
src/stockholm/types.rs |
Add get_gc_annotation() helper method |
Command Aliases
"rf" / "rfmatch" → RfMatch
"r2r" / "label" → R2rLabel
"cov" / "covariation" → Covariation
Testing
- Load R-scape output file (
.R2R.sto) with covariation annotations
- Test
:color rf, :color cov, :color r2r commands
- Verify graceful fallback when annotations are missing
References
- R-scape annotation code:
ext/R-scape/src/r2rdepict.c
- R2R demo files:
ext/R2R/R2R-1.0.7/demo/
Summary
Add new color schemes that color residues based on GC annotation data from R2R and R-scape tools.
New Color Schemes
1. RF Match (
:color rf)Color residues by match/mismatch to the reference sequence (
#=GC RF):2. R2R Label (
:color r2r)Color by structural element labels from R2R (
#=GC R2R_LABEL):3. Covariation (
:color cov)Color base pairs by R-scape covariation significance:
cov_SS_cons=2)cov_h_SS_cons=3)R-scape Annotation Format
R-scape outputs
.R2R.stoStockholm files with these GC annotations:cov_SS_cons.or2.= no covariation,2= significantcov_h_SS_cons.or3.= not in helix,3= significant helixRFImplementation
Files to Modify
src/app.rsRfMatch,R2rLabel,Covariationto ColorScheme enumsrc/color/schemes.rsget_color()src/stockholm/types.rsget_gc_annotation()helper methodCommand Aliases
"rf"/"rfmatch"→ RfMatch"r2r"/"label"→ R2rLabel"cov"/"covariation"→ CovariationTesting
.R2R.sto) with covariation annotations:color rf,:color cov,:color r2rcommandsReferences
ext/R-scape/src/r2rdepict.cext/R2R/R2R-1.0.7/demo/