[Biopython-dev] Questions about the NEXUS format

Peter biopython at maubp.freeserve.co.uk
Wed Jul 2 14:12:48 UTC 2008


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

OK, thank you.

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

So that is a "yes in theory", but it doesn't sound worth worrying about.

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

Thanks,

Peter



More information about the Biopython-dev mailing list