[Biopython-dev] Cookbook entry, concatenating nexus files

Peter biopython at maubp.freeserve.co.uk
Thu May 14 07:02:03 EDT 2009


On Thu, May 14, 2009 at 10:59 AM, Cymon Cox <cy at cymon.org> wrote:
>> What exactly are you trying to achieve?  A big Nexus files with lots
>> of alignments (and trees) in it?
>
> The example David has given is very useful and a common procedure for
> phylogeneticists. Single gene/proteins tend to be aligned in separate
> alignment files and the concatenated into a so-called 'supermatrix'.

Oh right - I hadn't looked at David's example carefully enough earlier
to work out which concatenation he was doing (by row or by column).
It does make sense on re-reading.

Concatenation to give a single supermatrix (same number of taxa,
longer sequences) would be most elegantly done by sorting the three
alignments (so the taxa are in the same order) and then concatenating
them (by column).  See Bug 2552,
http://bugzilla.open-bio.org/show_bug.cgi?id=2552

Note that this procedure isn't specific to NEXUS files - you could do
this with any alignment format.  It is just fairly straight forward
with the Bio.Nexus module at the moment (at least, until we fix Bug
2552).

Peter



More information about the Biopython-dev mailing list