SquiggleKit: Cannot import dtw_subsequence from mlpy
Hi James,
running MotifSeq.py gives me this error
from mlpy import dtw_subsequence
ImportError: cannot import name dtw_subsequence
Were you planning to use another dynamic time warping module for this? Looks like dtw_subsequence is not a function of mlpy anymore. Please help!
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 19 (11 by maintainers)
Yay! I’m glad that worked out.
Thanks for the breakdown. I’ll add it to the docs.
Also yes, mlpy/dtw is bullet fast (though can be faster, but that’s another story).
Thanks for the back and forth. This is helpful for understanding the different environments of others, as well as what is, and isn’t explained properly. That can be really hard sometimes. So thankyou!
Also, Heads up, new MotifSeq dropping soon. I brought scrappie into motifseq so it can convert the motif’s from a fasta input, and changed up some of the visuals to help people inspect their hits better. Bit of benchmarking coming too in the docs.
Cheers, James
yea that pierre-rouanet/dtw is a direct subsequence method and should work. Seems a little convoluted, but has a good amount of tunability in it. Windowing as well. leaving it as inf should wield similar results to mlpy, but this would need to be tested.
fastdtw uses subsampling to do a kind of banded alignment, and can very often lead to entirely spurious hits. In every example of that kind of abstraction technique for nanopore data, it just has not worked. I was first alerted to this by Matt Loose when he was investigating dtw for nanopore, and he had similar observations. We test this in another method we have been developing, where we tested a number of dtw approaches, and mlpy, or a method derived from it, is far superior.
lol. yea, i’ll tell you now, that stuff doesn’t work for nanopore. We have internally tested this, and the ROC curves were basically random.
Abstraction CAN work, and there are people who are doing this for nanopore, so stay tuned, But it’s a tricky beast to wrestle with.