| 58 | } |
| 59 | |
| 60 | void SampleFile::giveFinalReport(RecordOutputMgr *outputMgr) { |
| 61 | if (_currRecordNum < _numSamples) { |
| 62 | //die with error; |
| 63 | cerr << "\n***** ERROR: Input file has fewer records than the requested number of output records. *****" << endl << endl; |
| 64 | exit(1); |
| 65 | } |
| 66 | |
| 67 | //If the output type is BAM, must sort the output records. |
| 68 | if (_context->getOutputFileType() == FileRecordTypeChecker::BAM_FILE_TYPE) { |
| 69 | sort(_samples.begin(), _samples.end(), SampleRecordLtFn); |
| 70 | } |
| 71 | // Now output all the kept records, then do cleanup. |
| 72 | for (size_t i=0; i < _numSamples; i++) { |
| 73 | outputMgr->printRecord(_samples[i]); |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | bool SampleFile::keepRecord(Record *record) |
| 78 | { |
nothing calls this directly
no test coverage detected