Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
R3
legacy
bedtools2
Commits
9d4ed4c7
Commit
9d4ed4c7
authored
Jan 07, 2015
by
Neil Kindlon
Browse files
Fixed bug167: stranded chromsweep wasn't working
parent
4983727f
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/utils/NewChromsweep/NewChromsweep.cpp
View file @
9d4ed4c7
...
...
@@ -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
;
...
...
test/intersect/bug167_strandSweep.bed
0 → 100644
View file @
9d4ed4c7
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 +
test/intersect/test-intersect.sh
View file @
9d4ed4c7
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment