[Biopython-dev] ApplicationResult and generic_run obsolete?

Tiago Antão tiagoantao at gmail.com
Tue Jul 7 04:33:49 EDT 2009


2009/7/6 Peter <biopython at maubp.freeserve.co.uk>:
> The point of this discussion is to agree the "best practice". It
> sounds like this will be telling people to use subprocess for full
> control, but we may continue to provide one or two helper
> functions for very common usecases.

I tried to use Bio.Application and there was one part (maybe I am
using it wrongly) that was kind of awkward: parameters (Ive added my
code below).
The need to declare them explicitly plus the fact that in some cases
parameters are always compulsory and really not parameters (granted a
strange use case, but I have a fixed parameter for genepop, namely
saying that the run is machine-controlled, batch mode).
At the end of the day, I end  up with a lot of biolerplate code (like below).


                _Argument(["command"],
                    ["INTEGER(.INTEGER)*"],
                    None,
                    True,
                    "GenePop option to be called"),
                _Argument(["mode"],
                    ["Dont touch this"],
                    None,
                    True,
                    "Should allways be batch"),
                _Argument(["input"],
                    ["input"],
                    None,
                    True,
                    "Input file"),
                _Argument(["Dememorization"],
                    ["input"],
                    None,
                    False,
                    "Dememorization step"),
                _Argument(["BatchNumber"],
                    ["input"],
                    None,
                    False,
                    "Number of MCMC batches"),
                _Argument(["BatchLength"],
                    ["input"],
                    None,
                    False,
                    "Length of MCMC chains"),
                _Argument(["HWtests"],
                    ["input"],
                    None,
                    False,
                    "Enumeration or MCMC"),

-- 
 "A man who dares to waste one hour of time has not discovered the
value of life" - Charles Darwin


More information about the Biopython-dev mailing list