[Bioperl-l] Hspwriter and fasta

Vilanova,David,LAUSANNE,NRC/BS david.vilanova@rdls.nestle.com
Fri, 27 Sep 2002 14:49:00 +0200


Hello,
I'm just trying to parse and write a Fasta report using HSPtableWriter but
this is what I'm getting :
 0               0       0       0       0.0e+00 0       0       0.00    


Here below is an extract of the script. I think it has something to do with
HSPtableWriter

my $writer = new Bio::SearchIO::Writer::HSPTableWriter;
my $out = Bio::SearchIO->new( -writer => $writer,
							  -file   => ">out"
);
my $searchio = new Bio::SearchIO(-file=>"report.FASTA",
	
-format=>'fasta');

my $writer = Bio::SearchIO::Writer::HSPTableWriter->new(
								-columns =>
[qw(
	
query_name
                                                  query_length
	
hit_name
	
hit_length
	
rank
	
frac_identical_query                                                  
	
expect
	
)]
 
);


	while ( my $result = $searchio->next_result() ) 
			{ 
	       $out->write_result($result); 
		   
		    }

David