[Bioperl-l] Bioperl parsing output file

Heikki Lehvaslaiho heikki.lehvaslaiho at gmail.com
Mon Feb 6 01:30:45 EST 2012


Daniel,

You are already printing the output to STDOUT which goes to the
terminal. You can redirect the output to a file using "prog > file"
syntax on the command line or read about the perl open function
(perldoc -f open) and print directly to a named file from within a
script.


     -Heikki

Heikki Lehvaslaiho - skype:heikki_lehvaslaiho http://about.me/heikki
cell: +966 545 595 849  office: +966 2 808 2429

Computational Bioscience Research Center (CBRC), Building #2, Office #4337
4700 King Abdullah University of Science and Technology (KAUST)
Thuwal 23955-6900, Kingdom of Saudi Arabia



On 5 February 2012 22:04, DANIEL EDUARDO TORRENTE QUINTERO
<dtorrente at javeriana.edu.co> wrote:
> i need some help in this script
>
>
> #!/usr/bin/perl
> use Bio::SearchIO;
>
> $report_obj = new Bio::SearchIO(-format => 'blast',
>                     -file   => 'C:\blast-2.2.25+\Lib3_consensus_dbAt.xml');
>    while( $result = $report_obj->next_result ) {
>        while( $hit = $result->next_hit ) {
>           while( $hsp = $hit->next_hsp ) {
>              if ( $hsp->evalue <= 0.00001 ) {
>                   print "Hit\t", $hit->name, "\n", "Length\t", $hsp->length('total'),
>                   "\n", "Percent_id\t",
>                   $hsp->percent_identity, "\n",$result>query_name(),;  }  } } }
>
>
> I want to export the results of de perl script on a file but i dont know how..... i tried to use all the  Bio::SearchIO::Writer<http://www.bioperl.org/wiki/Module:Bio::SearchIO::Writer> methods but i cant make it work with this script.
>
>
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l



More information about the Bioperl-l mailing list