A note for myself on how to create a phylogenetic tree from Biopyton using ClustalW2. However, most of the content is just translated into Japanese from what is written in Biopython Tutorial and Cookbook.
First, [Download] ClustalW2 (http://www.clustal.org/clustal2/). In case of Mac, mount .dmg and put the bin file obtained by mounting it under / bin.
Next, prepare the data of the strain that uses Clustal W2. This time [Metarhizium](https://ja.wikipedia.org/wiki/%E3%83%A1%E3%82%BF%E3%83%AA%E3%82%B8%E3%82%A6%E3 A phylogenetic tree of% 83% A0) (Metarhizium) is created based on Ribosome biogenesis protein YTM1. The file was downloaded from UniProt. The strains used are as follows.
After adding it to the Basket, download it in FASTA format. This time, I saved it as uniprot-yourlist.fasta.
Apply ClustalW2 from Biopython to the prepared stock data.
from Bio.Align.Applications import ClustalwCommandline
clustalw_cline = ClustalwCommandline("clustalw2", infile="uniprot-yourlist.fasta")
stdout, stderr = clustalw_cline()
Then, two files, uniprot-yourlist.aln and uniprot-yourlist.dnd, are generated. Therefore, use the Phylo module of Biopython to read the dnd file and draw a phylogenetic tree.
from Bio import Phylo
tree = Phylo.read("uniprot-yourlist.dnd", "newick")
Phylo.draw(tree)
If you use the draw_ascii function instead of the draw function, the phylogenetic tree will be output as ASCII art.
_ tr|E9E7T1|E9E7T1_METAQ
|
| , tr|A0A0D9P3B0|A0A0D9P3B0_METAN
|,|
_||| tr|A0A0A1USL4|A0A0A1USL4_9HYPO
||
|| tr|A0A0B4H3C6|A0A0B4H3C6_9HYPO
|
| ______________________________________ tr|A0A0B2X7N3|A0A0B2X7N3_9HYPO
|_____|
|______________ tr|A0A167BRY5|A0A167BRY5_9HYPO
Exited with code=0 in 1.1
http://biopython.org/DIST/docs/tutorial/Tutorial.html
Peter J. A. Cock, Tiago Antao, Jeffrey T. Chang, Brad A. Chapman, Cymon J. Cox, Andrew Dalke, Iddo Friedberg, Thomas Hamelryck, Frank Kauff, Bartek Wilczynski, Michiel J. L. de Hoon: “Biopython: freely available Python tools for computational molecular biology and bioinformatics”. Bioinformatics 25 (11), 1422–1423 (2009). doi:10.1093/bioinformatics/btp163,
Eric Talevich, Brandon M. Invergo, Peter J.A. Cock, Brad A. Chapman: “Bio.Phylo: A unified toolkit for processing, analyzing and visualizing phylogenetic trees in Biopython”. BMC Bioinformatics 13: 209 (2012). doi:10.1186/1471-2105-13-209
Recommended Posts