Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

curious error when reading fastq.gz files (maybe not an issue) #17

Closed
rderelle opened this issue Feb 16, 2024 · 2 comments
Closed

curious error when reading fastq.gz files (maybe not an issue) #17

rderelle opened this issue Feb 16, 2024 · 2 comments

Comments

@rderelle
Copy link

rderelle commented Feb 16, 2024

Hi,

Many thanks for developing and sharing seq_io!

I recently got a curious case when trying to parse a gziped fastq files sent by one of my collaborators. When using seq_io directly on these files, I get for all them the following error message:

Err value: UnexpectedEnd { pos: ErrorPosition { line: 713, id: None } }

However, if I gunzip these fastq files and re-gzip them, they get parsed as expected.

Would you know what could cause this error? Could it be an incompatibility Windows/Unix (I'm using a Unix system but I don't know how these files have been generated)?

My apologies if this is a trivial question/issue.

@markschl
Copy link
Owner

markschl commented Feb 17, 2024

Without details about the implementation, I cannot precisely know what is going on.

However, in case you are using GzDecoder from the flate2 crate, the described error can in fact occur. Many 'fastq.gz' files are multi-member files which makes it necessary to use MultiGzDecoder instead. I've hit this problem earlier as well, since I didn't know about this. Could this be the problem in your case?

@rderelle
Copy link
Author

Hi,

Thanks a lot for your reply and my apologies for not giving you more details!
You have indeed identified my mistake: I was using GzDecoder instead of GzDecoder. Now all files are correctly parsed.

best,
Romain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants