| 75 | } |
| 76 | |
| 77 | void 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 | |
| 108 | void CoverageFile::makeDepthCount(RecordKeyVector &hits) { |
| 109 | const Record *key = hits.getKey(); |
nothing calls this directly
no test coverage detected