[Biopython-dev] Questions about the NEXUS format

Frank Kauff fkauff at biologie.uni-kl.de
Wed Jul 2 14:01:01 UTC 2008


Hi Peter,

Peter wrote:
> Hello again Frank,
>
> As Biopython's NEXUS expect, I've got a couple of hopefully trivial
> questions about the format, which connect to how best to handle it the
> Bio.SeqIO and Bio.AlignIO modules.  http://biopython.org/wiki/SeqIO
> http://biopython.org/wiki/AlignIO
>
> My short questions are:
>
> Q1: Can a file contain more than one NEXUS record (i.e. concatenation,
> with more than one #NEXUS line)?
>   
As far as I know: no. #NEXUS just indicates the file being a NEXUS file, 
the concept of "records" is not part of a nexus file
>  Q2: Can a NEXUS record/file contain more than one alignment (matrix block)?
>
>   
I just had a quick look at the old Maddison et al. introductory paper of 
Nexus, and it says that "although the nexus standard does not impose 
constraints on the number of blocks, particular programs will". I don't 
know of any program that would read more than one data block and keep 
both of them.
> If the answer to either of those is a "yes", then any example files
> you could contribute would be very helpful.
>
> I have a more complicated question too, which would help me to resolve Bug 2227:
> http://bugzilla.open-bio.org/show_bug.cgi?id=2227
>
> Q3: Given a generic Alignment object (e.g. from one of the other
> parsers), can I construct a corresponding Nexus object where the
> aligned sequences are used for the matrix?  If so, how?
>   
Hmmm - not really. Nexus.py does not support "empty" nexus class objects 
that could be filled with data (just tried) . But it would actually be a 
nice thing to have. I'll put this on my to do list.

Cheers,
Frank
> Thank you,
>
> Peter
>
>   
'



More information about the Biopython-dev mailing list