Ich habe Talevich, Eric et al. Gelesen. "Bio. Phylo: Ein einheitliches Toolkit zur Verarbeitung, Analyse und Visualisierung phylogenetischer Bäume in Biopython." BMC Bioinformatics 13.1 (2012): 1. Mache eine Notiz.
Eine für die Bioinformatik entwickelte Python-Bibliothek. Die Verwendung wird in Biopython Tutorial and Cookbook erläutert.
pip install biopython
Bio.Phylo
Bio.Phylo kann einen phylogenetischen Baum erstellen.
Obwohl urllib2 in diesem Artikel verwendet wird, ist urlopen in Python3 in urllib integriert.
# coding: utf-8
from Bio import Phylo
from urllib.request import urlopen
handle = urlopen("http://www.phyloxml.org/examples/apaf.xml")
tree = Phylo.read(handle, "phyloxml")
handle.close()
Phylo.draw(tree)
# coding: utf-8
from Bio import Phylo
from urllib.request import urlopen
handle = urlopen("http://www.phyloxml.org/examples/apaf.xml")
tree = Phylo.read(handle, "phyloxml")
handle.close()
tree.root_at_midpoint()
tree.ladderize(reverse=True)
vertebrata = tree.common_ancestor("Apaf-1_HUMAN", "15_TETNG")
vertebrata.color = "fuchsia"
vertebrata.width = 3
tree.root.color = "gray"
Phylo.draw(tree)
Wenn Sie draw_ascii () anstelle von draw () verwenden, wird der phylogenetische Baum als ASCII-Grafik ausgegeben.
_ 22_MOUSE
|
_| Apaf-1_HUMAN
| |
,| | 12_CANFA
||
_||___ 11_CHICK
| |
| |___________ 16_XENLA
_______|
| | , 14_FUGRU
| | __|
| |____| |__ 15_TETNG
_____| |
| | |____ 17_BRARE
| |
| | ______ 1_BRAFL
| | __|
______| || |_________ 18_NEMVE
| | |
| | |____________ 23_STRPU
| |
_| | _________ 26_STRPU
| | |_________|
| | |________ 25_STRPU
| |
| | ___ CED4_CAEEL
| |___________________________________|
____| |_ 31_CAEBR
| |
| | ___ 28_DROPS
| | _____________________|
| | ______| |____ Dark_DROME
| | | |
| |__| |_______________________ 29_AEDAE
| |
| |__________________________ 30_TRICA
|
| _ 34_BRAFL
| _________________________|
_| _____| |_ 35_BRAFL
| | |
| __| |_______________ 8_BRAFL
| | |
| | | ___________________ 20_NEMVE
| ______________| |_______|
| | | |__________________________ 21_NEMVE
| | |
| ___| |______________________________ 9_BRAFL
| | |
| | | _____________ 3_BRAFL
| | | _____|
| | |_________| |_________________ 2_BRAFL
|____| |
| |_______________ 19_NEMVE
|
| _____ 37_BRAFL
| ________________________|
|___________| |____ 36_BRAFL
|
|______________________ 33_BRAFL
Talevich, Eric, et al. "Bio. Phylo: a unified toolkit for processing, analyzing and visualizing phylogenetic trees in Biopython." BMC bioinformatics 13.1 (2012): 1.
Recommended Posts