Segmentation/resquiggling tool for ONT signals.
Project description
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!
- Currently, I applied the trained transition parameters from the RNA004 model to the DNA R10 models. These should be fine-tuned for the DNA models.
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 -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:
- rna_r9 (tested)
- rna_rp4 (tested)
- dna_r9 not available yet
- dna_r10.4.1 260 bps (not tested)
- dna_r10.4.1 400 bps (not tested)
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 modespecific: alignment score (Z) does not match between forward and backward run in preprocessing on signal (T) and read (N). - 2:
resquiggle modespecific: 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
kmerSizeof provided pore model
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dynamont-0.7.0.tar.gz.
File metadata
- Download URL: dynamont-0.7.0.tar.gz
- Upload date:
- Size: 10.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79695e8199cde7727c28388dee494b73b922248826cb6f57aaa6cc9699e196c9
|
|
| MD5 |
a7184b1301c4993608f9c26e77e570df
|
|
| BLAKE2b-256 |
bd770adabada32b1316ae37f07d88d2bd0e25334165c075e6a904f14c3732e3d
|
File details
Details for the file dynamont-0.7.0-py3-none-any.whl.
File metadata
- Download URL: dynamont-0.7.0-py3-none-any.whl
- Upload date:
- Size: 10.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
896c413c7187f6d963a083760ffbdfd40a0c06cdad4dc269d790e93340f13608
|
|
| MD5 |
99b7087747c3fc92b5210ddb2ef196ee
|
|
| BLAKE2b-256 |
975e3827e7bf450480e39ed4a7e345e6dfd0072923f3fb0475f65644c22ce7b7
|