[Bioperl-l] Pise/bioperl
Catherine Letondal
letondal@pasteur.fr
Wed, 30 Jan 2002 16:14:25 +0100
[sorry, I could not attend the hackathon, and Martin senger has already left, so... could
we discuss this by email?]
Aaron J Mackey wrote:
>
> On Thu, 10 Jan 2002, Jason Stajich wrote:
>
> > my $clustal = $pisefactory->get_Application_Handle('clustalw');
> > my $res = $clustal->align(-data => [$seq1,$seq2]);
>
> Just two simple design comments:
>
> 1) get_Application_Handle could just be application(), no? Yes, I
> understand what a handle is, but no need to make things more confusing.
> Other good words might be instantiate(), startup(), etc. (I like
> doubleclick(), but I'm a GUI sorta guy I guess; just kidding).
I agree. Or it could be also:
my $clustal = $pisefactory->program('clustalw');
as in the EMBOSS interface ?
Would it be possible to have it directctly when creating the factory?
my $clustalw = new Bio::Factory::PISE('clustalw');
or:
my $clustalw = new Bio::Factory::PISE(program => 'clustalw');
(returning a Bio::Tools::Run::PISE instance I guess?)
When you only have one program to run, it's easier.
BTW, it could be interesting to have the server url defined at the Bio::Tools::Run::PISE
level instead of the factory, since it can be different for
different programs, or even different for different parameter setting (cf database
for blast depends on the databases available on the server).
>
> 2) $application->run() vs. $app->align(), $app->convert(), etc; $clustal
> is a good example of a program that can do a couple of different things,
> even with the same "input" (Yes I realize that part of your input
> parameters could be a flag telling clustalw what to do; I guess that's
> part of PISE's job.
That's right, the actual action is often one of the Pise parameter, such as in blast
or clustalw. There is a default action, which is align for clustalw.
I really hink it's simpler not to have to remember the type of action each program does... (there are 300 programs in Pise) :-()
>At the same time, you should be able to AUTOLOAD
> those "run" methods, and have them usable as such).
What I have done in the Pise/bioperl classes is indeed to AUTOLOAD methods that
correspond to a parameter. so, if you call:
$clustalw->action('convert'), it will set the action parameter to convert.
>
> I think this is great work though, and could really open things up (I've
> always been very impressed with PISE and similar efforts).
>
> -Aaron
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
--
Catherine Letondal -- Pasteur Institute Computing Center