Esempio n. 1
0
void ComplementFile::processHits(RecordOutputMgr *outputMgr, RecordKeyVector &hits)
{
	_outputMgr = outputMgr;
	const Record *rec = hits.getKey();

	//test for chrom change.
	const QuickString &newChrom = rec->getChrName();
	if (_currChrom != newChrom) {

		outPutLastRecordInPrevChrom();

		//if record's chrom doesn't exist in the genome file, do
		//nothing
		if (!fastForward(newChrom)) return;

		//we've switched to a new chromosome that is in both the DB
		//and genome file.
		_currStartPos = 0;
		_currChrom = newChrom;
		_outRecord.setChrName(newChrom);
	}

	int endPos = rec->getStartPos();
	printRecord(endPos);
	_currStartPos = rec->getEndPos();
}
Esempio n. 2
0
void ComplementFile::processHits(RecordOutputMgr *outputMgr, RecordKeyVector &hits)
{
	_outputMgr = outputMgr;
	const Record *rec = hits.getKey();

	//test for chrom change.
	const string &newChrom = rec->getChrName();
	if (_currChrom != newChrom) {

		outPutLastRecordInPrevChrom();

		//if record's chrom doesn't exist in the genome file, do
		//nothing
		if (!fastForward(newChrom)) return;

		//we've switched to a new chromosome that is in both the DB
		//and genome file.
		_currStartPos = 0;
		_currChrom = newChrom;
		_outRecord.setChrName(newChrom);
	}

	// warn if the record's interval is beyond the 
	// length of the chromosome
	checkCoordinatesAgainstChromLength(rec);
	
	// safe guard against the first record for the chrom
	// starting with 0.
	if (rec->getStartPos() != 0)
	{
		CHRPOS endPos = rec->getStartPos();
		printRecord(endPos);
	}
	_currStartPos = rec->getEndPos();
}
Esempio n. 3
0
bool ComplementFile::finalizeCalculations() {
	outPutLastRecordInPrevChrom();
	fastForward("");
	return true;
}
Esempio n. 4
0
void ComplementFile::giveFinalReport(RecordOutputMgr *outputMgr) {
  	_outputMgr = outputMgr;
	outPutLastRecordInPrevChrom();
	fastForward("");
}