Leech¶
Alpha quality — under active development
leech is alpha software. APIs, CLI flags, and output formats may change without notice, and bugs are expected. Validate results before relying on it for anything important.
Learning Enhanced Electrical Classifiers from Hanopore signals
Leech classifies aminoacylation state and amino acid identity from Oxford
Nanopore tRNA sequencing data. It extracts dwell time features from move
tables (the BAM mv tag) and feeds them alongside raw signal and sequence
context into a multi-branch neural network, giving it information that
signal-only tools like Remora
discard.
Install¶
Released on PyPI as leech plus
leech-core, the optional Rust
accelerator pulled by the rust extra. See
Installation for the from-source path and
platform notes.
Workflow¶
graph LR
A["leech data prepare"] --> B["leech model train"]
B --> C["leech eval test"]
C --> D["leech predict"]
- Prepare -- extract signal, sequence, and dwell features from POD5 + BAM files
- Train -- fit a multi-branch neural network on the extracted features
- Test -- evaluate on held-out data (accuracy, AUC, confusion matrix)
- Predict -- apply the model to new reads and write predictions to BAM
Documentation¶
-
Set up leech with uv or pip
-
Walk through prepare, train, test, predict
-
All commands, options, and workflows
-
How leech decodes the BAM
mvtag -
The 9-channel feature set and model architecture
-
Charged vs. uncharged and amino acid discrimination
-
Optimize signal context and hyperparameters
-
Parallel processing, motif search, multi-sample merging
-
Production workflows for HPC clusters
-
Common issues and solutions
Citation¶
If you use leech, please cite:
- This work (publication pending)
- Remora (underlying training framework)
License¶
MIT License -- see LICENSE for details.