Skip to content

Instantly share code, notes, and snippets.

@mtholder
Created May 23, 2022 20:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mtholder/b04aeae9cb571a02d3f6e6efc104eaff to your computer and use it in GitHub Desktop.
Save mtholder/b04aeae9cb571a02d3f6e6efc104eaff to your computer and use it in GitHub Desktop.
grab the newick trees from timetree for your personal research and teaching use. Assumes https://gist.github.com/mtholder/615f1f77af9b7db8f0f9220fa514ab07 in same dir
#!/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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment