mirror of
https://github.com/biopython/biopython.git
synced 2025-10-20 21:53:47 +08:00
Do not mention BAM when encountering an invalid bgzipped file
If a program reads both a BAM file and a bgzipped compressed FASTA or VCF file, the error message can confuse the user because it’s easy to overlook the "e.g.", and the user might think that the BAM file is the problematic one while it is the other.
This commit is contained in:
committed by
Peter Cock
parent
83ca2ed29a
commit
275f04c458
@ -442,8 +442,7 @@ def _load_bgzf_block(handle, text_mode=False):
|
||||
raise StopIteration
|
||||
if magic != _bgzf_magic:
|
||||
raise ValueError(
|
||||
r"A BGZF (e.g. a BAM file) block should start with "
|
||||
r"%r, not %r; handle.tell() now says %r"
|
||||
r"A BGZF block should start with %r, not %r; handle.tell() now says %r"
|
||||
% (_bgzf_magic, magic, handle.tell())
|
||||
)
|
||||
gzip_mod_time, gzip_extra_flags, gzip_os, extra_len = struct.unpack(
|
||||
|
Reference in New Issue
Block a user