47 MafBlock* SequenceStreamToMafIterator::analyseCurrentBlock_()
49 unique_ptr<MafBlock> block(
new MafBlock());
52 if (stream_->eof())
return 0;
54 seqStream_->nextSequence(*stream_, mafSeq);
61 unsigned int start = TextTools::to<unsigned int>(st.
nextToken());
62 if (!zeroBasedCoords_)
65 unsigned int length = TextTools::to<unsigned int>(st.
nextToken());
66 mafSeq.
setName(species +
"." + chr);
69 if (mafSeq.
size() != length)
70 throw Exception(
"SequenceStreamToMafIterator::analyseCurrentBlock_. Sequence size does not match its header specification: expected " + TextTools::toString(length) +
" and found " + TextTools::toString(mafSeq.
size()));
72 block->addSequence(mafSeq);
74 return block.release();
virtual size_t size() const=0
A synteny block data structure, the basic unit of a MAF alignement file.
A sequence class which is used to store data from MAF files.
void setName(const std::string &name)
void setStart(size_t begin)
const std::string & getName() const
size_t numberOfRemainingTokens() const
const std::string & nextToken()