Skip to content
Snippets Groups Projects
Commit 333b85c0 authored by Aaron Quinlan's avatar Aaron Quinlan
Browse files

Merge pull request #14 from nkindlon/master

Added fix for Bam files with empty headers. Added test for this to unit ...
parents 6d5a7587 a16562f4
No related branches found
No related tags found
No related merge requests found
......@@ -204,10 +204,7 @@ bool InputStreamMgr::detectBamOrBgzip(int &numChars, int currChar)
_bamReader = new BamTools::BamReader();
_bamReader->OpenStream(_finalInputStream);
QuickString bamHeader(_bamReader->GetHeaderText());
if (bamHeader.empty()) {
if (!_bamReader->OpenStream(_finalInputStream)) {
//This is NOT a bam file, but it is bgzipped.
_pushBackStreamBuf->clear();
//Put all bytes read so far back onto the scan buffer, then reset
......
File added
chr2L 10 15 None 255 + 10 15 0,0,0 1 5, 0,
chr2L 70 75 None 255 - 70 75 0,0,0 1 5, 0,
chr2L 70 75 None 255 - 70 75 0,0,0 1 5, 0,
chr2L 140 145 None 255 - 140 145 0,0,0 1 5, 0,
chr2L 140 145 None 255 - 140 145 0,0,0 1 5, 0,
chr2L 150 155 None 255 - 150 155 0,0,0 1 5, 0,
chr2L 210 215 None 255 + 210 215 0,0,0 1 5, 0,
chr2L 70 75 None 255 + 70 75 0,0,0 1 5, 0,
chr2L 70 75 None 255 + 70 75 0,0,0 1 5, 0,
chr2L 140 145 None 255 + 140 145 0,0,0 1 5, 0,
chr2L 140 145 None 255 + 140 145 0,0,0 1 5, 0,
chr2L 160 165 None 255 + 160 165 0,0,0 1 5, 0,
......@@ -605,6 +605,15 @@ check obs exp
rm obs exp
###########################################################
# Test that we can process a Bam file with no text in
# it's header.
############################################################
echo " intersect.new.t53...\c"
$BT intersect -a gdc.bam -b gdc.bam -bed > obs
check obs gdc_exp
rm obs
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment