[Bioperl-l] Question to Bio::SearchIO::infernal.pm

Nadine Elpida Tatto nadine.tatto at boku.ac.at
Fri Jul 29 14:35:23 UTC 2011


Hi There!



I was wondering if you would or can help me.


I have an infernal report containing about 2000 CMs from an infernal run against Rfam.cm. To parse this report I wanted to use Bio::SearchIO::infernal.pm. Unfortunately this turned out to be a problem for me, because "$parser->next_result" only delivers the result for the first CM in the report and nothing more. 


My code:
#!/usr/bin/perl -w


use strict;use Data::Dumper;
use Bio::SearchIO;


my $infile = $ARGV[0];                  # infernal report
my $parser = Bio::SearchIO->new(-format => 'Infernal',
                                                   -file => $infile);


while( my $result = $parser->next_result ) {
      print $result->query_name . "\n";
}


exit;




The output: 


ntatto:~$ ./infernalParser.pl  infernal.output
5S_rRNA
ntatto:~$ 




I would expect the following (like parsing a blast report):


ntatto:~$ ./infernalParser.pl  infernal.output
5S_rRNA
5_8S_rRNA
U1
...
ntatto:~$ 



I would be glad for help.


Thank you in advance.


Best Regards


N Tatto







 







More information about the Bioperl-l mailing list