[Biopython-dev] Bio.Application interface

Peter biopython at maubp.freeserve.co.uk
Wed Apr 22 13:30:00 UTC 2009


On Wed, Apr 22, 2009 at 2:23 PM, Cymon Cox <cy at cymon.org> wrote:
> 2009/4/22 Peter <biopython at maubp.freeserve.co.uk>
>>
>> On Wed, Apr 22, 2009 at 10:48 AM, Cymon Cox <cy at cymon.org> wrote:
>>
>> > Ive written Application.AbstractCommandline for both MUSCLE and MAFFT.
>> > However, each of these programmes uses a variation on the parameter
>> > styles
>> > not easily covered by the current _AbstractParameter classes _Option and
>> > _Argument. The _Option class deals with parameters of the type "-
>> > -append=yes" and "-a yes", ...
>> > A muscle command might be:
>> > "muscle -in Fasta/f002 -out Fasta/temp_align_out2.fa -objscore sp
>> > -noanchors"
>> > ie with a "-noanchors" command
>>
>> Those kind of options which don't take a value are really common on
>> Unix,  I suspect we already have things like this in the other wrappers.
>> I'd guess they just use the _Option class and omit the value.
>
> Yes, I see now... they need to be _Options with a "lambda x: 0" value
> checker function - for some reason was trying to force them into _Argument
>
> This is the current _Option class:
> ...
> So _Option covers: "- -param=value", "-param value", "-param", "- -param"
>
> What it doesnt cover is "- -param value" and "-param=value"
> ...

This might be a silly question, but do you actually these exact option
layouts for MUSCLE and MAFFT?  Many Unix tools use something like
libopt and will actually take slight variations, and may also offer short
and long names for the same option.  Perhaps the existing option code
in Bio.Application will suffice?

Peter




More information about the Biopython-dev mailing list