SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
perl bioperl version m_elena_bioinfo Bioinformatics 1 02-21-2011 10:37 AM
bam output file to psl file fahim Genomic Resequencing 1 12-26-2010 12:27 PM
bioperl for samtools m_elena_bioinfo Bioinformatics 4 09-07-2010 05:39 AM
Bioperl jsun529 Bioinformatics 7 09-01-2009 07:27 AM
Bioperl Coordinate GeneMap jsun529 Bioinformatics 1 08-28-2009 07:23 AM

Reply
 
Thread Tools
Old 02-05-2012, 06:36 AM   #1
detq182
Member
 
Location: Colombia

Join Date: Feb 2012
Posts: 20
Post Bioperl output file

Hi everyone
i need some help in this script
HTML Code:
#!/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 result of de perl script on a file but i dont know how.....

the file extension could be .Xml, Txt etc.

plz some help

Last edited by detq182; 02-05-2012 at 10:05 AM.
detq182 is offline   Reply With Quote
Old 02-06-2012, 12:08 AM   #2
gringer
David Eccles (gringer)
 
Location: Wellington, New Zealand

Join Date: May 2011
Posts: 838
Default

Just pipe standard out to a file:
Code:
./script.pl > file.txt

Last edited by gringer; 02-06-2012 at 12:12 AM.
gringer is offline   Reply With Quote
Old 02-06-2012, 03:50 AM   #3
detq182
Member
 
Location: Colombia

Join Date: Feb 2012
Posts: 20
Default

Thank you, work.
detq182 is offline   Reply With Quote
Old 02-06-2012, 07:57 PM   #4
A_Morozov
Member
 
Location: Russia, Irkutsk

Join Date: Feb 2011
Posts: 40
Default

Or more straightforward way: print to filehandle. And SearchIO objs have some output methods, as I recall.
A_Morozov is offline   Reply With Quote
Reply

Tags
bioperl

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 06:49 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO