ornament
Modification-aware tRNA scanner written in Rust.
Ornament identifies tRNAs in genomic sequences using Infernal covariance models, then analyzes sequence compatibility with known RNA modifications to flag "odd" tRNAs that have mutations incompatible with expected modifications.
Features
- tRNA scanning via Infernal covariance models (FFI bindings to libinfernal)
- Modification database with 12+ tRNA modifications from MODOMICS
- Sprinzl position mapping (standard tRNA numbering 1-76)
- Compatibility analysis to detect modification-incompatible variants
- modkit integration for comparing with Nanopore modification calls
Installation
Prerequisites
- Rust 1.70+ (with cargo)
- C compiler (gcc or clang)
- autoconf
Setup
- Clone the repository:
git clone https://github.com/jayhesselberth/ornament.git
cd ornament- Set up dependencies (clones Infernal, HMMER, and Easel):
./scripts/setup-deps.sh- Build:
cargo build --releaseThe binary will be at target/release/ornament.
Usage
Show modification database
# List all modifications
ornament mods
# Show modifications expected at a specific position
ornament mods --position 34 --verbose
# Example output:
# Modifications expected at position 34:
# inosine (I) - IsotypeSpecific conservation
# queuosine (Q) - IsotypeSpecific conservationScan sequences for tRNAs
ornament scan --input genome.fa --cm tRNA.cm --output results.jsonAnalyze modification compatibility
ornament analyze --input trnas.json --threshold 0.8Compare with modkit calls
ornament compare --trna results.json --modkit mods.bedmethylProject Structure
ornament/
├── Cargo.toml # Workspace manifest
├── scripts/
│ └── setup-deps.sh # Dependency setup script
├── ext/ # External deps (gitignored)
│ └── infernal/ # Infernal with hmmer/ and easel/
├── crates/
│ ├── infernal-sys/ # FFI bindings to Infernal/HMMER/Easel
│ │ ├── build.rs # Compiles C libraries, generates bindings
│ │ └── src/lib.rs
│ ├── ornament-core/ # Core library
│ │ └── src/
│ │ ├── modification/ # Modification types and database
│ │ ├── analysis/ # Compatibility analysis
│ │ ├── infernal/ # Infernal interface
│ │ ├── integration/ # modkit integration
│ │ └── output/ # Output formatters
│ └── ornament-cli/ # CLI binary
│ └── src/main.rs
└── data/ # Data files
Modification Database
The database includes common eukaryotic tRNA modifications:
| Short Name | Full Name | Parent Base | Key Positions |
|---|---|---|---|
| Psi | pseudouridine | U | 55 (universal) |
| D | dihydrouridine | U | 16, 17, 20 |
| m5U | 5-methyluridine | U | 54 |
| m1A | 1-methyladenosine | A | 58 |
| t6A | N6-threonylcarbamoyladenosine | A | 37 |
| i6A | N6-isopentenyladenosine | A | 37 |
| m1G | 1-methylguanosine | G | 37 |
| m7G | 7-methylguanosine | G | 46 |
| I | inosine | A | 34 (wobble) |
| Q | queuosine | G | 34 (wobble) |
| Cm | 2'-O-methylcytidine | C | 32 |
| m5C | 5-methylcytidine | C | 48 |
How It Works
- Scan: Use Infernal cmsearch to find tRNAs in input sequences
- Map: Align hits to Sprinzl tRNA positions (1-76)
- Analyze: Check each position for modification compatibility
- If a position expects modification X (derived from base Y)
- But the sequence has base Z (incompatible with X)
- Flag as "odd" tRNA
- Report: Output compatibility scores and incompatibilities
Development
# Run tests
cargo test
# Build in debug mode
cargo build
# Run clippy
cargo clippy
# Format code
cargo fmtLicense
MIT
References
- Infernal - RNA covariance model search
- MODOMICS - RNA modification database
- tRNAscan-SE - tRNA detection
- modkit - Nanopore modification toolkit