【发布时间】:2015-05-14 21:08:56
【问题描述】:
还有其他包,特别是 R 的 ape,它们构建了一个无根树,然后允许您通过 explicitly specifying an outgroup 对其进行根化。
相比之下,在 BioPython 中,我可以直接创建有根树而无需指定根,所以我想知道根是如何确定的,例如从以下代码中。
from Bio import AlignIO
alignment = AlignIO.read('mulscle-msa-aligned-105628a58654.fasta', 'fasta')
from Bio.Phylo.TreeConstruction import DistanceCalculator
calculator = DistanceCalculator('ident')
dm = calculator.get_distance(alignment)
from Bio.Phylo.TreeConstruction import DistanceTreeConstructor
constructor = DistanceTreeConstructor()
tree = constructor.upgma(dm)
from Bio import Phylo
Phylo.write(tree, 'phyloxml-7016bed7d42.xml', 'phyloxml')
我在构建树之后在这里编写了序列,但尽管如此,这是从该过程构建的有根树。
【问题讨论】:
-
这个问题不是 biopython 特有的。有几种算法可以重建系统发育树。您选择了基于距离的
UPGMA方法。UPGMA是最简单的方法之一。它假设一个恒定的分子钟,是一种层次聚类方法。通过算法设计,您将始终获得一棵有根树。 -
添加@cel say .... 这类问题最好在https://www.biostars.org/ 或发邮件到biopython@biopython.org
标签: bioinformatics biopython dna-sequence phylogeny sequence-alignment