Exemplo n.º 1
0
 private void computeNodeToRestrictionMap() {
   Arrays.fill(partialsMap, null);
   for (Set<String> taxonNames : partialsRestrictions.keySet()) {
     NodeRef node = Tree.Utils.getCommonAncestorNode(treeModel, taxonNames);
     partialsMap[node.getNumber()] = partialsRestrictions.get(taxonNames);
   }
 }
Exemplo n.º 2
0
  /** @return the ancestral state of the MRCA node. */
  public String getAncestralState() {

    NodeRef node = Tree.Utils.getCommonAncestorNode(tree, leafSet);
    if (node == null) throw new RuntimeException("No node found that is MRCA of " + leafSet);
    return ancestralTrait.getTraitString(tree, node);
  }