realbigws / cwDTW

Continuous Wavelet Dynamic Time Warping for unbalanced global mapping of two signals
GNU General Public License v3.0
19 stars 9 forks source link

Further info #1

Open jumpingjehosophat opened 6 years ago

jumpingjehosophat commented 6 years ago

I've run your examples, but can't make sense of the output.

How do you determine the mapping position of one sequence in another from the output?

For example - at the command line after running this command:

./cwDTW -i example/002a08b9-0248-4929-9759-2d5c0942076d.seqsig -p example/002a08b9-0248-4929-9759-2d5c0942076d.rawsig -o align_out

I get:

002a08b9-0248-4929-9759-2d5c0942076d 002a08b9-0248-4929-9759-2d5c0942076d 22089.546144 127006 0.173925

What are these values telling me?

What is the point of the align_out file generated here? I think this file is essentially generating the relationship between the two input files?

It's also unclear what the purpose of sig2peak is?

realbigws commented 6 years ago

Hi, my friend.

Thank you for pointing out these issues. I have updated the README file regarding your questions about the out screen output as well as the output file.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++

For the screen output, such as:

002a08b9-0248-4929-9759-2d5c0942076d 002a08b9-0248-4929-9759-2d5c0942076d 22089.546144 127006 0.173925

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 column shows the length of the warping path (or, length of alignment),

the 5th column shows the normalized distance of a warping path.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++

For the output file, such as "align_out", yes, you're correct. This file is essentially generating the relationship between the two input signals.

For example:

     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

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.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++

The purpose of sig2peak is to generate a coarsening signal from the original signal using Continuous Wavelet Transform (CWT).

For more details about this, please refer to my manuscript entitled "An accurate and rapid continuous wavelet dynamic time warping algorithm for unbalanced global mapping in nanopore sequencing", or, https://www.biorxiv.org/content/early/2017/12/23/238857

===========================================================

Hope that I answered all your questions.

Best, -Sheng