Giter Club home page Giter Club logo

pod5-rs's People

Contributors

bsaintjo avatar

Stargazers

 avatar

Watchers

 avatar  avatar

pod5-rs's Issues

Potential issue with the decompression

Hello @bsaintjo,

Thank you very much for working on this project! I found the repo some few weeks ago and it seemed inactive so I tried to pick up the work from where it was at the time. I wanted to get something working and maybe open a pull request with it. I don't know Rust at all (I'm using this project as a vehicle for learning it) so I've been making quite a slow progress.

I just managed to start reading the signal data and was observing that it seems that I'm getting different results than the ONT's pod5 Python library. And seeing that you've started working on the project again, I thought it might be a good idea to report it. It's quite possible that there's no problem at all and it's just my ignorance, so apologies if that's the case.

Steps to reproduce:

I tried to look at the raw compressed signal data for the first read in file extra/multi_fast5_zip_v3.pod5 (that is read 0000173c-bf67-44e7-9a9c-1ad0bc728e74).

I used my implementation to get the compressed signal and compared the first few bytes to ones I retrieve with ONT's Python library in the following manner:

import pod5
import numpy as np

reader =  pod5.Reader("extra/multi_fast5_zip_v3.pod5")
read = next(reader.reads())
batch, batch_index, row_index = read._find_signal_row_index(0)
read_compressed_signal  = batch.signal[row_index].as_py()  # get the signal row as bytes
signal_row_samples = batch.samples[row_index].as_py() # get the number of samples in the signal row
compressed_signal_array = np.array(list(read_compressed_signal))
# The bytes in compressed_signal_array are the same as the ones I get for the compressed signal from my rust implementation
decompressed_signal = pod5.vbz_decompress_signal(compressed_signal_array, signal_row_samples)
# The bytes in decompressed_signal are different than the ones I get from using your implementation of svb16.

And the way I decompress the signal in Rust:

let mut decoded = decode(compressed_signal, samples).unwrap();

where both compressed_signal and samples have the same values as the ones passed to the Python decompression function, but the result from the decompression is different.

PS: You can use the python snippet and compare the decompressed_signal bytes from it with the test function in reader.rs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.