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

Method doDefault

src/coverageFile/coverageFile.cpp:217–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215}
216
217void CoverageFile::doDefault(RecordOutputMgr *outputMgr, RecordKeyVector &hits)
218{
219 size_t nonZeroBases = _queryLen - countBasesAtDepth(0);
220 float coveredFraction = (float)nonZeroBases / (float)_queryLen;
221
222 ostringstream s;
223 s << _hitCount;
224 s << "\t";
225 s << nonZeroBases;
226 s << "\t";
227 s << _queryLen;
228 s << "\t";
229 char *coveredFractionString;
230 asprintf(&coveredFractionString, "%0.7f", coveredFraction);
231 s << coveredFractionString;
232 _finalOutput = s.str();
233 outputMgr->printRecord(hits.getKey(), _finalOutput);
234}
235
236void CoverageFile::checkSplits(RecordKeyVector &hitSet)
237{

Callers

nothing calls this directly

Calls 3

strMethod · 0.80
printRecordMethod · 0.45
getKeyMethod · 0.45

Tested by

no test coverage detected