This file contains 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 | |
for repo in api.opentreeoflife.org deployed-systems gcmdr opentree ot-base oti ott peyotl phylografter taxomachine reference-taxonomy treemachine ; | |
do | |
for suffix in .java .py .sh | |
do | |
find "$OPEN_TREE_REPO_ROOT/$repo" -name "*$suffix" -exec grep -H $@ {} \; | sed -e "s+$OPEN_TREE_REPO_ROOT/++" | |
done | |
done |
This file contains 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 | |
from peyotl.api.phylografter import Phylografter | |
pg = Phylografter() | |
for study_id in sys.argv[1:]: | |
pg.fetch_study(study_id, study_id + '.json') |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.nexml.org/2009" | |
xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns="http://www.nexml.org/2009" | |
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sawsdl="http://www.w3.org/ns/sawsdl" | |
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
xmlns:xhtml="http://www.w3.org/1999/xhtml/datatypes/" elementFormDefault="qualified"> | |
<!-- <xs:annotation> | |
<xs:documentation> | |
This module defines annotations that can be attached to |
This file contains 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 | |
from peyotl.api import APIWrapper | |
aw = APIWrapper(phylesystem_api_kwargs={'get_from':'api'}) | |
pa = aw.phylesystem_api | |
o = aw.oti | |
for line in open(sys.argv[1], 'rU'): | |
ls = line.strip() | |
if '_' in ls: | |
continue |
This file contains 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 | |
from peyotl.api.taxomachine import Taxomachine | |
taxomachine = Taxomachine() | |
from peyotl.nexson_syntax import write_as_json | |
context_name = 'All life' | |
for n in sys.argv[1:]: | |
if n.startswith('-c'): | |
context_name = n[2:] | |
else: |
This file contains 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 | |
from peyotl.api.taxomachine import Taxomachine | |
taxomachine = Taxomachine() | |
from peyotl.nexson_syntax import write_as_json | |
context_name = 'All life' | |
for n in sys.argv[1:]: | |
if n.startswith('-c'): | |
context_name = n[2:] | |
else: |
This file contains 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 re | |
_SCRIPT_NAME = os.path.split(sys.argv[0])[-1] | |
_FORBIDDEN = re.compile(r'[^- 0-9a-zA-Z`~@#$%^&*()_+={}|\\\[\]:;"\'<,>.?/]') | |
_NEEDS_QU_PUNC_STR = r'[\[\]():,;]' | |
_NEEDS_QUOTES_PATTERN = re.compile(r'(\s|' + _NEEDS_QU_PUNC_STR + ')') | |
_NEEDS_QUOTES_PUNC_PATTERN = re.compile(_NEEDS_QU_PUNC_STR) | |
_SINGLE_QUOTE = "'" |
This file contains 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 | |
# vim: set fileencoding=utf-8 : | |
import sys | |
import os | |
import re | |
u''' | |
Unicode char lists found by running against ott2.8 | |
Using the names column in taxonomy.tsv required allowing the | |
following unicode characters: | |
æ denoted: u'\xe6' |
This file contains 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 | |
if ! which ott_names_to_newick.py >/dev/null 2>&1 | |
then | |
echo 'Download ott_names_to_newick.py from https://gist.github.com/mtholder/ac58ab1b3c6a962b9bdc and put it on your PATH' | |
exit 1 | |
fi | |
echo 'grabbing names from taxonomy' | |
set -x | |
awk 'BEGIN { FS = "\t\\|\t" } ; {print $3 }' taxonomy.tsv >names.txt | |
awk 'BEGIN { FS = "\t\\|\t" } ; {print $6 }' taxonomy.tsv >uniqnames.txt |
This file contains 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 codecs | |
import sys | |
chars = set() | |
for filepath in sys.argv[1:]: | |
with codecs.open(filepath, 'r', encoding='utf-8') as fo: | |
for line in fo: | |
chars.update(iter(line)) | |
c = list(chars) | |
c.sort() |
OlderNewer