[Bioperl-l] SearchIO newbie question

Melodee Patterson mpatterson at lucigen.com
Tue May 24 10:16:53 EDT 2005


Hello,

I have written a number of perl and bioperl scripts to parse large phage BLASTx files, and now my boss wants me to remove some bacterial contaminations before I run my reports. I know how to use Bio::SearchIO to bring in the blast reports, and I know how to find the reports that I don't want using regular expressions, but what I can't figure out is how to write the good BLAST reports out to a file just as they are. I don't want to parse them at all, since my other scripts are expecting them as full BLAST reports and I'd rather not rewrite them.

If I can do this:

use Bio::SeqIO;
$in = Bio::SeqIO->new('-file' => "AIZX_test.fas",
                      '-format' => 'Fasta');
$out = Bio::SeqIO->new('-file' => ">AIZX_test_out.txt",
                      '-format' => 'Fasta');
while ( my $seq = $in->next_seq() ) {$out->write_seq($seq); }


why can't I do this:

use Bio::SearchIO;
$in = Bio::SearchIO->new('-file' => "BLASTx_test.txt",
                      '-format' => 'blast');
$out = Bio::SearchIO->new('-file' => ">BLASTx_test_out.txt",
                       '-format' => 'blast');
while ( my $blast = $in->next_result() ) {$out->write_result($blast); }

Thanks - I appreciate any help I can get!

Melodee
Lucigen Corp.
608-831-9011
mpatterson at lucigen.com








More information about the Bioperl-l mailing list