Skip to Content
Bioinformatics with Python Cookbook - Second Edition
book

Bioinformatics with Python Cookbook - Second Edition

by Tiago Antao
November 2018
Intermediate to advanced
360 pages
9h 36m
English
Packt Publishing
Content preview from Bioinformatics with Python Cookbook - Second Edition

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Bioinformatics with Python Cookbook

Bioinformatics with Python Cookbook

Tiago Antao

Publisher Resources

ISBN: 9781789344691Supplemental Content