{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Applying GNC, a non-stationary codon model\n",
    "\n",
    "See [Kaehler et al](https://academic.oup.com/gbe/article-lookup/doi/10.1093/gbe/evw308) for the formal description of this model. Note that we demonstrate hypothesis testing using this model elsewhere.\n",
    "\n",
    "We apply this to a sample alignment."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from cogent3.app import io, evo\n",
    "\n",
    "loader = io.load_aligned(format=\"fasta\", moltype=\"dna\")\n",
    "aln = loader(\"../data/primate_brca1.fasta\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The model is specified using it's abbreviation."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<table>\n",
       "<style>\n",
       "tr:last-child {border-bottom: 1px solid #000;} tr > th {text-align: center !important;} tr > td {text-align: left !important;}\n",
       "</style>\n",
       "<caption style=\"color: rgb(250, 250, 250); background: rgba(30, 140, 200, 1); align=top;\"><span style=\"font-weight: bold;\">GNC</span><span></span></caption>\n",
       "<thead style=\"background: rgba(161, 195, 209, 0.75); font-weight: bold; text-align: center;\">\n",
       "<th>key</th>\n",
       "<th>lnL</th>\n",
       "<th>nfp</th>\n",
       "<th>DLC</th>\n",
       "<th>unique_Q</th>\n",
       "</thead>\n",
       "<tbody>\n",
       "<tr>\n",
       "<td></td>\n",
       "<td style=\"font-family: monospace !important;\">-6707.1856</td>\n",
       "<td style=\"font-family: monospace !important;\">83</td>\n",
       "<td>True</td>\n",
       "<td></td>\n",
       "</tr>\n",
       "</tbody>\n",
       "</table>\n"
      ],
      "text/plain": [
       "GNC\n",
       "============================================\n",
       "key           lnL    nfp     DLC    unique_Q\n",
       "--------------------------------------------\n",
       "       -6707.1856     83    True            \n",
       "--------------------------------------------\n",
       "\n",
       "1 rows x 5 columns"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model = evo.model(\"GNC\", tree=\"../data/primate_brca1.tree\")\n",
    "result = model(aln)\n",
    "result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<h4>GNC</h4>\n",
       "<p>log-likelihood = -6707.1856</p>\n",
       "<p>number of free parameters = 83</p>\n",
       "<table>\n",
       "<style>\n",
       "tr:last-child {border-bottom: 1px solid #000;} tr > th {text-align: center !important;} tr > td {text-align: left !important;}\n",
       "</style>\n",
       "<caption style=\"color: rgb(250, 250, 250); background: rgba(30, 140, 200, 1); align=top;\"><span style=\"font-weight: bold;\">Global params</span><span></span></caption>\n",
       "<thead style=\"background: rgba(161, 195, 209, 0.75); font-weight: bold; text-align: center;\">\n",
       "<th>A&gt;C</th>\n",
       "<th>A&gt;G</th>\n",
       "<th>A&gt;T</th>\n",
       "<th>C&gt;A</th>\n",
       "<th>C&gt;G</th>\n",
       "<th>C&gt;T</th>\n",
       "<th>G&gt;A</th>\n",
       "<th>G&gt;C</th>\n",
       "<th>G&gt;T</th>\n",
       "<th>T&gt;A</th>\n",
       "</thead>\n",
       "<tbody>\n",
       "<tr>\n",
       "<td style=\"font-family: monospace !important;\">0.8618</td>\n",
       "<td style=\"font-family: monospace !important;\">3.5392</td>\n",
       "<td style=\"font-family: monospace !important;\">0.9785</td>\n",
       "<td style=\"font-family: monospace !important;\">1.6710</td>\n",
       "<td style=\"font-family: monospace !important;\">2.2023</td>\n",
       "<td style=\"font-family: monospace !important;\">6.2632</td>\n",
       "<td style=\"font-family: monospace !important;\">7.8953</td>\n",
       "<td style=\"font-family: monospace !important;\">1.2215</td>\n",
       "<td style=\"font-family: monospace !important;\">0.7983</td>\n",
       "<td style=\"font-family: monospace !important;\">1.2838</td>\n",
       "</tr>\n",
       "</tbody>\n",
       "</table>\n",
       "<table>\n",
       "<thead style=\"background: rgba(161, 195, 209, 0.75); font-weight: bold; text-align: center;\">\n",
       "<th>T&gt;C</th>\n",
       "<th>omega</th>\n",
       "</thead>\n",
       "<tbody>\n",
       "<tr>\n",
       "<td style=\"font-family: monospace !important;\">3.0618</td>\n",
       "<td style=\"font-family: monospace !important;\">0.8201</td>\n",
       "</tr>\n",
       "</tbody>\n",
       "</table>\n",
       "\n",
       "<table>\n",
       "<style>\n",
       "tr:last-child {border-bottom: 1px solid #000;} tr > th {text-align: center !important;} tr > td {text-align: left !important;}\n",
       "</style>\n",
       "<caption style=\"color: rgb(250, 250, 250); background: rgba(30, 140, 200, 1); align=top;\"><span style=\"font-weight: bold;\">Edge params</span><span></span></caption>\n",
       "<thead style=\"background: rgba(161, 195, 209, 0.75); font-weight: bold; text-align: center;\">\n",
       "<th>edge</th>\n",
       "<th>parent</th>\n",
       "<th>length</th>\n",
       "</thead>\n",
       "<tbody>\n",
       "<tr>\n",
       "<td style=\"background: rgba(161, 195, 209, 0.25); font-weight: 600;\">Galago</td>\n",
       "<td>root</td>\n",
       "<td style=\"font-family: monospace !important;\">0.5233</td>\n",
       "</tr>\n",
       "<tr>\n",
       "<td style=\"background: rgba(161, 195, 209, 0.25); font-weight: 600;\">HowlerMon</td>\n",
       "<td>root</td>\n",
       "<td style=\"font-family: monospace !important;\">0.1331</td>\n",
       "</tr>\n",
       "<tr>\n",
       "<td style=\"background: rgba(161, 195, 209, 0.25); font-weight: 600;\">Rhesus</td>\n",
       "<td>edge.3</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0639</td>\n",
       "</tr>\n",
       "<tr>\n",
       "<td style=\"background: rgba(161, 195, 209, 0.25); font-weight: 600;\">Orangutan</td>\n",
       "<td>edge.2</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0234</td>\n",
       "</tr>\n",
       "<tr>\n",
       "<td style=\"background: rgba(161, 195, 209, 0.25); font-weight: 600;\">Gorilla</td>\n",
       "<td>edge.1</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0075</td>\n",
       "</tr>\n",
       "<tr>\n",
       "<td style=\"background: rgba(161, 195, 209, 0.25); font-weight: 600;\">Human</td>\n",
       "<td>edge.0</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0182</td>\n",
       "</tr>\n",
       "<tr>\n",
       "<td style=\"background: rgba(161, 195, 209, 0.25); font-weight: 600;\">Chimpanzee</td>\n",
       "<td>edge.0</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0085</td>\n",
       "</tr>\n",
       "<tr>\n",
       "<td style=\"background: rgba(161, 195, 209, 0.25); font-weight: 600;\">edge.0</td>\n",
       "<td>edge.1</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0000</td>\n",
       "</tr>\n",
       "<tr>\n",
       "<td style=\"background: rgba(161, 195, 209, 0.25); font-weight: 600;\">edge.1</td>\n",
       "<td>edge.2</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0100</td>\n",
       "</tr>\n",
       "<tr>\n",
       "<td style=\"background: rgba(161, 195, 209, 0.25); font-weight: 600;\">edge.2</td>\n",
       "<td>edge.3</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0368</td>\n",
       "</tr>\n",
       "<tr>\n",
       "<td style=\"background: rgba(161, 195, 209, 0.25); font-weight: 600;\">edge.3</td>\n",
       "<td>root</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0246</td>\n",
       "</tr>\n",
       "</tbody>\n",
       "</table>\n",
       "\n",
       "<table>\n",
       "<style>\n",
       "tr:last-child {border-bottom: 1px solid #000;} tr > th {text-align: center !important;} tr > td {text-align: left !important;}\n",
       "</style>\n",
       "<caption style=\"color: rgb(250, 250, 250); background: rgba(30, 140, 200, 1); align=top;\"><span style=\"font-weight: bold;\">Motif params</span><span></span></caption>\n",
       "<thead style=\"background: rgba(161, 195, 209, 0.75); font-weight: bold; text-align: center;\">\n",
       "<th>AAA</th>\n",
       "<th>AAC</th>\n",
       "<th>AAG</th>\n",
       "<th>AAT</th>\n",
       "<th>ACA</th>\n",
       "<th>ACC</th>\n",
       "<th>ACG</th>\n",
       "<th>ACT</th>\n",
       "<th>AGA</th>\n",
       "<th>AGC</th>\n",
       "</thead>\n",
       "<tbody>\n",
       "<tr>\n",
       "<td style=\"font-family: monospace !important;\">0.0557</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0228</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0352</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0548</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0234</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0032</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0000</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0320</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0224</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0285</td>\n",
       "</tr>\n",
       "</tbody>\n",
       "</table>\n",
       "<table>\n",
       "<thead style=\"background: rgba(161, 195, 209, 0.75); font-weight: bold; text-align: center;\">\n",
       "<th>AGG</th>\n",
       "<th>AGT</th>\n",
       "<th>ATA</th>\n",
       "<th>ATC</th>\n",
       "<th>ATG</th>\n",
       "<th>ATT</th>\n",
       "<th>CAA</th>\n",
       "<th>CAC</th>\n",
       "<th>CAG</th>\n",
       "<th>CAT</th>\n",
       "</thead>\n",
       "<tbody>\n",
       "<tr>\n",
       "<td style=\"font-family: monospace !important;\">0.0146</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0379</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0184</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0074</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0120</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0181</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0194</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0053</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0254</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0236</td>\n",
       "</tr>\n",
       "</tbody>\n",
       "</table>\n",
       "<table>\n",
       "<thead style=\"background: rgba(161, 195, 209, 0.75); font-weight: bold; text-align: center;\">\n",
       "<th>CCA</th>\n",
       "<th>CCC</th>\n",
       "<th>CCG</th>\n",
       "<th>CCT</th>\n",
       "<th>CGA</th>\n",
       "<th>CGC</th>\n",
       "<th>CGG</th>\n",
       "<th>CGT</th>\n",
       "<th>CTA</th>\n",
       "<th>CTC</th>\n",
       "</thead>\n",
       "<tbody>\n",
       "<tr>\n",
       "<td style=\"font-family: monospace !important;\">0.0213</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0065</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0000</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0280</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0000</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0011</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0011</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0021</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0154</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0073</td>\n",
       "</tr>\n",
       "</tbody>\n",
       "</table>\n",
       "<table>\n",
       "<thead style=\"background: rgba(161, 195, 209, 0.75); font-weight: bold; text-align: center;\">\n",
       "<th>CTG</th>\n",
       "<th>CTT</th>\n",
       "<th>GAA</th>\n",
       "<th>GAC</th>\n",
       "<th>GAG</th>\n",
       "<th>GAT</th>\n",
       "<th>GCA</th>\n",
       "<th>GCC</th>\n",
       "<th>GCG</th>\n",
       "<th>GCT</th>\n",
       "</thead>\n",
       "<tbody>\n",
       "<tr>\n",
       "<td style=\"font-family: monospace !important;\">0.0135</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0107</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0772</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0088</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0298</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0318</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0169</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0107</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0010</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0130</td>\n",
       "</tr>\n",
       "</tbody>\n",
       "</table>\n",
       "<table>\n",
       "<thead style=\"background: rgba(161, 195, 209, 0.75); font-weight: bold; text-align: center;\">\n",
       "<th>GGA</th>\n",
       "<th>GGC</th>\n",
       "<th>GGG</th>\n",
       "<th>GGT</th>\n",
       "<th>GTA</th>\n",
       "<th>GTC</th>\n",
       "<th>GTG</th>\n",
       "<th>GTT</th>\n",
       "<th>TAC</th>\n",
       "<th>TAT</th>\n",
       "</thead>\n",
       "<tbody>\n",
       "<tr>\n",
       "<td style=\"font-family: monospace !important;\">0.0147</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0099</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0079</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0112</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0148</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0064</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0073</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0207</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0021</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0086</td>\n",
       "</tr>\n",
       "</tbody>\n",
       "</table>\n",
       "<table>\n",
       "<thead style=\"background: rgba(161, 195, 209, 0.75); font-weight: bold; text-align: center;\">\n",
       "<th>TCA</th>\n",
       "<th>TCC</th>\n",
       "<th>TCG</th>\n",
       "<th>TCT</th>\n",
       "<th>TGC</th>\n",
       "<th>TGG</th>\n",
       "<th>TGT</th>\n",
       "<th>TTA</th>\n",
       "<th>TTC</th>\n",
       "<th>TTG</th>\n",
       "</thead>\n",
       "<tbody>\n",
       "<tr>\n",
       "<td style=\"font-family: monospace !important;\">0.0224</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0074</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0000</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0275</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0011</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0043</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0212</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0198</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0085</td>\n",
       "<td style=\"font-family: monospace !important;\">0.0102</td>\n",
       "</tr>\n",
       "</tbody>\n",
       "</table>\n",
       "<table>\n",
       "<thead style=\"background: rgba(161, 195, 209, 0.75); font-weight: bold; text-align: center;\">\n",
       "<th>TTT</th>\n",
       "</thead>\n",
       "<tbody>\n",
       "<tr>\n",
       "<td style=\"font-family: monospace !important;\">0.0181</td>\n",
       "</tr>\n",
       "</tbody>\n",
       "</table>\n"
      ],
      "text/plain": [
       "GNC\n",
       "log-likelihood = -6707.1856\n",
       "number of free parameters = 83\n",
       "============================================================================\n",
       "   A>C       A>G       A>T       C>A       C>G       C>T       G>A       G>C\n",
       "----------------------------------------------------------------------------\n",
       "0.8618    3.5392    0.9785    1.6710    2.2023    6.2632    7.8953    1.2215\n",
       "----------------------------------------------------------------------------\n",
       "\n",
       "continued: \n",
       "====================================\n",
       "   G>T       T>A       T>C     omega\n",
       "------------------------------------\n",
       "0.7983    1.2838    3.0618    0.8201\n",
       "------------------------------------\n",
       "\n",
       "==============================\n",
       "      edge    parent    length\n",
       "------------------------------\n",
       "    Galago      root    0.5233\n",
       " HowlerMon      root    0.1331\n",
       "    Rhesus    edge.3    0.0639\n",
       " Orangutan    edge.2    0.0234\n",
       "   Gorilla    edge.1    0.0075\n",
       "     Human    edge.0    0.0182\n",
       "Chimpanzee    edge.0    0.0085\n",
       "    edge.0    edge.1    0.0000\n",
       "    edge.1    edge.2    0.0100\n",
       "    edge.2    edge.3    0.0368\n",
       "    edge.3      root    0.0246\n",
       "------------------------------\n",
       "============================================================================\n",
       "   AAA       AAC       AAG       AAT       ACA       ACC       ACG       ACT\n",
       "----------------------------------------------------------------------------\n",
       "0.0557    0.0228    0.0352    0.0548    0.0234    0.0032    0.0000    0.0320\n",
       "----------------------------------------------------------------------------\n",
       "\n",
       "continued: \n",
       "============================================================================\n",
       "   AGA       AGC       AGG       AGT       ATA       ATC       ATG       ATT\n",
       "----------------------------------------------------------------------------\n",
       "0.0224    0.0285    0.0146    0.0379    0.0184    0.0074    0.0120    0.0181\n",
       "----------------------------------------------------------------------------\n",
       "\n",
       "continued: \n",
       "============================================================================\n",
       "   CAA       CAC       CAG       CAT       CCA       CCC       CCG       CCT\n",
       "----------------------------------------------------------------------------\n",
       "0.0194    0.0053    0.0254    0.0236    0.0213    0.0065    0.0000    0.0280\n",
       "----------------------------------------------------------------------------\n",
       "\n",
       "continued: \n",
       "============================================================================\n",
       "   CGA       CGC       CGG       CGT       CTA       CTC       CTG       CTT\n",
       "----------------------------------------------------------------------------\n",
       "0.0000    0.0011    0.0011    0.0021    0.0154    0.0073    0.0135    0.0107\n",
       "----------------------------------------------------------------------------\n",
       "\n",
       "continued: \n",
       "============================================================================\n",
       "   GAA       GAC       GAG       GAT       GCA       GCC       GCG       GCT\n",
       "----------------------------------------------------------------------------\n",
       "0.0772    0.0088    0.0298    0.0318    0.0169    0.0107    0.0010    0.0130\n",
       "----------------------------------------------------------------------------\n",
       "\n",
       "continued: \n",
       "============================================================================\n",
       "   GGA       GGC       GGG       GGT       GTA       GTC       GTG       GTT\n",
       "----------------------------------------------------------------------------\n",
       "0.0147    0.0099    0.0079    0.0112    0.0148    0.0064    0.0073    0.0207\n",
       "----------------------------------------------------------------------------\n",
       "\n",
       "continued: \n",
       "============================================================================\n",
       "   TAC       TAT       TCA       TCC       TCG       TCT       TGC       TGG\n",
       "----------------------------------------------------------------------------\n",
       "0.0021    0.0086    0.0224    0.0074    0.0000    0.0275    0.0011    0.0043\n",
       "----------------------------------------------------------------------------\n",
       "\n",
       "continued: \n",
       "==============================================\n",
       "   TGT       TTA       TTC       TTG       TTT\n",
       "----------------------------------------------\n",
       "0.0212    0.0198    0.0085    0.0102    0.0181\n",
       "----------------------------------------------"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "result.lf"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## We can obtain the tree with branch lengths as ENS\n",
    "\n",
    "If this tree is written to newick (using the `write()` method), the lengths will now be ENS."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "        <script type=\"text/javascript\">\n",
       "        window.PlotlyConfig = {MathJaxConfig: 'local'};\n",
       "        if (window.MathJax) {MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}\n",
       "        if (typeof require !== 'undefined') {\n",
       "        require.undef(\"plotly\");\n",
       "        requirejs.config({\n",
       "            paths: {\n",
       "                'plotly': ['https://cdn.plot.ly/plotly-latest.min']\n",
       "            }\n",
       "        });\n",
       "        require(['plotly'], function(Plotly) {\n",
       "            window._Plotly = Plotly;\n",
       "        });\n",
       "        }\n",
       "        </script>\n",
       "        "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.plotly.v1+json": {
       "config": {
        "plotlyServerURL": "https://plot.ly"
       },
       "data": [
        {
         "line": {
          "color": "black",
          "shape": "spline",
          "smoothing": 1.3,
          "width": 1.25
         },
         "mode": "lines",
         "showlegend": false,
         "type": "scatter",
         "x": [
          null,
          null,
          0,
          0,
          null,
          0,
          0.02454694919222931,
          null,
          0.02454694919222931,
          0.02454694919222931,
          null,
          0.02454694919222931,
          0.06129274291389185,
          null,
          0.06129274291389185,
          0.06129274291389185,
          null,
          0.06129274291389185,
          0.07124690317126423,
          null,
          0.07124690317126423,
          0.07124690317126423,
          null,
          0.07124690317126423,
          0.07124690317582229,
          null,
          0.07124690317582229,
          0.07124690317582229,
          null,
          0.07124690317582229,
          0.0797665675480732,
          null,
          0.07124690317582229,
          0.07124690317582229,
          null,
          0.07124690317582229,
          0.08940681655490382,
          null,
          0.07124690317126423,
          0.07124690317126423,
          null,
          0.07124690317126423,
          0.07870267595544249,
          null,
          0.06129274291389185,
          0.06129274291389185,
          null,
          0.06129274291389185,
          0.08461824421871442,
          null,
          0.02454694919222931,
          0.02454694919222931,
          null,
          0.02454694919222931,
          0.08832353597608736,
          null,
          0,
          0,
          null,
          0,
          0.1327221209228062,
          null,
          0,
          0,
          null,
          0,
          0.5179696016707567,
          null
         ],
         "y": [
          null,
          null,
          -2.6,
          -0.08125000000000004,
          null,
          -0.08125000000000004,
          -0.08125000000000004,
          null,
          -0.08125000000000004,
          1.1375,
          null,
          1.1375,
          1.1375,
          null,
          1.1375,
          2.275,
          null,
          2.275,
          2.275,
          null,
          2.275,
          3.25,
          null,
          3.25,
          3.25,
          null,
          3.25,
          3.9000000000000004,
          null,
          3.9000000000000004,
          3.9000000000000004,
          null,
          3.25,
          2.6,
          null,
          2.6,
          2.6,
          null,
          2.275,
          1.3,
          null,
          1.3,
          1.3,
          null,
          1.1375,
          0.0,
          null,
          0.0,
          0.0,
          null,
          -0.08125000000000004,
          -1.3,
          null,
          -1.3,
          -1.3,
          null,
          -2.6,
          -2.6,
          null,
          -2.6,
          -2.6,
          null,
          -2.6,
          -3.9000000000000004,
          null,
          -3.9000000000000004,
          -3.9000000000000004,
          null
         ]
        },
        {
         "hoverinfo": "text",
         "marker": {
          "color": "black",
          "size": 3,
          "symbol": "circle"
         },
         "mode": "markers",
         "showlegend": false,
         "text": [
          "root",
          "edge.3",
          "edge.2",
          "edge.1",
          "edge.0",
          "Chimpanzee",
          "Human",
          "Gorilla",
          "Orangutan",
          "Rhesus",
          "HowlerMon",
          "Galago"
         ],
         "type": "scatter",
         "x": [
          0,
          0.02454694919222931,
          0.06129274291389185,
          0.07124690317126423,
          0.07124690317582229,
          0.0797665675480732,
          0.08940681655490382,
          0.07870267595544249,
          0.08461824421871442,
          0.08832353597608736,
          0.1327221209228062,
          0.5179696016707567
         ],
         "y": [
          -2.6,
          -0.08125000000000004,
          1.1375,
          2.275,
          3.25,
          3.9000000000000004,
          2.6,
          1.3,
          0.0,
          -1.3,
          -2.6,
          -3.9000000000000004
         ]
        }
       ],
       "layout": {
        "annotations": [
         {
          "font": {
           "family": "Inconsolata, monospace",
           "size": 12
          },
          "showarrow": false,
          "text": "Chimpanzee",
          "textangle": 0,
          "x": 0.09271580758984212,
          "xanchor": "left",
          "xref": "x",
          "y": 3.9000000000000004,
          "yref": "y"
         },
         {
          "font": {
           "family": "Inconsolata, monospace",
           "size": 12
          },
          "showarrow": false,
          "text": "Human",
          "textangle": 0,
          "x": 0.10235605659667274,
          "xanchor": "left",
          "xref": "x",
          "y": 2.6,
          "yref": "y"
         },
         {
          "font": {
           "family": "Inconsolata, monospace",
           "size": 12
          },
          "showarrow": false,
          "text": "Gorilla",
          "textangle": 0,
          "x": 0.09165191599721141,
          "xanchor": "left",
          "xref": "x",
          "y": 1.3,
          "yref": "y"
         },
         {
          "font": {
           "family": "Inconsolata, monospace",
           "size": 12
          },
          "showarrow": false,
          "text": "Orangutan",
          "textangle": 0,
          "x": 0.09756748426048334,
          "xanchor": "left",
          "xref": "x",
          "y": 0.0,
          "yref": "y"
         },
         {
          "font": {
           "family": "Inconsolata, monospace",
           "size": 12
          },
          "showarrow": false,
          "text": "Rhesus",
          "textangle": 0,
          "x": 0.10127277601785628,
          "xanchor": "left",
          "xref": "x",
          "y": -1.3,
          "yref": "y"
         },
         {
          "font": {
           "family": "Inconsolata, monospace",
           "size": 12
          },
          "showarrow": false,
          "text": "HowlerMon",
          "textangle": 0,
          "x": 0.14567136096457511,
          "xanchor": "left",
          "xref": "x",
          "y": -2.6,
          "yref": "y"
         },
         {
          "font": {
           "family": "Inconsolata, monospace",
           "size": 12
          },
          "showarrow": false,
          "text": "Galago",
          "textangle": 0,
          "x": 0.5309188417125256,
          "xanchor": "left",
          "xref": "x",
          "y": -3.9000000000000004,
          "yref": "y"
         },
         {
          "ax": 0,
          "ay": 0,
          "showarrow": false,
          "text": "0.05",
          "x": 0.5438680817542945,
          "xref": "x",
          "y": 3.9000000000000004,
          "yref": "y",
          "yshift": 10
         }
        ],
        "autosize": true,
        "font": {
         "family": "Balto",
         "size": 14
        },
        "height": 500,
        "hovermode": "closest",
        "margin": {
         "b": 50,
         "l": 50,
         "pad": 4,
         "r": 50,
         "t": 50
        },
        "shapes": [
         {
          "line": {
           "color": "black",
           "width": 1.25
          },
          "type": "line",
          "x0": 0.5179696016707567,
          "x1": 0.5697665618378324,
          "y0": 3.9000000000000004,
          "y1": 3.9000000000000004
         }
        ],
        "showlegend": false,
        "template": {
         "data": {
          "bar": [
           {
            "error_x": {
             "color": "#2a3f5f"
            },
            "error_y": {
             "color": "#2a3f5f"
            },
            "marker": {
             "line": {
              "color": "#E5ECF6",
              "width": 0.5
             }
            },
            "type": "bar"
           }
          ],
          "barpolar": [
           {
            "marker": {
             "line": {
              "color": "#E5ECF6",
              "width": 0.5
             }
            },
            "type": "barpolar"
           }
          ],
          "carpet": [
           {
            "aaxis": {
             "endlinecolor": "#2a3f5f",
             "gridcolor": "white",
             "linecolor": "white",
             "minorgridcolor": "white",
             "startlinecolor": "#2a3f5f"
            },
            "baxis": {
             "endlinecolor": "#2a3f5f",
             "gridcolor": "white",
             "linecolor": "white",
             "minorgridcolor": "white",
             "startlinecolor": "#2a3f5f"
            },
            "type": "carpet"
           }
          ],
          "choropleth": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "type": "choropleth"
           }
          ],
          "contour": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0.0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1.0,
              "#f0f921"
             ]
            ],
            "type": "contour"
           }
          ],
          "contourcarpet": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "type": "contourcarpet"
           }
          ],
          "heatmap": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0.0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1.0,
              "#f0f921"
             ]
            ],
            "type": "heatmap"
           }
          ],
          "heatmapgl": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0.0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1.0,
              "#f0f921"
             ]
            ],
            "type": "heatmapgl"
           }
          ],
          "histogram": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "histogram"
           }
          ],
          "histogram2d": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0.0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1.0,
              "#f0f921"
             ]
            ],
            "type": "histogram2d"
           }
          ],
          "histogram2dcontour": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0.0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1.0,
              "#f0f921"
             ]
            ],
            "type": "histogram2dcontour"
           }
          ],
          "mesh3d": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "type": "mesh3d"
           }
          ],
          "parcoords": [
           {
            "line": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "parcoords"
           }
          ],
          "pie": [
           {
            "automargin": true,
            "type": "pie"
           }
          ],
          "scatter": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatter"
           }
          ],
          "scatter3d": [
           {
            "line": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatter3d"
           }
          ],
          "scattercarpet": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattercarpet"
           }
          ],
          "scattergeo": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattergeo"
           }
          ],
          "scattergl": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattergl"
           }
          ],
          "scattermapbox": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattermapbox"
           }
          ],
          "scatterpolar": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatterpolar"
           }
          ],
          "scatterpolargl": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatterpolargl"
           }
          ],
          "scatterternary": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatterternary"
           }
          ],
          "surface": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0.0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1.0,
              "#f0f921"
             ]
            ],
            "type": "surface"
           }
          ],
          "table": [
           {
            "cells": {
             "fill": {
              "color": "#EBF0F8"
             },
             "line": {
              "color": "white"
             }
            },
            "header": {
             "fill": {
              "color": "#C8D4E3"
             },
             "line": {
              "color": "white"
             }
            },
            "type": "table"
           }
          ]
         },
         "layout": {
          "annotationdefaults": {
           "arrowcolor": "#2a3f5f",
           "arrowhead": 0,
           "arrowwidth": 1
          },
          "coloraxis": {
           "colorbar": {
            "outlinewidth": 0,
            "ticks": ""
           }
          },
          "colorscale": {
           "diverging": [
            [
             0,
             "#8e0152"
            ],
            [
             0.1,
             "#c51b7d"
            ],
            [
             0.2,
             "#de77ae"
            ],
            [
             0.3,
             "#f1b6da"
            ],
            [
             0.4,
             "#fde0ef"
            ],
            [
             0.5,
             "#f7f7f7"
            ],
            [
             0.6,
             "#e6f5d0"
            ],
            [
             0.7,
             "#b8e186"
            ],
            [
             0.8,
             "#7fbc41"
            ],
            [
             0.9,
             "#4d9221"
            ],
            [
             1,
             "#276419"
            ]
           ],
           "sequential": [
            [
             0.0,
             "#0d0887"
            ],
            [
             0.1111111111111111,
             "#46039f"
            ],
            [
             0.2222222222222222,
             "#7201a8"
            ],
            [
             0.3333333333333333,
             "#9c179e"
            ],
            [
             0.4444444444444444,
             "#bd3786"
            ],
            [
             0.5555555555555556,
             "#d8576b"
            ],
            [
             0.6666666666666666,
             "#ed7953"
            ],
            [
             0.7777777777777778,
             "#fb9f3a"
            ],
            [
             0.8888888888888888,
             "#fdca26"
            ],
            [
             1.0,
             "#f0f921"
            ]
           ],
           "sequentialminus": [
            [
             0.0,
             "#0d0887"
            ],
            [
             0.1111111111111111,
             "#46039f"
            ],
            [
             0.2222222222222222,
             "#7201a8"
            ],
            [
             0.3333333333333333,
             "#9c179e"
            ],
            [
             0.4444444444444444,
             "#bd3786"
            ],
            [
             0.5555555555555556,
             "#d8576b"
            ],
            [
             0.6666666666666666,
             "#ed7953"
            ],
            [
             0.7777777777777778,
             "#fb9f3a"
            ],
            [
             0.8888888888888888,
             "#fdca26"
            ],
            [
             1.0,
             "#f0f921"
            ]
           ]
          },
          "colorway": [
           "#636efa",
           "#EF553B",
           "#00cc96",
           "#ab63fa",
           "#FFA15A",
           "#19d3f3",
           "#FF6692",
           "#B6E880",
           "#FF97FF",
           "#FECB52"
          ],
          "font": {
           "color": "#2a3f5f"
          },
          "geo": {
           "bgcolor": "white",
           "lakecolor": "white",
           "landcolor": "#E5ECF6",
           "showlakes": true,
           "showland": true,
           "subunitcolor": "white"
          },
          "hoverlabel": {
           "align": "left"
          },
          "hovermode": "closest",
          "mapbox": {
           "style": "light"
          },
          "paper_bgcolor": "white",
          "plot_bgcolor": "#E5ECF6",
          "polar": {
           "angularaxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           },
           "bgcolor": "#E5ECF6",
           "radialaxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           }
          },
          "scene": {
           "xaxis": {
            "backgroundcolor": "#E5ECF6",
            "gridcolor": "white",
            "gridwidth": 2,
            "linecolor": "white",
            "showbackground": true,
            "ticks": "",
            "zerolinecolor": "white"
           },
           "yaxis": {
            "backgroundcolor": "#E5ECF6",
            "gridcolor": "white",
            "gridwidth": 2,
            "linecolor": "white",
            "showbackground": true,
            "ticks": "",
            "zerolinecolor": "white"
           },
           "zaxis": {
            "backgroundcolor": "#E5ECF6",
            "gridcolor": "white",
            "gridwidth": 2,
            "linecolor": "white",
            "showbackground": true,
            "ticks": "",
            "zerolinecolor": "white"
           }
          },
          "shapedefaults": {
           "line": {
            "color": "#2a3f5f"
           }
          },
          "ternary": {
           "aaxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           },
           "baxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           },
           "bgcolor": "#E5ECF6",
           "caxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           }
          },
          "title": {
           "x": 0.05
          },
          "xaxis": {
           "automargin": true,
           "gridcolor": "white",
           "linecolor": "white",
           "ticks": "",
           "title": {
            "standoff": 15
           },
           "zerolinecolor": "white",
           "zerolinewidth": 2
          },
          "yaxis": {
           "automargin": true,
           "gridcolor": "white",
           "linecolor": "white",
           "ticks": "",
           "title": {
            "standoff": 15
           },
           "zerolinecolor": "white",
           "zerolinewidth": 2
          }
         }
        },
        "width": 500,
        "xaxis": {
         "visible": false
        },
        "yaxis": {
         "visible": false
        }
       }
      },
      "text/html": [
       "<div>\n",
       "        \n",
       "        \n",
       "            <div id=\"1af13e2d-c175-4d97-ae5a-6720d182dc86\" class=\"plotly-graph-div\" style=\"height:500px; width:500px;\"></div>\n",
       "            <script type=\"text/javascript\">\n",
       "                require([\"plotly\"], function(Plotly) {\n",
       "                    window.PLOTLYENV=window.PLOTLYENV || {};\n",
       "                    \n",
       "                if (document.getElementById(\"1af13e2d-c175-4d97-ae5a-6720d182dc86\")) {\n",
       "                    Plotly.newPlot(\n",
       "                        '1af13e2d-c175-4d97-ae5a-6720d182dc86',\n",
       "                        [{\"line\": {\"color\": \"black\", \"shape\": \"spline\", \"smoothing\": 1.3, \"width\": 1.25}, \"mode\": \"lines\", \"showlegend\": false, \"type\": \"scatter\", \"x\": [null, null, 0, 0, null, 0, 0.02454694919222931, null, 0.02454694919222931, 0.02454694919222931, null, 0.02454694919222931, 0.06129274291389185, null, 0.06129274291389185, 0.06129274291389185, null, 0.06129274291389185, 0.07124690317126423, null, 0.07124690317126423, 0.07124690317126423, null, 0.07124690317126423, 0.07124690317582229, null, 0.07124690317582229, 0.07124690317582229, null, 0.07124690317582229, 0.0797665675480732, null, 0.07124690317582229, 0.07124690317582229, null, 0.07124690317582229, 0.08940681655490382, null, 0.07124690317126423, 0.07124690317126423, null, 0.07124690317126423, 0.07870267595544249, null, 0.06129274291389185, 0.06129274291389185, null, 0.06129274291389185, 0.08461824421871442, null, 0.02454694919222931, 0.02454694919222931, null, 0.02454694919222931, 0.08832353597608736, null, 0, 0, null, 0, 0.1327221209228062, null, 0, 0, null, 0, 0.5179696016707567, null], \"y\": [null, null, -2.6, -0.08125000000000004, null, -0.08125000000000004, -0.08125000000000004, null, -0.08125000000000004, 1.1375, null, 1.1375, 1.1375, null, 1.1375, 2.275, null, 2.275, 2.275, null, 2.275, 3.25, null, 3.25, 3.25, null, 3.25, 3.9000000000000004, null, 3.9000000000000004, 3.9000000000000004, null, 3.25, 2.6, null, 2.6, 2.6, null, 2.275, 1.3, null, 1.3, 1.3, null, 1.1375, 0.0, null, 0.0, 0.0, null, -0.08125000000000004, -1.3, null, -1.3, -1.3, null, -2.6, -2.6, null, -2.6, -2.6, null, -2.6, -3.9000000000000004, null, -3.9000000000000004, -3.9000000000000004, null]}, {\"hoverinfo\": \"text\", \"marker\": {\"color\": \"black\", \"size\": 3, \"symbol\": \"circle\"}, \"mode\": \"markers\", \"showlegend\": false, \"text\": [\"root\", \"edge.3\", \"edge.2\", \"edge.1\", \"edge.0\", \"Chimpanzee\", \"Human\", \"Gorilla\", \"Orangutan\", \"Rhesus\", \"HowlerMon\", \"Galago\"], \"type\": \"scatter\", \"x\": [0, 0.02454694919222931, 0.06129274291389185, 0.07124690317126423, 0.07124690317582229, 0.0797665675480732, 0.08940681655490382, 0.07870267595544249, 0.08461824421871442, 0.08832353597608736, 0.1327221209228062, 0.5179696016707567], \"y\": [-2.6, -0.08125000000000004, 1.1375, 2.275, 3.25, 3.9000000000000004, 2.6, 1.3, 0.0, -1.3, -2.6, -3.9000000000000004]}],\n",
       "                        {\"annotations\": [{\"font\": {\"family\": \"Inconsolata, monospace\", \"size\": 12}, \"showarrow\": false, \"text\": \"Chimpanzee\", \"textangle\": 0, \"x\": 0.09271580758984212, \"xanchor\": \"left\", \"xref\": \"x\", \"y\": 3.9000000000000004, \"yref\": \"y\"}, {\"font\": {\"family\": \"Inconsolata, monospace\", \"size\": 12}, \"showarrow\": false, \"text\": \"Human\", \"textangle\": 0, \"x\": 0.10235605659667274, \"xanchor\": \"left\", \"xref\": \"x\", \"y\": 2.6, \"yref\": \"y\"}, {\"font\": {\"family\": \"Inconsolata, monospace\", \"size\": 12}, \"showarrow\": false, \"text\": \"Gorilla\", \"textangle\": 0, \"x\": 0.09165191599721141, \"xanchor\": \"left\", \"xref\": \"x\", \"y\": 1.3, \"yref\": \"y\"}, {\"font\": {\"family\": \"Inconsolata, monospace\", \"size\": 12}, \"showarrow\": false, \"text\": \"Orangutan\", \"textangle\": 0, \"x\": 0.09756748426048334, \"xanchor\": \"left\", \"xref\": \"x\", \"y\": 0.0, \"yref\": \"y\"}, {\"font\": {\"family\": \"Inconsolata, monospace\", \"size\": 12}, \"showarrow\": false, \"text\": \"Rhesus\", \"textangle\": 0, \"x\": 0.10127277601785628, \"xanchor\": \"left\", \"xref\": \"x\", \"y\": -1.3, \"yref\": \"y\"}, {\"font\": {\"family\": \"Inconsolata, monospace\", \"size\": 12}, \"showarrow\": false, \"text\": \"HowlerMon\", \"textangle\": 0, \"x\": 0.14567136096457511, \"xanchor\": \"left\", \"xref\": \"x\", \"y\": -2.6, \"yref\": \"y\"}, {\"font\": {\"family\": \"Inconsolata, monospace\", \"size\": 12}, \"showarrow\": false, \"text\": \"Galago\", \"textangle\": 0, \"x\": 0.5309188417125256, \"xanchor\": \"left\", \"xref\": \"x\", \"y\": -3.9000000000000004, \"yref\": \"y\"}, {\"ax\": 0, \"ay\": 0, \"showarrow\": false, \"text\": \"0.05\", \"x\": 0.5438680817542945, \"xref\": \"x\", \"y\": 3.9000000000000004, \"yref\": \"y\", \"yshift\": 10}], \"autosize\": true, \"font\": {\"family\": \"Balto\", \"size\": 14}, \"height\": 500, \"hovermode\": \"closest\", \"margin\": {\"b\": 50, \"l\": 50, \"pad\": 4, \"r\": 50, \"t\": 50}, \"shapes\": [{\"line\": {\"color\": \"black\", \"width\": 1.25}, \"type\": \"line\", \"x0\": 0.5179696016707567, \"x1\": 0.5697665618378324, \"y0\": 3.9000000000000004, \"y1\": 3.9000000000000004}], \"showlegend\": false, \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scattergl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergl\"}], \"scattermapbox\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattermapbox\"}], \"scatterpolar\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolar\"}], \"scatterpolargl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolargl\"}], \"scatterternary\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterternary\"}], \"surface\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"surface\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}]}, \"layout\": {\"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]], \"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}, \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"geo\": {\"bgcolor\": \"white\", \"lakecolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"showlakes\": true, \"showland\": true, \"subunitcolor\": \"white\"}, \"hoverlabel\": {\"align\": \"left\"}, \"hovermode\": \"closest\", \"mapbox\": {\"style\": \"light\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"ternary\": {\"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"title\": {\"x\": 0.05}, \"xaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}, \"yaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}}}, \"width\": 500, \"xaxis\": {\"visible\": false}, \"yaxis\": {\"visible\": false}},\n",
       "                        {\"responsive\": true}\n",
       "                    ).then(function(){\n",
       "                            \n",
       "var gd = document.getElementById('1af13e2d-c175-4d97-ae5a-6720d182dc86');\n",
       "var x = new MutationObserver(function (mutations, observer) {{\n",
       "        var display = window.getComputedStyle(gd).display;\n",
       "        if (!display || display === 'none') {{\n",
       "            console.log([gd, 'removed!']);\n",
       "            Plotly.purge(gd);\n",
       "            observer.disconnect();\n",
       "        }}\n",
       "}});\n",
       "\n",
       "// Listen for the removal of the full notebook cells\n",
       "var notebookContainer = gd.closest('#notebook-container');\n",
       "if (notebookContainer) {{\n",
       "    x.observe(notebookContainer, {childList: true});\n",
       "}}\n",
       "\n",
       "// Listen for the clearing of the current output cell\n",
       "var outputEl = gd.closest('.output');\n",
       "if (outputEl) {{\n",
       "    x.observe(outputEl, {childList: true});\n",
       "}}\n",
       "\n",
       "                        })\n",
       "                };\n",
       "                });\n",
       "            </script>\n",
       "        </div>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "tree = result.tree\n",
    "fig = tree.get_figure()\n",
    "fig.scale_bar = \"top right\"\n",
    "fig.show(width=500, height=500)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python [conda env:c3dev] *",
   "language": "python",
   "name": "conda-env-c3dev-py"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.1"
  },
  "widgets": {
   "application/vnd.jupyter.widget-state+json": {
    "state": {},
    "version_major": 2,
    "version_minor": 0
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
