void printChildren(ostream& os, AlignmentConstPtr alignment, const string& genomeName) { vector<string> children = alignment->getChildNames(genomeName); for (size_t i = 0; i < children.size(); ++i) { os << children[i]; if (i != children.size() - 1) { os << " "; } } os << endl; }
void hal::validateAlignment(AlignmentConstPtr alignment) { deque<string> bfQueue; bfQueue.push_back(alignment->getRootName()); while (bfQueue.empty() == false) { string name = bfQueue.back(); bfQueue.pop_back(); if (name.empty() == false) { const Genome* genome = alignment->openGenome(name); if (genome == NULL) { throw hal_exception("Failure to open genome " + name); } validateGenome(genome); vector<string> childNames = alignment->getChildNames(name); for (size_t i = 0; i < childNames.size(); ++i) { bfQueue.push_front(childNames[i]); } } } }