[Biopython-dev] Tests for Emboss Phylip wrappers

Peter biopython at maubp.freeserve.co.uk
Fri Sep 18 09:26:59 UTC 2009


On Fri, Sep 18, 2009 at 4:52 AM, David Winter
<winda002 at student.otago.ac.nz> wrote:
>
>>>
>>> Do you fancy writing a short unit tests? e.g. test_Emboss_phylip.py
>>> based on test_Emboss.py? Continuing on the github branch is fine.
>>>
>
> Well, it didn't end up being very short but there is a test on my "phylo"
> branch (http://github.com/dwinter/biopython/tree/phylo) in
>  test_PhylipNew.phy  (which uses a couple of new files in Tests/Phylip) that
> I'd welcome comments on.

Cool - I'll take a look and try and get (some of) it merged into CVS
for this release.

> Writing them actually exposed a bug in the code already in CVS, the
> FProtParsCommandline option "-intreefile" isn't mandatory so "is_required"
> should be set to 0 rather than 1. In my defence the emboss documentation has
> it listed as being both mandatory and optional.

How odd. Maybe EMBOSS switched it at some point?

> One possibly foolish thing I did was use TreeIO to test the trees that came
> out of these programs made sense, thinking that module would be part of the
> next release. If the plan is for a new release soon and having a test for
> these wrappers is important the tests could be done with Nexus.Trees but I
> found that was difficult to use for files with multiple newick trees.

Hmm. In the short term we can either comment out those bits of the test
pending the inclusion of TreeIO in the next release, or add a quick tiny
parser in the test itself to load the trees, split them on the ";" and pass
them one by one to Bio.Nexus.Trees for parsing.

Peter




More information about the Biopython-dev mailing list