Skip to content

Commit 467e8bd

Browse files
committed
Delly v0.6.3
1 parent d23262a commit 467e8bd

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/coverage.h

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,19 +104,15 @@ inline void
104104
annotateCoverage(TFiles const& files, uint16_t minMapQual, TSampleLibrary& sampleLib, TSVs& svs, TCountMap& countMap, TBpLevelType bpLevel, TCoverageType covType)
105105
{
106106
typedef typename TSVs::value_type TSV;
107-
typedef typename TCountMap::key_type TSampleSVPair;
108107

109-
// Get the references
110-
BamTools::BamReader readerRef;
111-
if ( ! readerRef.Open(files[0].string()) ) return;
112-
BamTools::RefVector references = readerRef.GetReferenceData();
108+
// For alignment midpoint, maximum read-length
109+
int32_t maxReadLen = 1000;
113110

114111
// Sort Structural Variants
115112
sort(svs.begin(), svs.end(), SortSVs<TSV>());
116113

117114
// Initialize count maps
118-
int32_t maxReadLen = 1000;
119-
for(typename TSampleLibrary::iterator sIt = sampleLib.begin(); sIt!=sampleLib.end();++sIt) {
115+
for(typename TSampleLibrary::iterator sIt = sampleLib.begin(); sIt!=sampleLib.end(); ++sIt) {
120116
for(typename TSVs::const_iterator itSV = svs.begin(); itSV!=svs.end(); ++itSV) {
121117
countMap.insert(std::make_pair(std::make_pair(sIt->first, itSV->id), std::make_pair(0,0)));
122118
}
@@ -231,6 +227,7 @@ annotateCoverage(TFiles const& files, uint16_t minMapQual, TSampleLibrary& sampl
231227
// Store counts
232228
#pragma omp critical
233229
{
230+
typedef typename TCountMap::key_type TSampleSVPair;
234231
TSampleSVPair svSample = std::make_pair(sampleName, itSV->id);
235232
typename TCountMap::iterator countMapIt=countMap.find(svSample);
236233
//std::cerr << itSV->id << ':' << cumBpSum << ',' << cumReadSum << std::endl;

0 commit comments

Comments
 (0)