"Error: unhandled exception: invalid bgzf file [ValueError]" on an S3 bam file that samtools-1.9 can view.
splichte opened this issue · comments
splichte commented
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!
Brent Pedersen commented
thank you. i just pushed a fix for this.
Brent Pedersen commented
thanks for reporting. not sure how I haven't seen this before, but good to get it resolved.
splichte commented
thanks!
splichte commented
would you be able to push a new release for hts-nim with this fix included?
thanks!
…On Mon, Sep 2, 2019 at 8:41 PM Brent Pedersen ***@***.***> wrote:
thanks for reporting. not sure how I haven't seen this before, but good to
get it resolved.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#48?email_source=notifications&email_token=AAX55I5I4GBCCH7JOPX6LOTQHWXC5A5CNFSM4ITA3CS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5WWTHQ#issuecomment-527264158>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAX55IYAMHMKWKP4E7CEUOLQHWXC5ANCNFSM4ITA3CSQ>
.
Brent Pedersen commented
yes. just tagged v0.2.21.
splichte commented
wonderful, thank you for the speedy response as always!
…On Tuesday, September 10, 2019, Brent Pedersen ***@***.***> wrote:
yes. just tagged v0.2.21.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#48?email_source=notifications&email_token=AAX55IYBW7JO3PMODIZHGJTQJBGXXA5CNFSM4ITA3CS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6NANRY#issuecomment-530187975>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAX55IZVIDIHXFFSF2HIJVTQJBGXXANCNFSM4ITA3CSQ>
.