[Bioperl-l] Pise/bioperl

Catherine Letondal letondal@pasteur.fr
Thu, 10 Jan 2002 20:55:30 +0100


Jason Stajich wrote:
> > - there is no factory in the sense of a queue, the factory here is
> > just the Pise/program class; what do you exactly mean by an analysis
> > queue? a complex task? a strategy?
> >
> Just some generic entities that aggregate the information about the
> central server.
> 
> my $pisefactory = new Bio::Factory::PISE(@params);
> my $embossfactory = new Bio::Factory::EMBOSS(@params);
> 
> my $clustal = $pisefactory->get_Application_Handle('clustalw');
> my $res = $clustal->align(-data => [$seq1,$seq2]);
> 
> my $primer3 = $embossfactory->get_Application_Handle('primer3');
> 
> my $res = $primer3->analyze( @parameters );
> 
> 
> my $localfactory = new Bio::Factory::Local();
> 
> $localblast = $localfactory->get_Application_Handle('blastall');
> 
> my $res = $localblast->search(-data => [$seq1,$seq2,$seq3]);
> 
> 
> None of the method names are meant to imply those are good names for these
> methods!  

Ok, but why having different method names (align, search, analyze, ...) for running
the analysis? Why not just run (for instance)?

> Obviously I am simplifying what is a more complex problem. But
> the idea is there and I feel like it would be something to debate.  I only
> want things to be fairly transparent to the user whether or not invoking
> an application requires submitting a HTTP request through LWP or through
> CORBA or as a forked process.

I just wonder - Bio::Factory::PISE looks like a broker? What should @params be in:
	new Bio::Factory::PISE(@params)
?
Am I still able to choose a given Pise server? (e.g a fast one versus a slow one, etc...).
Am I able to choose different servers for different kind of programs? Or to choose
different servers for the *same* program (if I want to run several jobs in parallel)? 
(cf http://www-alt.pasteur.fr/~letondal/Pise/PiseBioperl/Examples/parallel.pl)


> You have a the JobQueue notion built into PISE, I think this is probably
> better than my very simplified example above.  

A JobQueue? What do you mean? 

> We might add a parameter to
> the server or application code that is BLOCKUNTILFINISHED so that users
> don't have to write while( ! done() ) sleep(X)

There are indeed 2 different methods: submit (asynchronous) and run (waits until
completion).

    my $program = Bio::Tools::Run::Pise::program->new (...);

    # run: submit and waits for completion
    my $job = $program->run();

    # for long jobs
    my $job = $program->submit(); # only submit the request
    return $job->jobid;

    # later, from another place
    my $job = PiseJob->fromUrl($jobid);
    if ($job->terminated) {
       print $job->stdout;
    }

--
Catherine Letondal -- Pasteur Institute Computing Center