Skip to content
Snippets Groups Projects
Commit 9d4ed4c7 authored by Neil Kindlon's avatar Neil Kindlon
Browse files

Fixed bug167: stranded chromsweep wasn't working

parent 4983727f
No related branches found
No related tags found
No related merge requests found
...@@ -129,7 +129,7 @@ void NewChromSweep::scanCache(int dbIdx, RecordKeyVector &retList) { ...@@ -129,7 +129,7 @@ void NewChromSweep::scanCache(int dbIdx, RecordKeyVector &retList) {
if (_currQueryRec->sameChrom(cacheRec) && !_currQueryRec->after(cacheRec)) { if (_currQueryRec->sameChrom(cacheRec) && !_currQueryRec->after(cacheRec)) {
if (intersects(_currQueryRec, cacheRec)) { if (intersects(_currQueryRec, cacheRec)) {
retList.push_back(cacheRec); retList.push_back(cacheRec);
} else break; // cacheRec is after the query rec, stop scanning. } else if (cacheRec->after(_currQueryRec)) break; // cacheRec is after the query rec, stop scanning.
cacheIter = _caches[dbIdx].next(); cacheIter = _caches[dbIdx].next();
} }
else { else {
...@@ -150,6 +150,7 @@ void NewChromSweep::clearCache(int dbIdx) ...@@ -150,6 +150,7 @@ void NewChromSweep::clearCache(int dbIdx)
} }
void NewChromSweep::masterScan(RecordKeyVector &retList) { void NewChromSweep::masterScan(RecordKeyVector &retList) {
for (int i=0; i < _numDBs; i++) { for (int i=0; i < _numDBs; i++) {
if (dbFinished(i) || chromChange(i, retList, true)) { if (dbFinished(i) || chromChange(i, retList, true)) {
continue; continue;
......
chr1 9550913 9551859 b.C.1 0 -
chr1 9550913 9621173 b 1 -
chr1 9551859 9553903 b.I.1 0 -
chr1 9553903 9553952 b.C.2 0 -
chr1 9553952 9609630 b.I.2 0 -
chr1 9602747 9603392 f.I.1 0 +
chr1 9603392 9603555 f.C.2 0 +
chr1 9603392 9603555 g.C.3 0 +
chr1 9603555 9609916 f.I.2 0 +
chr1 9603555 9609916 g.I.3 0 +
...@@ -502,7 +502,25 @@ $BT intersect -a a.bed -b b.bed -f 1.00001 2>&1 > /dev/null | cat - | head -2 | ...@@ -502,7 +502,25 @@ $BT intersect -a a.bed -b b.bed -f 1.00001 2>&1 > /dev/null | cat - | head -2 |
check exp obs check exp obs
rm exp obs rm exp obs
##################################################################bug167_strandSweep.bed
# Test that -s works with chromsweep
##################################################################
echo " intersect.t41...\c"
echo \
"22" > exp
$BT intersect -a bug167_strandSweep.bed -b bug167_strandSweep.bed -sorted -s -wa -wb | wc -l > obs
check exp obs
rm exp obs
##################################################################bug167_strandSweep.bed
# Test that -S works with chromsweep
##################################################################
echo " intersect.t42...\c"
echo \
"20" > exp
$BT intersect -a bug167_strandSweep.bed -b bug167_strandSweep.bed -sorted -S -wa -wb | wc -l > obs
check exp obs
rm exp obs
rm one_block.bam two_blocks.bam three_blocks.bam rm one_block.bam two_blocks.bam three_blocks.bam
......
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