We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
fq.gz
1 parent 9007f0b commit 99bd560Copy full SHA for 99bd560
1 file changed
src/map/input_chunk_reader.rs
@@ -121,9 +121,10 @@ impl InputSource {
121
if buf[..2] == GZIP_MAGIC_NUMBER {
122
let mut reader = bgzf::Reader::new(src);
123
let mut buf = [0; 4];
124
- reader
125
- .read_exact(&mut buf)
126
- .map_err(|_e| Error::InvalidInputType)?;
+ if let Err(_) = reader.read_exact(&mut buf) {
+ // We are going to ignore this error, since we probably got GZ instead of BGZF data.
+ // If that is not the case, potential errors are properly handled elsewhere.
127
+ }
128
129
return if buf == BAM_MAGIC_NUMBER {
130
Ok(Format::Bam)
0 commit comments