[Bioperl-l] filter_by_location in Bio::DB::SeqFeature::Store::memory

Mitch Skinner mitch_skinner at berkeley.edu
Thu Jan 14 17:10:53 EST 2010


Hi,

Some people haven't been getting all of the features in their GFF3 into 
JBrowse, and a nice test case that James Casbon posted to the list 
helped me track it down.

Here's an example of the behavior I was seeing with BioPerl 1.6.1 (using 
Devel::REPL):

==============
$ use Bio::DB::SeqFeature::Store

$ my $db = Bio::DB::SeqFeature::Store->new(-adaptor=>"memory", 
-dsn=>"casbon.gff3")
$Bio_DB_SeqFeature_Store_memory1 = 
Bio::DB::SeqFeature::Store::memory=HASH(0xa27ceec);

$ $db->features(-seq_id=>"CYP2C8")
$ARRAY1 = [
             Feature:src(41),
             region(CYP2C8),
             Feature:src(37),
             Feature:src(39),
             Feature:src(42),
             Feature:src(40),
             Feature:src(38)
           ];
==============

I expected to also see the features with IDs 43 and 44 (the gff3 file is 
attached).

I think there's a problem in the filter_by_location method.  If start 
and end parameters aren't passed to the method, it sets default start 
and end values that lead it to examine all of the bins in its index.  
But the end value that it creates is at the beginning of the last bin, 
and I think it should be at the end of the last bin instead.  The 
attached patch changes it to be at the end of the last bin.

Regards,
Mitch
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: casbon.gff3
URL: <http://lists.open-bio.org/pipermail/bioperl-l/attachments/20100114/8494aaa7/attachment.pl>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bdsfsm-filter_by_location.patch
URL: <http://lists.open-bio.org/pipermail/bioperl-l/attachments/20100114/8494aaa7/attachment-0001.pl>


More information about the Bioperl-l mailing list