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 | |
| import sys | |
| ''' | |
| python gen-curl-oti.py template.txt studies.txt | |
| where studies.txt is the list of studies used in synthesis. | |
| and template is a cURL call with XYZ inplace of the study id (and no other XYZ) | |
| cURL | |
| ''' |
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 os | |
| import json | |
| import codecs | |
| dn = sys.argv[1] | |
| outfn = sys.argv[2] | |
| d = {} | |
| for s in os.listdir(dn): | |
| if s.endswith('.out'): |
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 | |
| from collections import defaultdict | |
| import dendropy | |
| import sys | |
| import os | |
| _SCRIPT_NAME = os.path.split(sys.argv[0])[-1] | |
| def error(msg): | |
| sys.stderr.write('{}: Error: {}\n'.format(_SCRIPT_NAME, msg)) | |
| OUT = sys.stdout |
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/bash | |
| echo 'This script installs the tools needed for propinquity as subdirectories' | |
| echo 'of the working directory. This assumes that you have a C++ dev environment (g++, boost, automake, libtool)' | |
| echo 'installed. See README files for propinquity and otcetera if those builds fail' | |
| echo 'Also assumes virtualenv for python' | |
| CONTEXT_DIR="${PWD}" | |
| virtualenv propinquity-env | |
| source propinquity-env/bin/activate |
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 | |
| def get_tree(r): | |
| tree_str = "((C:1.3,D:4.)34:0.034,(A:1.1,(B:1.2,X:1.6)26:0.026)12:0.0126,E:1.5);" | |
| tree = dendropy.Tree.get( | |
| data=tree_str, | |
| schema="newick", | |
| rooting=r, |
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 | |
| from __future__ import print_function | |
| from peyotl.api import PhylesystemAPI | |
| import sys | |
| studyid = sys.argv[1] | |
| phy = PhylesystemAPI(get_from='local') | |
| nx = phy.get_study(studyid)['data']['nexml'] | |
| print(nx.keys()) |
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/bash | |
| cd ~ | |
| mkdir OpenTree | |
| cd OpenTree/ | |
| git clone https://github.com/mtholder/propinquity.git | |
| echo '[opentree]' > ~/.opentree | |
| echo "home = $PWD" >> ~/.opentree | |
| echo 'peyotl = %(home)s/peyotl' >> ~/.opentree |
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 | |
| try: | |
| annot_fp = sys.argv[1] | |
| except: | |
| sys.exit("Expecting a path to an annotations.json file as the only argument.\n") | |
| import json | |
| import codecs | |
| with codecs.open(annot_fp, 'rU', encoding='utf-8') as inp: | |
| obj = json.load(inp) |
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
| \documentclass{article} | |
| \usepackage{amsmath} | |
| \usepackage{paralist} | |
| \DeclareMathOperator*{\argmin}{argmin} | |
| \begin{document} | |
| \section*{Note on detecting whether a pattern is parsimony informative} | |
| Let $\ell(T, c)$ be the unordered parsimony length of discrete character pattern $c$ on | |
| tree $T$ and $\ell(T, c, i)$ be the parsimony length that combination of pattern and tree | |
| when state $i$ is enforced as the state for the root of the tree. | |
| Data pattern $c$ is ``parsimony informative'' if and only if, |
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/bash | |
| # works on the unpacked dir that is posted under the link | |
| # text "All pipeline outputs " on the release page. | |
| # E.g. the release page https://tree.opentreeoflife.org/about/synthesis-release/v9.1 | |
| # points to http://files.opentreeoflife.org/synthesis/opentree9.1/opentree9.1_output.tgz | |
| # as its versions of "All pipeline outputs" | |
| # | |
| # I downloaded that, unpacked it, and provide the path to that dir as the only | |
| # argument to this script. |