[Biopython-dev] Recent Bio.Nexus updates

Peter biopython at maubp.freeserve.co.uk
Mon Jun 30 05:12:17 EDT 2008


>> First of all, you've added a new method export_phylip(), which seems
>> to be a simple function to record the Nexus object's alignment as a
>> PHYLIP format alignment.  One point of concern is code duplication
>> (Bio.AlignIO can write PHYLIP files).  Also, you don't seem to be
>> following the "spec" strictly, as the taxon names are not cropped to
>> ten characters, nor are any "illegal" characters dealt with.
>
> True - I ignored this delibaretely. I think except for old PHYLIP itself,
> all software I know handles longer taxon names by default. The format I used
> here is sometimes refered to as "relaxed phylip" but as it has become the
> standard for what people call phylip formt, so I just kept it this way.

Sadly "relaxed phylip" is an even less well defined format!

>> More
>> generally, I wonder if this method is really needed - perhaps instead
>> a general method to return a Bio.Align.Generic.Alignment object would
>> be preferable.  This could then be used in conjunction with any of the
>> alignment formats supported in Bio.AlignIO.
>
> That is a possibility. I would then vouch for adding support for "relaxed
> phylip" to AlignIO.PhylipIO (which I could easily do with a little
> mofification of Nexus.export_phylip() myself)

Would you expect spaces to be allowed in the names for "relaxed
phylip" files?  Writing the files is easy - checking that other tools
can understand them is more hassle.  And the flip side of this is
reading assorted versions of "relaxed phylip" is also tricky.  If you
have a collection of various "valid" files (ideally output from or
accepted by mainstream tools) we could use that to put together a test
suite which would define the de-facto standard.  But without that, I
wouldn't be so confident about adding this to Biopython.

>> Secondly, you seem to have reverted the alphabet change to
>> Bio/Nexus/Nexus.py made in revision 1.12 to fix Bug 2380.  Was this
>> deliberate or just accidental?
>> http://bugzilla.open-bio.org/show_bug.cgi?id=2380
>
> Sorry for that. I missed that bug. Thaks for re-fixing it.

There may be a more elegant way of fixing this.

Peter


More information about the Biopython-dev mailing list