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
| #!/bin/sh | |
| set -x | |
| wget http://pypi.python.org/packages/source/D/DendroPy/DendroPy-3.11.0.tar.gz | |
| tar xfvz DendroPy-3.11.0.tar.gz | |
| cd DendroPy-3.11.0 | |
| python setup.py install | |
| cd extras/geodispersal/ | |
| python geodispersal-analysis.py LiebermanEBasidechenella.nex LiebermanEBasidechenella.nex --labels=labels.txt --paup --vicariance=vic --dispersal=disp | |
| cat Readme.txt |
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 | |
| '''Takes a MrBayes .t file and writes (to standard out) a .p file with | |
| the parameters being the edge lengths for each of the Terminal edges. | |
| This .p file can be used with Tracer http://tree.bio.ed.ac.uk/software/tracer/ | |
| or other MCMC diagnostics files. | |
| Example invocation with redirection to a file called term_edges_myrun.p : | |
| python terminal_edges_to_dot_p.py myrun.t > term_edges_myrun.p |
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
| import sys | |
| import dendropy | |
| from copy import copy | |
| threshold = float(sys.argv[1]) | |
| filename_list = sys.argv[2:] | |
| SCRIPT_NAME = 'conflict_viz' | |
| def debug(*valist): | |
| msg = ' '.join([str(i) for i in valist]) | |
| sys.stderr.write(SCRIPT_NAME + ': ' + msg + '\n') |
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 sys | |
| import dendropy | |
| if __name__ == '__main__': | |
| from optparse import OptionParser | |
| from optparse import OptionGroup | |
| import sys, os | |
| _script_name = os.path.split(sys.argv[0])[1] |
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 | |
| def balanced_tree(n, level): | |
| if level == 0: | |
| return n + 1, 't%d' % n | |
| n, leftsub = balanced_tree(n, level - 1) | |
| n, rightsub = balanced_tree(n, level - 1) | |
| return n, '(%s,%s)' % (leftsub, rightsub) | |
| if __name__ == '__main__': | |
| import sys |
NewerOlder