Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save mtholder/b06b8709a4aa696f9fed5267e0e26992 to your computer and use it in GitHub Desktop.

Select an option

Save mtholder/b06b8709a4aa696f9fed5267e0e26992 to your computer and use it in GitHub Desktop.
generating a mapping of internal OTT ID that shows up in the synth tree to the number of descendant leaves
#!/bin/bash
otc-tree-tool --indented-table labelled_supertree/labelled_supertree_simplified_ottnames.tre > subproblems/indented-table.txt
cat subproblems/indented-table.txt | sed -E '/ +mrca/d' | sed -E 's/.* ott([0-9]+) : ([0-9]+)/"ott\1": \2,/' > num_tips_for_ott_internals_in_labelled_tree.json
rm subproblems/indented-table.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment