How to do it...

Take a look at the following steps:

  1. For DendroPy, we will load the data first and then reconstruct the genus dataset, as follows:
import osimport shutilimport dendropyfrom dendropy.interop import raxmlebola_data = dendropy.DnaCharacterMatrix.get_from_path('trim.fasta', 'fasta')rx = raxml.RaxmlRunner()ebola_tree = rx.estimate_tree(ebola_data, ['-m', 'GTRGAMMA', '-N', '10'])print('RAxML temporary directory %s:' % rx.working_dir_path)del ebola_data

Remember that the size of the data structure for this is quite big; therefore, ensure that you have enough memory to load this.

Be prepared to wait some time. Depending on your computer, this could take more than one hour. If it takes much longer, consider restarting the process, ...

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.