## Mashtree phylogeny

`rule mashtree` [Mashtree](https://github.com/lskatz/mashtree) computes an approximation of ANI using the minhash distance measure. On these distances, a phylogenetic tree is then created using the neighbor-joining algorithm. The plotted tree is not rooted.




```{r mashtree-size, echo=FALSE, message=F, warning=F, error = T}
# This chunk is needed for setting the size of the mashtree plot
# I thought it would work fine by just adding the size in the header of the next chunk. But apparently this is necessary.
try({
    fig_height = max(4, N * 0.2)
    knitr::opts_chunk$set(fig.height = fig_height,
                          fig.width = 10)
})
```





```{r mashtree, echo=FALSE, message=F, warning=F, error = T, fig_height = max(4, N*0.2), fig_width = 10}

mashtree_file = glob_list$mashtree

tree <- ape::read.tree(mashtree_file)

#tree = phytools::midpoint.root(tree)
#devtools::install_github("igraph/rigraph")
#tree = phangorn::midpoint(tree)

#plot(tree)
#axis(1)

#tree$tip.label = paste0(" ", tree$tip.label)
#phytools::plotTree(tree, align.tip.label = T, lwd = 1, mar = c(0,0,0,0))
#axis(1)

tree$tip.label = paste0(" ", tree$tip.label)
ape::plot.phylo(tree, align.tip.label = T, font = 1, cex = 0.73)
axis(1)
           

```

*Fig. `r figno()`: Approximation of a phylogenetic tree calculated with mashtree. The horizontal axis is equivalent to 1-ANI.*

---
