[Biopython-dev] Tests for Emboss Phylip wrappers
Peter
biopython at maubp.freeserve.co.uk
Sun Sep 20 11:20:43 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.
I've checked in something based on the current version from github.
I added a few checks for missing input files (I was getting cryptic errors),
but then decided we had enough input files in the test suite already, and
that it might be more useful to try writing alignments to the PHYLIP tools
via stdin with AlignIO. Certainly at least one example should try this,
assuming it works. I haven't done this yet - feel free to try.
Note that the stdout from the PHYLIPNEW tools isn't clean, so we
can't avoid having temp output files:
http://lists.open-bio.org/pipermail/emboss-dev/2009-September/000632.html
> 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.
Fixed in CVS - does this affect any of the other tools using this argument?
> 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.
I put a quick crude helper function into the unit test as discussed.
The unit test is working nicely on Linux with EMBOSS PHYLIP
from CVS, I presume you are testing against an official release?
If you could the CVS code works fine on your setup before the
release that would be great. There is a bit more time as I won't
be able to do the release on Monday, but it should be Tuesday
or Wednesday... and fingers crossed getting PHYLIPNEW
installed on my Windows machine will be easy.
We can look at adding some more of your example input files,
and uncommenting their tests later (especially for cases where
we can't generate the input from Biopython directly). I did add
the horses.tree file BTW.
Thank you David :)
Peter
More information about the Biopython-dev
mailing list