nodrogluap / OpenDBA

GPU-accelerated Dynamic Time Warp (DTW) Barycenter Averaging
Other
64 stars 13 forks source link

S/BLOW5 support #17

Closed hasindu2008 closed 2 years ago

hasindu2008 commented 2 years ago

Finally got some time today for this (related https://github.com/nodrogluap/OpenDBA/issues/16) and got the support for SLOW5 files (SLOW5 ASCII - .slow5 and SLOW5 binary - .blow5). I have added it as an optional feature like you had done for HDF5 and this SLOW5 feature can be enabled together with HDF5 if necessary. Let me know your thoughts and if you want me to do any changes. I did the changes to match your coding style as much as possible. It was great and enjoyable to read through your well-structured clean code.

I have added the function of writing the consensus signal in BLOW5 as well. I checked the output with that from FAST5 with my implementation for blow5 (slow5tools f2s a.avg.fast5 -o a.slow5 and slow5tools view b.avg.blow5 -o b.slow5 to convert FAST5 and BLOW5 to ASCII SLOW5), and the signals matches except for a few samples that are off by plus or minus 1 (which must be due to some floating point approximation difference I belive).

hasindu2008 commented 2 years ago

Thanks for merging this!