Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/realbigws/cwDTW
Continuous Wavelet Dynamic Time Warping for unbalanced global mapping of two signals
https://github.com/realbigws/cwDTW
Last synced: 3 months ago
JSON representation
Continuous Wavelet Dynamic Time Warping for unbalanced global mapping of two signals
- Host: GitHub
- URL: https://github.com/realbigws/cwDTW
- Owner: realbigws
- License: gpl-3.0
- Created: 2017-10-31T09:29:49.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-14T17:54:29.000Z (almost 6 years ago)
- Last Synced: 2024-05-14T00:14:12.003Z (6 months ago)
- Language: C
- Homepage:
- Size: 1.44 MB
- Stars: 19
- Watchers: 3
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
- awesome-nanopore - cwDTW - [C/C++] - [An accurate and rapid continuous wavelet dynamic time warping algorithm for end-to-end mapping in ultra-long nanopore sequencing](https://academic.oup.com/bioinformatics/article/34/17/i722/5093233) (Software packages / Adaptive sampling / ReadUntil Real-time mapping / signal mapping)
README
#==========
# Abstract:
#==========Title:
cwDTW: Continuous Wavelet Dynamic Time Warping for unbalanced global mapping of two signalsAuthor:
Renmin Han,
Yu Li,
Xin Gao,
Sheng WangContact email:
[email protected]
[email protected]Reference:
https://academic.oup.com/bioinformatics/article-abstract/34/17/i722/5093233#=========
# Install:
#=========./install.sh
#=======
# Usage:
#=======#---- type ----#
./cwDTW -h#---- usage ---#
----------- cwDTW ----------
version v0.03 (OCT 22 2017)
-------------------------------------------------------------
required:
[-i SHORT SIGNAL][-p LONG SIGNAL][-o OUTPUT]
optional:
([-r RADIUS])([-l LEVEL])([-s SCALE])
-------------------------------------------------------------
**** required: ******
SHORT SIGNALE: (reference) sequence signal from ATCG...;
LONG SIGNAL: (nanopore) raw electrical current signal;
OUTPUT: signal mapping result; if not specified, then no output be generated;
**** key parameters: ******
RADIUS: warp search radius (default 50);
LEVEL: sampling level in continous wavelet (default 3);
SCALE: base scale in continous wavelet (default sqrt(2));#===============
# Screen output:
#===============1 2 3 4 5
-------------------------------------------------------------------------------------------------------
002a08b9-0248-4929-9759-2d5c0942076d 002a08b9-0248-4929-9759-2d5c0942076d 22089.546144 127006 0.173925---------
[Legend]:
---------the 1st column shows the name of the first input signal,
the 2nd column shows the name of the second input signal,the 3rd column shows the overall distance after Dynamic Time Warping (DTW),
the 4th colmnn shows the length of the warping path (or, length of alignment),the 5th column shows the normalized distance of a warping path.
#===============
# Output format:
#===============1 2 3 4 5 6 7
------------------------------------------------------------------------------------------------------------------------
1 1 | 316 550 | -1.16628 1.04565 diff: 2.21193
2 2 | 347 433 | -0.526507 -0.560209 diff: 0.033702
3 3 | 319 411 | -1.10436 -0.862165 diff: 0.242199
3 4 | 319 409 | -1.10436 -0.889616 diff: 0.214749
3 5 | 319 408 | -1.10436 -0.903341 diff: 0.201023
3 6 | 319 389 | -1.10436 -1.16412 diff: 0.0597573
3 7 | 319 389 | -1.10436 -1.16412 diff: 0.0597573
3 8 | 319 377 | -1.10436 -1.32883 diff: 0.224461
3 9 | 319 391 | -1.10436 -1.13667 diff: 0.0323067---------
[Legend]:
---------the 1st column shows the mapping of the first position (e.g., on expected signal) starting from 1,
the 2nd column shows the mapping of the second position (e.g., on raw signal) starting from 1,the 3rd column displays the original value of the first input signal (e.g., on expected signal),
the 4th column displays the original value of the second input signal (e.g., on raw signal),the 5th column indicates the Z-normalized value of the first input signal (e.g., on expected signal),
the 6th column indicates the Z-normalized value of the second input signal (e.g., on raw signal),the 7th column illustrates the absolute difference between the two Z-normalized values.
#=========
# Example:
#=========#-> 1. generate genome signal from DNA sequence via pore model.
./seq2sig -i example/002a08b9-0248-4929-9759-2d5c0942076d.fasta -o 002a08b9-0248-4929-9759-2d5c0942076d.seqsig -s 1 -z 0#-> 2. generate coarsening signal via peak-pick on CWT spectrum.
./sig2peak -i example/002a08b9-0248-4929-9759-2d5c0942076d.seqsig -o 002a08b9-0248-4929-9759-2d5c0942076d.peak_seqsig -s 2.828 -z 1
./sig2peak -i example/002a08b9-0248-4929-9759-2d5c0942076d.rawsig -o 002a08b9-0248-4929-9759-2d5c0942076d.peak_rawsig -s 22.715 -z 1 #-> 22.715=2.828*126965/15807:wq#-> 3. perform mapping between nanopore signal and genome signal.
./cwDTW -i example/002a08b9-0248-4929-9759-2d5c0942076d.seqsig -p example/002a08b9-0248-4929-9759-2d5c0942076d.rawsig -o align_out