public void addTaxon(int parent, int taxid, String name, MCSample sample, float bl) {
TaxonHolder<UnifracTaxon> parentHolder = taxonMap.get(parent);
if (parentHolder == null) {
throw new IllegalArgumentException("Couldn't find parent taxon id=" + parent);
}
UnifracTaxon parentTaxon = parentHolder.getTaxon();
TaxonHolder<UnifracTaxon> holder = taxonMap.get(taxid);
if (holder == null) {
holder = new TaxonHolder(new UnifracTaxon(taxid, name, "", bl), parentHolder);
UnifracTaxon t = holder.getTaxon();
if (sample != null) {
//xxxxx
t.incCount(sample, 1);
}
parentHolder.addChild(holder);
if (leaves.contains(parentTaxon.getTaxid())) {
leaves.remove(parentTaxon.getTaxid());
}
leaves.add(t.getTaxid());
taxonMap.put(t.getTaxid(), holder);
}
}