The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Bio::Tools::Run::PiseWorkflow

SYNOPSIS

  # First, create a Bio::Tools::Run::AnalysisFactory::Pise object:
  my $factory = new Bio::Tools::Run::AnalysisFactory::Pise();
  # Then create the application objects (Pise::Run::Tools::PiseApplication):
  my $clustalw = $factory->program('clustalw');
  $clustalw->infile($my_alignment_file);
  my $protpars = $factory->program('protpars');

  # You can specify different servers for different applications :
  my $protdist = $factory->program('protpars'
                                   -remote => 'http://kun.homelinux.com/cgi-bin/Pise/5.a//protpars.pl',
                                   -email => 'your_email');

  # Create a new workflow object : 
  my $workflow = Bio::Tools::Run::PiseWorkflow->new(); 

  # Define the workflow's methods using the application objects:
  # the application method $protpars will receive the output of 
  # type 'readseq_ok_alig' from the application method $clustalw.
  $workflow->addpipe(-method => $clustalw,
                     -tomethod => $protpars,
                     -pipetype => 'readseq_ok_alig');

  # The application method $clustalw will be piped to a second 
  # application method ($protdist) using the output of type 'readseq_ok_alig'.
  $workflow->addpipe(-method => $clustalw,
                     -tomethod => $protdist,
                     -pipetype => 'readseq_ok_alig');

  # The application method $protpars will be piped to the application 
  # method $consense using the output of type 'phylip_tree'.
  my $consense = $factory->program('consense');
  $workflow->addpipe(-method => $protpars,
                     -tomethod => $consense,
                     -pipetype => 'phylip_tree');

  # Run the workflow.
  $workflow->run();

DESCRIPTION

A class to create a Pise workflow using Pise application objects as methods. A workflow is defined by a set of methods which all instanciate the class PiseApplication.

Create the workflow object :

  my $workflow = Bio::Tools::Run::PiseWorkflow->new();

You can specify which application will be used as the first method at creation of the workflow object: (by default, this first method will be the one specified by the option -method at the First call of the function addpipe().

  my $workflow = Bio::Tools::Run::PiseWorkflow->new($clustalw);

Use the function addpipe to define the workflow :

  $workflow->addpipe(-method => $clustalw,
                     -tomethod => $protpars,
                     -pipetype => 'readseq_ok_alig');

One method may be piped to different methods in the workflow:

  $workflow->addpipe(-method => $clustalw,
                     -tomethod => $protdist,
                     -pipetype => 'readseq_ok_alig');

To run the workflow (processes will be forked when possible):

  $workflow->run();

An html temporary file summarising the jobs status will be created in the working directory. The html output file can also be specified:

  $workflow->run(-html => 'jobs.html');

new

 Title   : new()
 Usage   : my $workflow = Bio::Tools::Run::PiseWorkflow->new();
 Function: Creates a Bio::Tools::Run::PiseWorkflow object.
 Example : my $workflow = Bio::Tools::Run::PiseWorkflow->new();
 Returns : An instance of Bio::Tools::Run::PiseWorkflow.

addpipe

 Title   : addpipe()
 Usage   : $workflow = Bio::Tools::Run::PiseWorkflow->addpipe(
                             -method => $clustalw,
                             -tomethod => $protpars,
                             -pipetype => 'readseq_ok_alig');
 Function: Pipe two methods of class PiseApplication in the workflow object.
 Example : $workflow = Bio::Tools::Run::PiseWorkflow->addpipe($clustalw, $protpars, 'readseq_ok_alig');
 Returns :

run

 Title   : run()
 Usage   : $workflow = Bio::Tools::Run::PiseWorkflow->run();
 Function: Run the defined workflow. You may provide an
           interval for jobs' completion checking and a file for html output.
 Examples : $workflow = Bio::Tools::Run::PiseWorkflow->run();
        $workflow = Bio::Tools::Run::PiseWorkflow->run(-interval => '200', -html => 'jobs.html');
 Returns :