pezmaster31/bamtools — Issue #25: error when combining merge and sort with pipe
Author: fyfy
Created: 2011-12-03 02:12:32+00:00
State: open

Hi, dear Derek:
I am using bamtools utility programs to merge multiple files and then sort them by coordinates. I can do it in two separated steps without any problem. However, if I put them in one step as:
bamtools merge -in in_file1 -in in_file2 | bamtools sort -out out_file,

I got many error messages as:
BgzfStream ERROR: unable to open file .sort.temp.0
BamReader ERROR: Could not open BGZF stream for .sort.temp.0
BamMultiReader WARNING: Could not open .sort.temp.0, ignoring file
BgzfStream ERROR: unable to open file .sort.temp.1
BamReader ERROR: Could not open BGZF stream for .sort.temp.1
BamMultiReader WARNING: Could not open .sort.temp.1, ignoring file
....
BgzfStream ERROR: read block failed - invalid block header
BgzfStream ERROR: read block failed - invalid block header
BgzfStream ERROR: read block failed - invalid block header
BgzfStream ERROR: read block failed - invalid block header
BgzfStream ERROR: could not decompress block - zlib::inflate() failed
BgzfStream ERROR: read block failed - could not decompress block data
BgzfStream ERROR: could not decompress block - zlib::inflate() failed
BgzfStream ERROR: read block failed - could not decompress block data

Could you please check it?

Thanks.

Fan