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

Fixed bug where name conventions weren't tested for unsorted data; stopped...

Fixed bug where name conventions weren't tested for unsorted data; stopped namecheck on unmapped bam records
parent 5d0f1362
......@@ -98,6 +98,7 @@ bool IntersectFile::nextUnsortedFind(RecordKeyVector &hits)
if (queryRecord == NULL) {
continue;
} else {
_context->testNameConventions(queryRecord);
hits.setKey(queryRecord);
_binTree->getHits(queryRecord, hits);
return true;
......
......@@ -650,7 +650,9 @@ bool ContextBase::parseIoBufSize(QuickString bufStr)
}
void ContextBase::testNameConventions(const Record *record) {
if (getNameCheckDisabled() || _nameConventionWarningTripped) return;
//Do nothing if using the -nonamecheck option,
//warning already given, or record is unmapped BAM record
if (getNameCheckDisabled() || _nameConventionWarningTripped || record->isUnmapped()) return;
int fileIdx = record->getFileIdx();
......
......@@ -537,16 +537,15 @@ check exp obs
rm exp obs
##################################################################
# see that -nonamecheck only works for sorted data
# NOTE: This test is now deprecated, as the -nonamecheck option
# must also now work with unsorted data
# see that naming conventions are tested with unsorted data.
##################################################################
echo " intersect.t44...\c"
echo ok
#"***** ERROR: -nonamecheck option is only valid for sorted input. *****" > exp
#$BT intersect -a nonamecheck_a.bed -b nonamecheck_b.bed -nonamecheck 2>&1 > /dev/null | cat - | head -2 | tail -1 > obs
#check exp obs
#rm exp obs
echo \
"***** WARNING: File nonamecheck_a.bed has a record where naming convention (leading zero) is inconsistent with other files:
chr1 10 20" > exp
$BT intersect -a nonamecheck_a.bed -b nonamecheck_b.bed 2>&1 > /dev/null | cat - | head -2 > 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