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

Fixed bug157: ties not prevented by -iu/-id

parent 26618897
No related branches found
No related tags found
No related merge requests found
......@@ -331,7 +331,7 @@ void CloseSweep::finalizeSelections(int dbIdx, RecordKeyVector &retList) {
}
if (downStreamDist == upStreamDist) {
if (abs(downStreamDist) == abs(upStreamDist)) {
if (tieMode == ContextClosest::FIRST_TIE) {
retList.push_back(upRecs[0]);
_finalDistances.push_back(upStreamDist);
......
chr1 10 20 a1 1 -
chr1 8 9 b1 1 +
chr1 21 22 b2 1 -
......@@ -599,6 +599,37 @@ $BT closest -a d.bed -b d_id.bed -D ref -id > obs
check exp obs
rm exp obs
##########################################################
# check ties, single db
###########################################################
echo " closest.t52...\c"
echo \
"chr1 10 20 a1 1 - chr1 8 9 b1 1 +
chr1 10 20 a1 1 - chr1 21 22 b2 1 -" > exp
$BT closest -a bug157_a.bed -b bug157_b.bed > obs
check exp obs
rm exp obs
##########################################################
# check ties, single db, -iu
###########################################################
echo " closest.t53...\c"
echo \
"chr1 10 20 a1 1 - chr1 21 22 b2 1 - 2" > exp
$BT closest -a bug157_a.bed -b bug157_b.bed -D ref -iu > obs
check exp obs
rm exp obs
##########################################################
# check ties, single db, -id
###########################################################
echo " closest.t54...\c"
echo \
"chr1 10 20 a1 1 - chr1 8 9 b1 1 + -2" > exp
$BT closest -a bug157_a.bed -b bug157_b.bed -D ref -id > obs
check exp obs
rm exp obs
cd sortAndNaming
bash test-sort-and-naming.sh
......
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