52 currentBlock_ = iterator_->nextBlock();
53 while (currentBlock_) {
54 map<string, unsigned int> counts;
55 for (
size_t i = currentBlock_->getNumberOfSequences(); i > 0; --i) {
59 (*logstream_ <<
"SEQUENCE FILTER: remove sequence '" << species <<
"' from current block " << currentBlock_->getDescription() <<
".").endLine();
62 currentBlock_->getAlignment().removeSequence(i - 1);
68 bool test = currentBlock_->getNumberOfSequences() == 0;
72 (*logstream_ <<
"SEQUENCE FILTER: block " << currentBlock_->getDescription() <<
" is now empty. Try to get the next one.").endLine();
76 test = strict_ && (counts.size() != species_.size());
79 (*logstream_ <<
"SEQUENCE FILTER: block " << currentBlock_->getDescription() <<
" does not contain all species and will be ignored. Try to get the next one.").endLine();
85 map<string, unsigned int>::iterator it;
86 for (it = counts.begin(); it != counts.end() && !(test = it->second > 1); it++) {}
89 (*logstream_ <<
"SEQUENCE FILTER: block " << currentBlock_->getDescription() <<
" has two sequences for species '" << it->first <<
"' and will be ignored. Try to get the next one.").endLine();
102 currentBlock_ = iterator_->nextBlock();
105 return currentBlock_;
A synteny block data structure, the basic unit of a MAF alignement file.
const MafSequence & getSequence(const std::string &name) const
const std::string & getSpecies() const
MafBlock * analyseCurrentBlock_()