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

"Error: unhandled exception: invalid bgzf file [ValueError]" on an S3 bam file that samtools-1.9 can view. #48

Closed
splichte opened this issue Sep 3, 2019 · 6 comments

Comments

@splichte
Copy link

splichte commented Sep 3, 2019

Here is my command history:

ubuntu $ ./mosdepth pref http://s3.amazonaws.com/1000genomes/phase3/data/NA21103/alignment/NA21103.chrom11.ILLUMINA.bwa.GIH.low_coverage.20120522.bam
[E::knet_seek] SEEK_END is not supported for HTTP. Offset is unchanged
../../../../root/.nimble/pkgs/hts-0.2.8/hts/bam.nim(297) open
Error: unhandled exception: invalid bgzf file [ValueError]

ubuntu $ samtools view http://s3.amazonaws.com/1000genomes/phase3/data/NA21103/alignment/NA21103.chrom11.ILLUMINA.bwa.GIH.low_coverage.20120522.bam >/dev/null

samtools is built with htslib-1.9. mosdepth can read this file just OK if I copy it from S3 first. I put this issue on hts-nim since it seems like it is in bam.nim and has nothing to do with mosdepth itself.

I'm happy to attempt a fix if you have any idea what might be going on. Thanks!

@brentp brentp closed this as completed in 3cef0aa Sep 3, 2019
@brentp
Copy link
Owner

brentp commented Sep 3, 2019

thank you. i just pushed a fix for this.

@brentp
Copy link
Owner

brentp commented Sep 3, 2019

thanks for reporting. not sure how I haven't seen this before, but good to get it resolved.

@splichte
Copy link
Author

splichte commented Sep 3, 2019

thanks!

@splichte
Copy link
Author

splichte commented Sep 11, 2019 via email

@brentp
Copy link
Owner

brentp commented Sep 11, 2019

yes. just tagged v0.2.21.

@splichte
Copy link
Author

splichte commented Sep 11, 2019 via email

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