Commit f5927cf6 authored by Neil Kindlon's avatar Neil Kindlon
Browse files

Fixed bug262: stranded map with BedPlus

parent b6f8ff74
......@@ -70,6 +70,13 @@ const QuickString &BedPlusInterval::getField(int fieldNum) const
{
if (fieldNum > _numFixedFields) {
return _plusFields.getField(fieldNum);
} else if (fieldNum == 4 && _numFixedFields >=4) {
return _name;
} else if (fieldNum == 5 && _numFixedFields >=5) {
return _score;
}
else if (fieldNum == 6 && _numFixedFields >=6) {
return _strand;
}
return Bed3Interval::getField(fieldNum);
}
......
......@@ -31,6 +31,7 @@ public:
protected:
QuickString _varRef;
QuickString _varAlt;
static const int numFixedFields = 6;
void printOtherFields(QuickString &outBuf) const;
};
......
1 3215742 3216021 . 0 -
1 3217007 3218115 . 0 -
1 3215742 3216021 . 1 - 0 0 3
1 3217007 3218115 . 1 - 0 0 1
......@@ -808,3 +808,32 @@ chr1 15000 20000 11.44444444" > exp
$BT map -a d.bed -b fullFields.bam -c 5 -o mean > obs
check exp obs
rm exp obs
###########################################################
# Bug 262: Test stranded map with BedPlus records.
# -s (lowercase) should give results
############################################################
echo " map.t54...\c"
echo \
"1 3215742 3216021 . 0 - 1
1 3217007 3218115 . 0 - 1" > exp
$BT map -a bug262_a.bed -b bug262_b.bed -s > obs
check exp obs
rm exp obs
###########################################################
# Bug 262: Test stranded map with BedPlus records.
# -S (uppercase) should NOT give results
############################################################
echo " map.t55...\c"
echo \
"1 3215742 3216021 . 0 - .
1 3217007 3218115 . 0 - ." > exp
$BT map -a bug262_a.bed -b bug262_b.bed -S > obs
check exp obs
rm exp obs
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment