[Bioperl-l] HMMER/Results

Mick Watson michaelwatson@paradigm-therapeutics.co.uk
Thu, 04 Jul 2002 16:43:39 +0100


Hi

I've found a bug in the bioperl-1.0.1 HMMER/Results module (I think!!)

The script I've pasted below instantiates a HMMER/Results object and prints
out the number of domains it contains.  It then iterates through each Set
object, counting the number of domains for each set.  In theory both of
these should be the same, and they are.  However, the script then goes on to
create a new HMMER/Results object using the &filter_on_cutoff method.  It
then does the same thing to the new object.  What it finds is that somehow,
each Set now has twice as many domains as it should have ie they have been
duplicated.

Either that or I am going completely mad!

Any ideas?

Thanks

Mick

#!/usr/bin/perl

use Bio::Tools::HMMER::Results;

my $res = new Bio::Tools::HMMER::Results( -file => "test.hmmout",
       -type => 'hmmsearch');

my $count = 0;

print "res has ", $res->number, " domains\n";
foreach $set ($res->each_Set) {
    $count += scalar($set->each_Domain);
}
print "res count = $count\n\n";



my $newres = $res->filter_on_cutoff(0,0);

my $count = 0;

print "newres has ", $newres->number, " domains\n";
foreach $set ($newres->each_Set) {
    $count += scalar($set->each_Domain);
}
print "newres count = $count\n\n";


####OUTPUT#####
res has 4 domains
res count = 4

newres has 4 domains
newres count = 8


Jason Stajich wrote:

> I believe this is already fixed as of bioperl-1.0.1
> Can you report what version of bioperl or the revision ID for that
> module (% perldoc -m Bio::Tools::HMMER::Result | grep Id)
>
> -j
>
> On Thu, 4 Jul 2002, Mick Watson wrote:
>
> > Hi
> >
> > In Bio::Tools::HMMER::Results, line 348 has the code:
> >
> >     $new = Bio::Tools::HMMER::Results->new();
> >
> > This is in the &filter_on_cutoff method.
> >
> > However, &new in the same module complains if you don't give it a -type
> > argument!
> >
> > The correct line should be:
> >
> >     $new = Bio::Tools::HMMER::Results->new(-type => 'hmmsearch');
> >
> > There should also be a "return $new;" as the last line in the method
> >
> > Thanks
> > Mick
> >
> > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l@bioperl.org
> > http://bioperl.org/mailman/listinfo/bioperl-l
> >
>
> --
> Jason Stajich
> Duke University
> jason at cgt.mc.duke.edu