public TreeBipartition getBipartition(TreeNode node) {
    	if (! internalNodes.contains(node) && ! externalNodes.contains(node)) {
    		throw new IllegalArgumentException("that node doesn't seem to be in the tree");
    	}
		Set<TreeNode> outgroup = new HashSet<TreeNode>();
		for (JadeNode t : externalNodes) {
			outgroup.add((TreeNode) t);
		}
		Set<TreeNode> ingroup = new HashSet<TreeNode>();
		for (TreeNode l : node.getDescendantLeaves()) {
			ingroup.add(l);
			outgroup.remove(l);
		}
		return new TreeBipartition(ingroup, outgroup);
    }