[Biopython-dev] Switches in the Bio.Application interface
Cymon Cox
cy at cymon.org
Mon May 4 11:34:52 EDT 2009
2009/5/4 Peter <biopython at maubp.freeserve.co.uk>
> On Mon, May 4, 2009 at 3:48 PM, Peter <biopython at maubp.freeserve.co.uk>
> wrote:
>
> That does seem to work and covers most situation, however there is a
> special case of command line "switches" (arguments which don't take an
> argument, like -kimura in ClustalW, or -l in ls). There are a lot of
> these cases in Cymon's new alignment wrappers. These worked OK when
> used with set_parameter("kimura"), the value is omitted and defaults
> to None. Using the current patch, to set this via the keyword
> argument or property, it must explicitly be set to None, which is
> ugly:
>
> >>> from Bio.Align.Applications import ClustalwCommandline
> >>> print ClustalwCommandline(gapopen=2, gapext=0.5, infile="demo.fasta")
> clustalw -infile=demo.fasta -gapopen=2 -gapext=0.5
> >>> print ClustalwCommandline(gapopen=2, gapext=0.5, kimura=None,
> infile="demo.fasta")
> clustalw -infile=demo.fasta -gapopen=2 -gapext=0.5 -kimura
Ugly, and very confusing.
> For these "switch" arguments, perhaps the value should be interpreted
> as a boolean (should the switch be added or not?).
This is what i did in my Muscle helper functions - so makes sense to me...
C.
--
____________________________________________________________________
Cymon J. Cox
Centro de Ciencias do Mar
Faculdade de Ciencias do Mar e Ambiente (FCMA)
Universidade do Algarve
Campus de Gambelas
8005-139 Faro
Portugal
Phone: +0351 289800909 ext 7909
Fax: +0351 289800051
Email: cy at cymon.org, cymon at ualg.pt, cymon.cox at gmail.com
HomePage : http://biology.duke.edu/bryology/cymon.html
-8.63/-6.77
More information about the Biopython-dev
mailing list