Skip to content

Instantly share code, notes, and snippets.

@mtholder
Created October 7, 2021 16:55
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/4714cf4849749ae3d48473bc02ef1788 to your computer and use it in GitHub Desktop.
Save mtholder/4714cf4849749ae3d48473bc02ef1788 to your computer and use it in GitHub Desktop.
Run from the subproblems subdirectory of the output of the open tree of life synthesis output to generate a TSV of # internal nds in taxonomy vs solution.
#!/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}'`
echo -e "$j\thttps://tree.opentreeoflife.org/opentree/argus/opentree13.4@ott${j}\t${ntax}\t${nsoln}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment