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 | |
# | |
# Master script using MTH's hard-coded paths used to create darwin core | |
# archives | |
# Requires do-dwca-export.sh available from https://gist.github.com/mtholder/f733a75fe1616af1841ded62aadb4f04 | |
# See also https://github.com/SpeciesFileGroup/2025_workshop_on_taxon_names | |
set -x | |
od=ott3.7.2-dwca |
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 | |
# | |
# This requires a build of otcetera that from any branch that incorporates: | |
# https://github.com/OpenTreeOfLife/otcetera/commit/f29521709b60ee2a4a8e754a7c3a111b22761718 | |
# As of the writing of this gist that is only the dwca-dump of otcetera | |
# See also https://github.com/SpeciesFileGroup/2025_workshop_on_taxon_names | |
set -x | |
od="${1}" | |
inp="${2}" |
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 | |
set -x | |
d=prev-`date +"%d-%b-%Y"` | |
if ! test -d "$d" ; then | |
mkdir "$d" || exit | |
fi | |
if ! test -d "${d}/results" ; then | |
mkdir "${d}/results" || exit | |
fi | |
if ! test -d "${d}/wrappers" ; then |
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 | |
curl 'http://www.timetree.org/references' > studies.html | |
grep citation_data studies.html | sed -E 's:.*citation_data/::' | sed -E 's/".*//' > ids.txt | |
for i in `cat ids.txt` ; do | |
echo $i | |
if ! test -f "${i}.tre" ; then | |
python grab.py "$i" > "${i}.tre" || exit 1 | |
fi | |
sleep 2 | |
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 requests | |
import sys | |
durl = 'http://www.timetree.org/ajax/newick/publishedtree/download' | |
for i in sys.argv[1:]: | |
url = 'http://www.timetree.org/api/widget/citation_data/{i}'.format(i=i) | |
s = requests.Session() | |
r = s.get(url) | |
nr = s.post(durl, data={'export': 'newick', 'rank': 'na'}) | |
nr.raise_for_status() |
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 ! test -d cruft ; then | |
mkdir cruft | |
fi | |
for i in ott*.tre ; do | |
j=`echo ${i} | sed -E 's/^ott//' | sed -E 's/\.tre//'` | |
echo $j >&2 | |
tail -n1 ${i} > cruft/tax.tre | |
ntax=`otc-degree-distribution cruft/tax.tre 2>&1 | tail -n2 | head -n1 | awk '{print $1}'` | |
nsoln=`otc-degree-distribution ../subproblem_solutions/${i} 2>&1 | tail -n2 | head -n1 | awk '{print $1}'` |
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 python3 | |
"""Tool to compress tree_slice_comparison JSON | |
otc-explain-phylo-diffs writes a form of this JSON in which multiple | |
adjacent slices of the tree can have the same topology for each | |
of the two trees that were compared. | |
This tool merges adjacent slices that are not differing in topology | |
to produces a terser representation that is easier to display | |
Roughly speaking, the schema of the JSON is: |
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 | |
n="$1" | |
if test -z $n ; then | |
echo "Expecting a machine name for the opentreeoflife.org domain as first arg" | |
exit 1 | |
fi | |
if test -z $2 ; then | |
u=admin | |
else | |
u="${2}" |
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 | |
n=${1} | |
if test -z $n ; then | |
echo "Takes a number argument n that, as ot${n}.opentreeoflife.org should be the machine to update" | |
exit 1 | |
fi | |
u=${2} | |
if test -z $u ; then | |
u=admin | |
fi |
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 | |
i="${1}" | |
if test -z $i ; then | |
echo "Number like 51 for ot51 needed as an arg" | |
exit 1 | |
fi | |
echo "fetching cert from ot$i to compare to a local copy of a cert from ot50" | |
if echo | openssl s_client -servername ot${i}.opentreeoflife.org -connect ot${i}.opentreeoflife.org:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ot${i}-certificate.crt | |
diff ot50-certificate.crt ot${i}-certificate.crt ; then | |
echo "Success" |
NewerOlder