Created
August 26, 2010 03:56
-
-
Save jeetsukumaran/550774 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
import dendropy | |
from dendropy import treesplit | |
from dendropy.interop import paup | |
trees = dendropy.TreeList.get_from_path('smallwt.nex', 'nexus') | |
taxa = trees.taxon_set | |
tax_labels, bipartitions, bipartition_counts, bipartition_freqs = paup.bipartitions("weightedtrees.taxa.nex", "weightedtrees.nex", use_tree_weights=True) | |
split_dists_paup = paup.build_split_distribution(bipartition_counts, | |
tree_count=len(trees), | |
taxon_set=taxa, | |
is_rooted=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment