[Bioperl-l] SearchIO newbie question

James Wasmuth james.wasmuth at ed.ac.uk
Tue May 24 10:51:09 EDT 2005


Hi Melodee,

you need to use Bio::SearchIO::Writer::TextResultWriter:   
http://doc.bioperl.org/releases/bioperl-1.4/Bio/SearchIO/Writer/TextResultWriter.html
there's some documentation in the HOWTOs:   
http://bioperl.org/HOWTOs/SearchIO/outputting.html

hth
james


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
>  
>

-- 
"Until man duplicates a blade of grass, nature can laugh at his so-called scientific knowledge...."
            --Thomas Edison 

Blaxter Nematode Genomics Group   |
Institute of Evolutionary Biology |
Ashworth Laboratories, KB         | tel: +44 131 650 7403
University of Edinburgh           | web: www.nematodes.org
Edinburgh                         |
EH9 3JT                           |
UK                                |	
 



More information about the Bioperl-l mailing list