[Biopython-dev] ApplicationResult and generic_run obsolete?

Peter biopython at maubp.freeserve.co.uk
Tue Jul 7 05:19:34 EDT 2009


2009/7/7 Tiago Antão <tiagoantao at gmail.com>:
> 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).

If you have a fixed parameter, like "-mode batch" which must be
present, it doesn't make sense to expose the mode setting to the
used. Maybe you could do this by subclassing the __str__
method?

> At the end of the day, I end  up with a lot of biolerplate code (like below).

The nature of the command line wrappers is there will be lots of
boilerplate. On the bright side, once we get ride of ApplicationResult,
we can probably get rid of the "input"/"output" thing too.

Peter



More information about the Biopython-dev mailing list