[Bioperl-l] blast2table using SearchIO

Fernan Aguero fernan@iib.unsam.edu.ar
Fri, 22 Nov 2002 12:57:12 -0300


Hi! I am trying some examples from the man/pod docs. 

The data: a blast report, containing multiple queries
against the same database.

The goal: get this data in tabular form (tab-delimited).

OK, so I know I can parse myself the file and print
individual columns myself (I am still used to BPlite and
friends), but I saw there were some *TableWriter modules
associated with SearchIO, so I tried ...

My script (mostly derived from man/pod docs):

--- Start script ---

use Bio::SearchIO;
use Bio::SearchIO::Writer::HitTableWriter;

$in			= Bio::SearchIO->new( -format	=>	'blast' );
$writer = Bio::SearchIO::Writer::HitTableWriter->new();
$out		= Bio::SearchIO->new( -writer	=>	$writer );

while ( $result = $in->next_result() ) {
	$out->write_result( $result, ($in->report_count - 1 ? 0 :	1) );
	}

--- End script --- 


And I get this error:
Using default column map.
Can't locate object method "report_count" via package "Bio::SearchIO::blast" (perhaps you forgot to load "Bio::SearchIO::blast"?) at /home/fernan/develop/blast2table.pl line 11, <STDIN> line 59.
cat: stdout: Broken pipe

I only seem to find 'report_count' in psiblast.pm, the other
ocurrences are just in pods.

Any ideas of what is going on? Maybe I am missing something?
Documentation error? Bug?

TIA, Fernan

-- 
F e r n a n   A g u e r o
http://genoma.unsam.edu.ar/~fernan