[Bioperl-l] SearchIO newbie question

Jason Stajich jason.stajich at duke.edu
Tue May 24 10:31:54 EDT 2005


use the writer module
Bio::SearchIO::Writer::TextResultWriter

HTML writing is also covered in howto
http://bioperl.org/HOWTOs/SearchIO/outputting.html

On May 24, 2005, at 10:16 AM, Melodee Patterson wrote:

> 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
>
>
>
>
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>

--
Jason Stajich
jason.stajich at duke.edu
http://www.duke.edu/~jes12/




More information about the Bioperl-l mailing list