How to construct a phylogenetic tree accroding to sequence similarity matrix
Hi everyone,
I would like to know how to construct a phylogenetic tree accroding to pre-calculated sequence similarity matrix. An example of input file is like:
Seq1 Seq2 Seq3 Seq4
Seq1 1 0.9 0.6 0.4
Seq2 0.9 1 0.5 0.1
Seq3 0.6 0.5 1 0.6
Seq4 0.4 0.1 0.6 1
——————————
How can I use above data to build a tree?
Many thanks :)
• 1,712 views
•
link
0 answers
No answers yet.
Log in to answer this question.
using https://ai.tinybio.cloud/chat
To construct a phylogenetic tree using Biopython, you can use the DistanceTreeConstructor class from the Bio.Phylo.TreeConstruction module. This class provides methods to construct a phylogenetic tree using distance matrix. Here is a simple example:
In this example, the upgma method is used to construct the tree using UPGMA (Unweighted Pair Group Method with Arithmetic Mean) algorithm. You can also use the nj method to construct the tree using NJ (Neighbor Joining) algorithm.
Please note that the distance matrix should represent the evolutionary distance between the sequences, not the sequence similarity. You might need to convert your sequence similarity matrix to a distance matrix before constructing the tree.