Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create phylogeny tree #186

Closed
noeldjitro opened this issue May 25, 2020 · 2 comments
Closed

Create phylogeny tree #186

noeldjitro opened this issue May 25, 2020 · 2 comments
Assignees
Labels
question how can I do this? why does it do that? where can I get this? etc.

Comments

@noeldjitro
Copy link

Is there a way to create a phylogeny tree in Newick format from pyani output?

Thanks

@widdowquinn
Copy link
Owner

Hi Noel,

Thanks for using pyani!

pyani doesn't currently output tree data directly (though it is calculated as part of the heatmap generation) - adding that feature is a good idea, and I'll start a new issue for it.

One note of warning: I wouldn't treat any tree pyani generates as a phylogenetic tree - they're all built from pairwise distance matrices, where the distances may be calculated from different sets of sites in each genome; furthermore no evolutionary model mechanism is fit to the data. Because of this, I'd recommend you use a multigene tree with a properly-fit model for a real phylogeny.

However, the pyani results are genuine similarities, and it is appropriate to view them as a dendrogram. To do this (at the moment) I would import one of the distance matrices produced by pyani and apply a clustering method. You could do this in R with something like (untested code):

library(ape)
my_dists = read.table("pyani_ani.tab", header=T, sep="\t")
my_cluster = hclust(dists, method="complete")  # Note: other clustering approaches are possible
my_tree = as.phylo(cluster)
write.tree(my_tree, "pyani_ani.new")

@widdowquinn widdowquinn self-assigned this May 25, 2020
@widdowquinn widdowquinn added the question how can I do this? why does it do that? where can I get this? etc. label May 25, 2020
@widdowquinn
Copy link
Owner

I'm closing this question for now - please comment on #187 if you'd like to continue the discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question how can I do this? why does it do that? where can I get this? etc.
Projects
None yet
Development

No branches or pull requests

2 participants