[Bioperl-l] [bug 3120] Bio::DB::SeqFeature::Store::DBI::SQLite + bp_seqfeature_gff3.PLS = unhappy?

Chris Fields cjfields at illinois.edu
Sun Jul 25 15:18:41 EDT 2010


On Jul 25, 2010, at 1:36 PM, John Anderson wrote:

> On Jul 25, 2010, at 2:06 PM, John Anderson wrote:
>> Second, when called on a database that's been built with '$db->no_blobs(1)', the output 
> [ snip ]
> 
> I just pushed a second changeset to <http://github.com/genehack/bioperl-live/tree/topic/bug-3120> that I believe fixes this problem. It passes all the tests that are run when Build.PL is configured with the "standard" module list, and it generates much more useful output when run through the scripts in Jay's bug report. 
> 
> I did not add any tests for the functionality I added, because I'm not sure where the appropriate place to add them is. Feedback on that would be appreciated -- I think it should be possible to turn the test case Jay appended to the original bug report into a rudimentary test of this change.
> 
> (A pull request for this change has been sent to the 'bioperl' user on Github.)
> 
> thanks,
> john.

On this one (in Bio::DB::SeqFeature::DBI::mysql):

 if ( $typeid and $db_seqid and $start and $end and $strand ) {
      # then we're good...
    }
    else {
      my $sql = qq{ SELECT start,end,tag,strand,seqname
                    FROM feature,feature_location,typelist,locationlist
                    WHERE feature.id=feature_location.id AND feature.typeid=typelist.id
                    AND seqid=locationlist.id AND feature.id = ? };
      ....
}

Changing this to the following should work and is more direct:

 if ( !defined($typeid) || !defined($db_seqid) || !defined($start) || !defined($end) || !defined($strand) ) {
      my $sql = qq{ SELECT start,end,tag,strand,seqname
                    FROM feature,feature_location,typelist,locationlist
                    WHERE feature.id=feature_location.id AND feature.typeid=typelist.id
                    AND seqid=locationlist.id AND feature.id = ? };
      ....
}

Might even work shortening to a grep:

if ( grep {!defined($_)} ($typeid, $db_seqid, $start, $end,$strand) ) {...}

chris




More information about the Bioperl-l mailing list