Using pairwise alignment scores to draw phylogenetic tree?
0
0
Entering edit mode
2.9 years ago
ehsansepahi ▴ 10

I prefer to use my global pairwise alignment scores to draw a phylogenetic tree. I can make a matrix of these scores using this sample code:

from Bio.Phylo.TreeConstruction import _Matrix
names = ['Alpha', 'Beta', 'Gamma', 'Delta']
scores = [[0], [1310, 0], [1332, 1353, 0], [1321, 1342, 1330, 0]]
m = _Matrix(names, scores)

But I have a few problems:

1- These are alignment scores and I have to convert them to distances. Is it rational at all? and how can I do this?

2- Lets suppose I passed the first problem and have pairwise distances, when I try the following code to draw a UPGMA tree I get an error:

from Bio.Phylo.TreeConstruction import DistanceTreeConstructor
constructor = DistanceTreeConstructor()
upgmatree = constructor.upgma(m)
Phylo.draw(upgmatree)

this is the error:

Must provide a DistanceMatrix object.

How can I over come these problems?

phylo biopython pairwise2 • 468 views
ADD COMMENT

Login before adding your answer.

Traffic: 1594 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6