[Biopython] convert to interleaved nexus

Peter Cock p.j.a.cock at googlemail.com
Wed Mar 27 13:41:30 UTC 2013


On Wed, Mar 27, 2013 at 12:17 PM, Cymon Cox <cymon.cox at googlemail.com> wrote:
>> >
>> > How about we make AlignIO default to writing interleaved Nexus if the
>> > sequences are very long (say over 1000 bases)? That way for small
>> > alignments we continue to produce non-interleaved Nexus as now
>> > (which has proved reliable) and automatically interleave when is it
>> > more likely that parsers with fixed buffers like MrBayes would fail.
>> >
>> > Peter
>>
>> Ha! - it looks like I suggested this before, but the conversation died:
>> http://biopython.org/pipermail/biopython-dev/2010-December/008487.html
>>
>> CC'ing Cymon again ;)
>
> There's no downside as such to whether the matrix is interleaved or not:
> interleaved and sequential(flat) are both valid in the Nexus format.

There are probably some differences in terms of writing/parsing speed,
but that is a fairly minor concern next to portability/support.

> Unfortunately, some software parsers are not implemented to cope with both.
> Among phylogenetic software I would guess the most commonly expected format
> is interleaved. So...

In that case the length based default seems sensible to me - thus far the
only reported issue with defaulting to non-interlaced has been MyBayes'
limited buffer. Do you want to make this change to Bio/AlignIO/NexusIO.py
or should I?

Peter



More information about the Biopython mailing list