42 #include <Bpp/Seq/DistanceMatrix.h> 50 if (!block.hasProperty(distanceProperty_))
51 throw Exception(
"DistanceBasedPhylogenyReconstructionMafIterator::buildTreeForBlock. No property available for " + distanceProperty_);
53 const DistanceMatrix& dist =
dynamic_cast<const DistanceMatrix&
>(block.getProperty(distanceProperty_));
54 builder_->setDistanceMatrix(dist);
55 builder_->computeTree();
56 Tree* tree = builder_->getTree();
58 throw Exception(
"DistanceBasedPhylogenyReconstructionMafIterator::buildTreeForBlock. Tree reconstruction failed!");
60 }
catch (bad_cast& e) {
61 throw Exception(
"DistanceBasedPhylogenyReconstructionMafIterator::buildTreeForBlock. A property was found for '" + distanceProperty_ +
"' but does not appear to contain a distance matrix.");
Tree * buildTreeForBlock(const MafBlock &block)