MCPcopy Create free account
hub / github.com/arq5x/bedtools2 / giveFinalReport

Method giveFinalReport

src/coverageFile/coverageFile.cpp:77–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77void CoverageFile::giveFinalReport(RecordOutputMgr *outputMgr) {
78
79 //only give report for histogram option
80 if (upCast(_context)->getCoverageType() != ContextCoverage::HIST) {
81 return;
82 }
83
84
85 for (depthMapType::iterator iter = _finalDepthMap.begin(); iter != _finalDepthMap.end(); iter++) {
86 size_t depth = iter->first;
87 size_t basesAtDepth = iter->second;
88 //cout << "x\n";
89 float depthPct = (float)basesAtDepth / (float)_totalQueryLen;
90 //cout << "y\n";
91 ostringstream s;
92 s << "all\t";
93 s << depth;
94 s << "\t";
95 s << basesAtDepth;
96 s << "\t";
97 s << _totalQueryLen;
98 s << "\t";
99 char *depthPctString;
100 asprintf(&depthPctString, "%0.7f", depthPct);
101 s << depthPctString;
102 _finalOutput = s.str();
103
104 outputMgr->printRecord(NULL, _finalOutput);
105 }
106}
107
108void CoverageFile::makeDepthCount(RecordKeyVector &hits) {
109 const Record *key = hits.getKey();

Callers

nothing calls this directly

Calls 5

getCoverageTypeMethod · 0.80
strMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
printRecordMethod · 0.45

Tested by

no test coverage detected