Skip to content

Instantly share code, notes, and snippets.

@jeetsukumaran
Created August 26, 2010 03:56
Show Gist options
  • Save jeetsukumaran/550774 to your computer and use it in GitHub Desktop.
Save jeetsukumaran/550774 to your computer and use it in GitHub Desktop.
#! /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