Skip to content
Snippets Groups Projects
Commit 6d3c94d1 authored by nkindlon's avatar nkindlon
Browse files

Fixed chromId bug, removed debug metric from RecordOutputMgr

parent c1ce3e72
No related branches found
No related tags found
No related merge requests found
......@@ -111,6 +111,10 @@ bool Context::parseCmdArgs(int argc, char **argv, int skipFirstArgs) {
}
if (strcmp(argv[i], "-i") == 0) {
if (argc <= i+1) {
_errorMsg = "Error: -i option given, but no input file specified.";
return false;
}
addInputFile(argv[i+1]);
markUsed(i - skipFirstArgs);
i++;
......
......@@ -133,9 +133,8 @@ Record *FileRecordMgr::allocateAndGetNextRecord()
//test for sorted order, if necessary.
if (_context->getSortedInput()) {
testInputSortOrder(record);
} else {
assignChromId(record);
}
assignChromId(record);
_totalRecordLength += (unsigned long)(record->getEndPos() - record->getStartPos());
return record;
}
......
......@@ -28,8 +28,7 @@ RecordOutputMgr::RecordOutputMgr()
: _context(NULL),
_printable(true),
_bamWriter(NULL),
_currBlockList(NULL),
_numWrites(0)
_currBlockList(NULL)
{
}
......@@ -38,9 +37,7 @@ RecordOutputMgr::~RecordOutputMgr()
{
if (_outBuf.size() > 0) {
flush();
_numWrites++;
}
cerr << "Total number of buffer writes was " << _numWrites << endl;
if (_bamWriter != NULL) {
_bamWriter->Close();
delete _bamWriter;
......@@ -112,7 +109,6 @@ void RecordOutputMgr::printRecord(RecordKeyList &keyList, RecordKeyList *blockLi
{
if (needsFlush()) {
flush();
_numWrites++;
}
//The first time we print a record is when we print any header, because the header
......
......@@ -40,7 +40,6 @@ private:
RecordKeyList *_currBlockList;
QuickString _outBuf;
int _numWrites;
//some helper functions to neaten the code.
void tab() { _outBuf.append('\t'); }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment