[Biopython] CompareAce parser

Michiel de Hoon mjldehoon at yahoo.com
Sun Dec 6 14:31:47 UTC 2009


> So the reason this parser is so simple and has almost no
> functionality is just a reflection of the simplicity of
> the CompareAce files?

Not exactly. CompareAce files can have different outputs, depending on the query given to CompareAce. The simplest query returns only one number. The current CompareAce parser can only parse this output. In other words,

>>> input = open("test.out")
>>> from Bio.Motif.Parsers import AlignAce
>>> AlignAce.CompareAceParser().parse(input)
0.92130000000000001

is equivalent to

>>> input = open("test.out")
>>> float(input.read())
0.92130000000000001

I am not against having a CompareAce parser in Biopython, but if we have such a parser it should be able to handle more output formats than just the trivial output format.

With this in mind, I think we should either extend the CompareAce parser to handle cases that cannot be trivially handled by a simple Python command, or remove it altogether. If we do keep it in Biopython, there should also be some documentation to cover it, and perhaps a unit test.

--Michiel

--- On Sun, 12/6/09, Peter <biopython at maubp.freeserve.co.uk> wrote:

> From: Peter <biopython at maubp.freeserve.co.uk>
> Subject: Re: [Biopython] CompareAce parser
> To: "Bartek Wilczynski" <bartek at rezolwenta.eu.org>
> Cc: "Michiel de Hoon" <mjldehoon at yahoo.com>, biopython at biopython.org
> Date: Sunday, December 6, 2009, 9:10 AM
> On Sun, Dec 6, 2009 at 12:58 AM,
> Bartek Wilczynski
> <bartek at rezolwenta.eu.org>
> wrote:
> > Hi,
> >
> > I don't have anything against deprecating, even though
> I don't the
> > advantages of doing so. (the module is trivial, but so
> is the output
> > of compareACE: a number giving a score between motifs.
> The score,
> > however is not trivial and I wouldn't want to
> reimplement it.)
> >
> > cheers
> >  Bartek
> 
> So the reason this parser is so simple and has almost no
> functionality
> is just a reflection of the simplicity of the CompareAce
> files? If so, I'd
> say leave the parser in.
> 
> Peter
> 


      




More information about the Biopython mailing list