[Bioperl-pipeline] Dumper

shawnh@fugu-sg.org shawnh@fugu-sg.org
Fri, 1 Nov 2002 09:38:33 +0800 (SGT)


Hi Folks,
	I implemented a rudimentary flat file dumper for biopipe.
It actually is a standalone kinda thing whereby one can use it as 
follows:

 use Bio::Pipeline::Dumper;
 use Bio::SearchIO;

  my $dumper = Bio::Pipeline::Dumper->new(-module=>'blastscore',
                                        -file=>">shawn.out",
                                        -significance=>"<0.001",
                                        -query_frac_identical=>">0.21");

  my $searchio = Bio::SearchIO->new ('-format' => 'blast',
                                     '-file'   => "blast.report");

  my @hit;
  while (my $r = $searchio->next_result){
    while(my $hit = $r->next_hit){
      push @hit, $hit;
  }
  $dumper->dump(@hit);

Now I'm just dumping out blast scores in tab-delimited files:

Protein1	Protein2	1e-09

you can do filtering based on another of htings, significance,frac_conserved etc


The motivation for this is that for some use cases, thats all we
really want to feed it into the next analysis which takes in files
rather than a large operation to fetch objects from a db, write into file
and then run.

This module will be use as streamadaptor IOHandler.

I hope to add a gff dumper soon.

shawn

-- 
********************************
* Shawn Hoon
* http://www.fugu-sg.org/~shawnh
********************************