[Biopython-dev] Genepop application wrapper class

Peter biopython at maubp.freeserve.co.uk
Fri Dec 3 14:18:54 UTC 2010


Hi Tiago,

You may have noticed from the commits recently that I'm looking
at the application wrappers. There is some "spring cleaning" that
we can do now that the old ApplicationResult class etc is gone.

As part of this I may need to make internal changes to the
wrapper _GenePopCommandline regarding how it sets up its
parameters.

In looking at this I noticed that you seem to be using the
_Argument class for all the options, where in most cases I
would have used _Option. For example,

To get e.g. "BatchNumber=5" at the command line via a
parameter named BatchNumber (as the argument name and
property name in the wrapper), you have:

                _Argument(["BatchNumber"],
                    ["input"],
                    None,
                    False,
                    "Number of MCMC batches"),

This means you have to set the value of the BatchNumber
parameter to "BatchNumber=5" which is repetitive. What I
would like to change this to is:

                _Option(["BatchNumber"],
                    ["input"],
                    None,
                    False,
                    "Number of MCMC batches"),

This way you set the value of this parameter to 5 (string or int).
Since you made this whole class private I think we can change
these details without affecting the public API (your controller
class).

Is that OK with you? Or would you like to go through these
settings since you know the tool better than me?

Thanks,

Peter



More information about the Biopython-dev mailing list