Hi, I'm stuck on how to convert a pairwise-distance matrix or phylim format into newick format.
Newick format is the required input for plotting a tree for many programs yet there seems to me no straightforward method on how to build a newick file.
I'm gravitating towards using the Bio Phylo package however it cannot read phylim format so therefore can't convert it into newick, nexus, phyloxml etc.
There is an answer here but I'm not sure I can verify it works https://stackoverflow.com/questions/9364609/converting-ndarray-generated-by-hcluster-into-a-newick-string-for-use-with-ete2/17657426#17657426
There are previous questions about this on here which remain unanswered - here and here
I have tried using tools such as FastMe however it cannot handle a large matrix and is very slow. I am willing to alter the distance matrix format as necessary.
If anyone has any recommendations I would greatly appreciate it! Thanks!
It may be useful to add "pair-wise distance matrix" to title itself since your question is specifically about that.
Where are you getting the matrix from? Can the tool that gave it you not create a tree? It's unusual to only spit out the matrix.
If you can get the distance matrix into the right format, its possible you could 'hack this is' to the Bio.Phylo.TreeConstruction module and 'trick' it in to thinking it created the object in the first place so you can apply all the other methods it has available.
You haven't specified what kind of tree you intend to derive from this table though - NJ, UPGMA, ML etc?