NexmlOTUWriter noc = new NexmlOTUWriter(null,getTaxonLabelHome(),getDocument());
OTUs xmlOTUs = noc.fromTreeBaseToXml(mergedLabels);
// convert phylotrees to XML trees
NexmlTreeBlockWriter ntc = new NexmlTreeBlockWriter(null,getTaxonLabelHome(),getDocument());
TreeBlock xmlTreeBlock = getDocument().createTreeBlock(xmlOTUs);
for (PhyloTree t : searchResults.getResults()) {
ntc.fromTreeBaseToXml(t, xmlTreeBlock);
}
return getDocument();
}