[Bioperl-l] Bio::Search results

Barry Moore bmoore at genetics.utah.edu
Tue Aug 30 10:40:52 EDT 2005


Sean,

Don't see anything obviously wrong.  If you want to send your input
file, I'll try to recreate the problem.

Barry

-----Original Message-----
From: bioperl-l-bounces at portal.open-bio.org
[mailto:bioperl-l-bounces at portal.open-bio.org] On Behalf Of Sean
O'Keeffe
Sent: Tuesday, August 30, 2005 2:55 AM
To: bioperl-l at portal.open-bio.org
Subject: [Bioperl-l] Bio::Search results

Hi,
The following code snippet is something I use to extract information
from hmmer result files:

use Bio::SearchIO;

my $in =3D new Bio::SearchIO( -format =3D> 'hmmer',  -file =3D> $ARGV[0]
);
while(my $result =3D $in->next_result) {
  print $result->query_name(), "\n",$result->query_description(),"\n";
  while (my $hit =3D $result->next_hit) {
    while(my $hsp =3D $hit->next_domain) {
      next unless ($hsp->name =3D~ /^ig|^lrr|^fn3|^egf|^tsp|^psi/i);
      print $hsp->start(),"\t",$hsp->end(),"\t",$hsp->evalue(),"\n";
    }
  }
}

The input file is generated by hmmpfam and is given at the command
line. I use it to scan for specific domain names e.g ig, fn3 lrr etc.
This code works for the first loop and then ends so I get the name and
description (no hsp values as their are none for this result):

ENSMUSP00000065602=20
pep:novel supercontig::NT_085813:405:1510:-1 gene:ENSMUSG00000054059
transcript:ENSMUST00000066517

My question is why does the loop end after one instance. Incidentally
the outputted  name and description above are the last ones in the
hmmer file (maybe the file is read from the back??? - don't know if this
means anything).
Any thoughts would be appreciated. Thanks,
Sean.

_______________________________________________
Bioperl-l mailing list
Bioperl-l at portal.open-bio.org
http://portal.open-bio.org/mailman/listinfo/bioperl-l



More information about the Bioperl-l mailing list