Configuration¶
The pipeline uses YAML configuration files with a hierarchical inheritance system.
Configuration Hierarchy¶
flowchart TB
A[config/config-base.yml<br/>Default parameters] --> B[Your config.yml<br/>Project overrides]
B --> C[Command line<br/>--config key=value]
Your project config inherits all defaults from config-base.yml and only needs to specify overrides.
Configuration Files¶
| File | Purpose |
|---|---|
config/config-base.yml |
Base defaults (included by Snakefile) |
config/config-test.yml |
Test data configuration |
config/config-preprint.yml |
Preprint analysis configuration |
config/config-demux-test.yml |
Demultiplexing test configuration |
Required Parameters¶
These parameters must be set in your config:
| YAML | |
|---|---|
1 2 3 4 5 | |
Reference Files¶
Basecalling Model¶
| YAML | |
|---|---|
1 2 | |
The model is downloaded automatically if using a model name.
Reference FASTA¶
| YAML | |
|---|---|
1 2 | |
A BWA index is built automatically if it doesn't exist.
Adapter Sequences¶
The pipeline uses adapter sequences for reference validation and building. These must match what the charging model was trained on:
| YAML | |
|---|---|
1 2 3 4 5 | |
CCAGGC Junction
The charging classification uses the CCAGGC 6-mer junction where:
- CCA = last 3 bases of mature tRNA
- GGC = first 3 bases of 3' adapter
The 3' adapter must start with GGC for classification to work correctly.
Reference Validation and Building¶
The pipeline validates that the reference FASTA has proper adapter structure before alignment:
| YAML | |
|---|---|
1 2 3 4 5 | |
| Mode | Description |
|---|---|
validate |
Check existing adapted reference has correct structure |
build |
Create adapted reference from raw tRNA sequences |
Validate Mode (Default)¶
Checks that each sequence in your reference has:
- Correct 5' adapter prefix
- tRNA portion ending with CCA
- Correct 3' adapter suffix (starting with GGC)
- Valid CCAGGC junction for charging classification
Build Mode¶
Creates an adapted reference from raw tRNA sequences:
- Reads raw tRNA FASTA (without adapters)
- Adds CCA to sequences missing it (with warning)
- Prepends 5' adapter
- Appends 3' adapter after CCA
- Verifies CCAGGC junction is created
- Collapses sequences with identical content
| YAML | |
|---|---|
1 2 3 4 | |
Collapsing near-identical tRNAs¶
Genome-wide tRNA sets are heavily redundant: the danRer11 GtRNAdb mature-tRNA
FASTA is 8879 records but only 3315 distinct sequences. Identical sequences are
always collapsed, which is lossless. max_mismatch additionally merges
sequences within a given number of substitutions:
| YAML | |
|---|---|
1 2 3 4 | |
Grouping uses greedy leader clustering, so every member is within
max_mismatch of its group's representative rather than merely chained to it.
Distance is measured on the sequences as provided — before CCA is appended,
so added CCA does not shift the comparison — and only between equal-length
sequences, so molecules differing by an indel never merge.
This is lossy
Merged tRNAs share a single reference name, so charging and CPM can no
longer be resolved between members of a group. Check
<output_dir>/reference/build_report.txt, which lists every merge as
kept_name <- merged_names, before relying on per-tRNA results.
Custom References
To use a custom reference, either:
- Use
mode: "validate"with a pre-adapted FASTA - Use
mode: "build"with raw tRNA sequences (CCA endings required or will be added)
Charging Classifier¶
| YAML | |
|---|---|
1 2 3 4 5 6 7 8 9 10 | |
Reads with no cl tag are not uncharged
The model abstains on reads whose common arm did not align, rather than
guessing. Those reads carry no cl tag at all. Abstention is
charging-correlated, so a charging fraction over called reads alone is an
underestimate — read
summary/tables/{sample}/{sample}.charging_calls.tsv.gz and
summary/read_attrition.tsv.gz alongside it.
Tool Versions¶
| YAML | |
|---|---|
1 2 3 | |
Modkit is managed via Pixi and specified in pixi.toml.
Modkit Thresholds¶
Optimized thresholds for modification calling based on ModkitOpt:
| YAML | |
|---|---|
1 2 3 4 5 6 7 8 9 10 | |
These thresholds improve F1 scores by 51% (m6A) and 1251% (pseU) compared to defaults.
Per-Read Modkit Tables¶
The pileup is always produced. The per-read modkit extract tables are
opt-in, since each is a full pass over the BAM and the full table is
several times the size of the input:
| YAML | |
|---|---|
1 2 3 4 5 6 7 | |
Command-Line Options¶
Dorado Options¶
| YAML | |
|---|---|
1 2 | |
| Option | Description |
|---|---|
--modified-bases |
Modifications to call during basecalling |
--emit-moves |
Output move tables (required by the charging model) |
BWA Options¶
| YAML | |
|---|---|
1 2 | |
| Option | Description |
|---|---|
-W 13 |
Band width for banded alignment |
-k 6 |
Minimum seed length |
-T 20 |
Minimum alignment score |
-x ont2d |
ONT 2D read preset |
These parameters are optimized for tRNA alignment based on Novoa lab research.
BAM Filtering¶
| YAML | |
|---|---|
1 2 | |
| Option | Description |
|---|---|
-5 24 |
Allow up to 24bp 5' truncation |
-3 23 |
Require at least 23bp 3' adapter |
-s |
Require positive strand |
Coverage Options¶
| YAML | |
|---|---|
1 2 | |
| Option | Description |
|---|---|
--filterRNAstrand 'reverse' |
Filter by RNA strand |
--samFlagExclude 256 |
Exclude non-primary alignments |
WarpDemuX Demultiplexing¶
See WarpDemuX for more information.
For multiplexed samples, enable barcode demultiplexing:
| YAML | |
|---|---|
1 2 3 4 5 | |
Available Barcode Kits¶
| Kit | Barcodes | Notes |
|---|---|---|
WDX4_tRNA_rna004_v1_0 |
bc03, bc04, bc05, bc07 | Recommended, +3-7% recovery |
WDX4b_tRNA_rna004_v1_0 |
bc04, bc05, bc07, bc11 | Alternative |
Protocol Compatibility
WarpDemuX-tRNA models work with Nano-tRNAseq protocol only. They do NOT work with Thomas splint adapter data.
See Demultiplexing for detailed setup.
Example Configurations¶
Minimal Config¶
| YAML | |
|---|---|
1 2 | |
Custom Reference¶
| YAML | |
|---|---|
1 2 3 4 5 | |
With Demultiplexing¶
| YAML | |
|---|---|
1 2 3 4 5 | |
High-Stringency Modification Calling¶
| YAML | |
|---|---|
1 2 3 4 5 6 7 8 9 | |
Command-Line Overrides¶
Override any config parameter at runtime:
| Bash | |
|---|---|
1 2 | |
Next Steps¶
- Sample Files - Define your samples
- Running Pipeline - Execute the pipeline