How to do it...

Take a look at the following steps:

  1. Let's load all the phylogenetic data:
from copy import deepcopyfrom Bio import Phyloebola_tree = Phylo.read('my_ebola.nex', 'nexus')ebola_tree.name = 'Ebolavirus tree'ebola_simple_tree = Phylo.read('ebola_simple.nex', 'nexus')ebola_simple_tree.name = 'Ebolavirus simplified tree'

For all of the trees that we read, we will change the name of the tree, since the name will be printed later.

  1. Now, we can draw ASCII representations of the trees:
Phylo.draw_ascii(ebola_simple_tree)Phylo.draw_ascii(ebola_tree)

The ASCII representation of the simplified genus tree is shown in the following diagram. Here, we will not print the complete version because it will take several pages, but if you run ...

Get Bioinformatics with Python Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.