Skip to main content

Dynamont

A Dynamic Programming Approach to Segment ONT Signals. Dynamont is a segmentation/resquiggling tool for ONT signals. Dynamont was tested on

  • RNA002
  • RNA004
  • DNA R10.4.1 5kHz (I applied the trained transition parameters from the RNA004 model to the DNA R10 models. These should be fine-tuned for the DNA models.)

PyPI - Python Version License: GPL v3 PyPI PyPI - Downloads

Please cite 10.1093/gigascience/giag005. Citation Badge



Segmentation Comparison

For further details please read: 10.1093/gigascience/giag005

Segmentation Comparison Segmentation Scoring

Installation

Pypi/pip

pip install dynamont

Conda (not updated anymore)

conda config --add channels jannessp # to install all dependencies from the correct channel
conda create -n dynamont jannessp::dynamont
conda activate dynamont

Usage

# segment a dataset
dynamont-resquiggle -r <path/to/pod5/dataset/> -b <basecalls.bam> --mode basic -o <output.csv> -p <pore>

# train model
dynamont-train -r <path/to/pod5/dataset/> -b <basecalls.bam> --mode basic -o <output/path> -p <pore>

# choosing a pore will automatically load the default model for that pore, a custom model can be used with the parameter --pore_model <model/path>

Default models:

Output

Dynamont produces a tabular output with the following columns:

Column Name Description
readid Unique identifier for the read.
signalid Identifier for the signal corresponding to the read.
start Start position of the signal segment in the read.
end End position of the signal segment in the read.
basepos Base position in the read.
base The detected base at this position.
motif The surrounding sequence motif in which the base appears.
state The methylation state (or modification state) of the base.
posterior_probability Probability assigned to the predicted segment.
polish Polished kmer, only available in resquiggle mode.

Example Output

Below is an example of the output generated by Dynamont:

readid,signalid,start,end,basepos,base,motif,state,posterior_probability,polish
476b4ed2-7865-4f81-9f78-82d614fb40a2,476b4ed2-7865-4f81-9f78-82d614fb40a2,12762,12777,53,A,AAAAAAAAA,M,0.12434,NA
476b4ed2-7865-4f81-9f78-82d614fb40a2,476b4ed2-7865-4f81-9f78-82d614fb40a2,12777,12791,52,A,AAAAAAAAA,M,0.12146,NA
476b4ed2-7865-4f81-9f78-82d614fb40a2,476b4ed2-7865-4f81-9f78-82d614fb40a2,12791,12806,51,A,AAAAAAAAA,M,0.11881,NA
476b4ed2-7865-4f81-9f78-82d614fb40a2,476b4ed2-7865-4f81-9f78-82d614fb40a2,12806,12820,50,A,AAAAAAAAA,M,0.11665,NA

Differences Segmentation Tools

Segmentation Comparison

Exit-Codes

  • -11: Segmentation fault
  • -9: Out of Memory error. Decrease the number of processes or move to a system with more memory.
  • -6: std::bad_alloc
  • 1: resquiggle mode specific: alignment score (Z) does not match between forward and backward run in preprocessing on signal (T) and read (N).
  • 2: resquiggle mode specific: alignment score (Z) does not match between forward and backward run in preprocessing on signal (T) and error correction (C).
  • 3: Alignment score (Z) does not match between forward and backward pass or is -Infinity
  • 4: Input signal is missing or not found in stdin stream
  • 5: Input read is missing or not found in stdin stream
  • 6: raw file does not exist
  • 7: Invalid model path was provided
  • 8: Provided ONT signal is too short
  • 9: Read is too short
  • 10: Signal is smaller than read
  • 11: Read is smaller than kmerSize of provided pore model
  • 20: Terminated using KeyboardInterrupt (Ctrl + C)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dynamont-0.8.2.tar.gz (11.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dynamont-0.8.2-py3-none-any.whl (11.1 MB view details)

Uploaded Python 3

File details

Details for the file dynamont-0.8.2.tar.gz.

File metadata

  • Download URL: dynamont-0.8.2.tar.gz
  • Upload date:
  • Size: 11.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for dynamont-0.8.2.tar.gz
Algorithm Hash digest
SHA256 daa9ea07e24938bc0ca748e3f04147e1feecbe9a5e9bd52f6e01896a25334b2f
MD5 0dd1b456a4fcd40f7f25d49926be3e57
BLAKE2b-256 0113ff1ed17bd9d7e9687d23879a981d9e68cae5893f3a26324ecf4166470e00

See more details on using hashes here.

File details

Details for the file dynamont-0.8.2-py3-none-any.whl.

File metadata

  • Download URL: dynamont-0.8.2-py3-none-any.whl
  • Upload date:
  • Size: 11.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for dynamont-0.8.2-py3-none-any.whl
Algorithm Hash digest
SHA256 97473cdf205d43e94dd64002539d5909049e93ff7f41051147d4d9cf6422b1b5
MD5 aa6419d1cbf044c523d7c7b6980883e7
BLAKE2b-256 3286f737c2c77cc01535af38e18dedd3f2250d6679545cd672fcfa604b41a5bc

See more details on using hashes here.

Release history Release notifications | RSS feed

0.9.0

3 files

This release

0.8.2 This release

2 files

0.8.1

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.5

2 files

0.6.4

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.5

2 files

0.4.1

2 files

0.4

2 files

0.3

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page