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

Merge pull request #168 from nkindlon/master

Fixed bug167: stranded chromsweep wasn't working
parents 2f4d319b 9d4ed4c7
No related branches found
No related tags found
No related merge requests found
......@@ -129,7 +129,7 @@ void NewChromSweep::scanCache(int dbIdx, RecordKeyVector &retList) {
if (_currQueryRec->sameChrom(cacheRec) && !_currQueryRec->after(cacheRec)) {
if (intersects(_currQueryRec, 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();
}
else {
......@@ -150,6 +150,7 @@ void NewChromSweep::clearCache(int dbIdx)
}
void NewChromSweep::masterScan(RecordKeyVector &retList) {
for (int i=0; i < _numDBs; i++) {
if (dbFinished(i) || chromChange(i, retList, true)) {
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 |
check 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
......
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