From 404ea83ee6e81411bea0ea39f852bb7e68767a8e Mon Sep 17 00:00:00 2001 From: Derek Date: Thu, 21 Oct 2010 15:00:03 -0400 Subject: [PATCH] Fixed NoIndexCaching behavior * Previous commit lacked the post-jump dump of index data when this mode is selected. --- src/api/BamIndex.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/api/BamIndex.cpp b/src/api/BamIndex.cpp index 222d96d..e47fd28 100644 --- a/src/api/BamIndex.cpp +++ b/src/api/BamIndex.cpp @@ -635,6 +635,12 @@ bool BamStandardIndex::BamStandardIndexPrivate::GetOffsets(const BamRegion& regi // set flag & return success *hasAlignmentsInRegion = (offsets.size() != 0 ); + + // if cache mode set to none, dump the data we just loaded + if (m_parent->m_cacheMode == BamIndex::NoIndexCaching ) + ClearReferenceOffsets(region.LeftRefID); + + // return succes return true; } @@ -1634,6 +1640,12 @@ bool BamToolsIndex::BamToolsIndexPrivate::GetOffset(const BamRegion& region, int // set flag based on whether an index entry was found for this region *hasAlignmentsInRegion = ( indexIter != indexEnd ); + + // if cache mode set to none, dump the data we just loaded + if (m_parent->m_cacheMode == BamIndex::NoIndexCaching ) + ClearReferenceOffsets(region.LeftRefID); + + // return success return true; } -- 2.39.5