Skip to content

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

PyPI CI Python 3.12+ License: MIT

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

uv add "leech[rust]"     # or: pip install "leech[rust]"

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"]
  1. Prepare -- extract signal, sequence, and dwell features from POD5 + BAM files
  2. Train -- fit a multi-branch neural network on the extracted features
  3. Test -- evaluate on held-out data (accuracy, AUC, confusion matrix)
  4. Predict -- apply the model to new reads and write predictions to BAM

Documentation

Citation

If you use leech, please cite:

  • This work (publication pending)
  • Remora (underlying training framework)

License

MIT License -- see LICENSE for details.