Skip to main content

Segmentation/resquiggling tool for ONT signals.

Project description

Dynamont

A Dynamic Programming Approach to Segment ONT Signals. Dynamont is a segmentation/resquiggling tool for ONT signals. Dynamont is currently designed for RNA002 and RNA004 data!

PyPI - Python Version License: GPL v3 PyPI PyPI - Downloads Anaconda-Server Badge Conda Conda package Conda package

DOI



Installation

Pypi/pip

pip install dynamont

Conda

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 --model_path <path/to/model> -o <output.csv> -p <pore>

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

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 Reference base position in the genomic sequence.
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

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
  • 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

Project details


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.6.3.tar.gz (263.3 kB view details)

Uploaded Source

Built Distribution

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

dynamont-0.6.3-py3-none-any.whl (273.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dynamont-0.6.3.tar.gz
  • Upload date:
  • Size: 263.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for dynamont-0.6.3.tar.gz
Algorithm Hash digest
SHA256 9027829111cdc2bd816cc243dfcd690eef6f0d7fb3d29568dc49904977a9354c
MD5 abb18c43a6f6e60115e67b6ac04c2e44
BLAKE2b-256 eedeb6f07243b5bb7291540ba0a2156a7f1712d1ff11500029ffa0345d0eea05

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dynamont-0.6.3-py3-none-any.whl
  • Upload date:
  • Size: 273.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for dynamont-0.6.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2a3f6ee2c4317a9fb87af26e91bcde453119aa3aa66180256b6a038adef61b14
MD5 a73fb3b2b4e39b60edd98df9d117152f
BLAKE2b-256 de80c37fed78eaf467f9b21d042746fd13b2b9d99b70926ec4e16da4b500f2e5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page