[Bioperl-l] Bio::DB::GFF/Postgres test failures

Scott Cain scott at scottcain.net
Fri Apr 8 15:41:39 UTC 2011


Hi Lincoln,

I've been looking into some test failures with the postgres adaptor
for Bio::DB::GFF and I wanted to check with you that I'm interpreting
this correctly.  In t/LocalDB/BioDBGFF.t there are these lines:

  @features = sort {$a->start<=>$b->start} @features;

  is($features[0]->type,'Component:reference');
  is($features[-1]->type,'exon:confirmed');

So that the features in the data set are sorted by their start values
and the beginning and end of the list are checked.  The test refers to
the test.gff data file, that contains among others these lines:

Contig1 confirmed   transcript      30001   31000   .   -   .
Transcript trans-2; Gene "xyz-2"; Note "Terribly interesting"
Contig1 confirmed   exon    30001   30100   .   -   .   Transcript
trans-2; Gene "abc-1"; Note "function unknown"
Contig1 confirmed   exon    30701   30800   .   -   .   Transcript trans-2
Contig1 confirmed   exon    30801   31000   .   -   .   Transcript trans-2

Since this transcript and its exons are on the minus strand, the
values that the start and stop method return will be reversed, so that
start for the transcript will be 31000 and stop will be 30001.  The
problem with this test is since the last exon and the transcript share
a start value (31000), you can't really be sure which one will be at
the bottom of the list after sorting, right?  In the case of the
postgres adaptor, it fails this test on my machine because the
transcript is at the bottom of the list.  The test for the beginning
of the list similarly could fail though it didn't in my case, as other
features that have 1 as a start are of type "Component:clone".

So, my question is this: am I missing something, and the postgres
adaptor is not behaving as expected, or are these tests ambiguous?

Thanks,
Scott


-- 
------------------------------------------------------------------------
Scott Cain, Ph. D.                                   scott at scottcain dot net
GMOD Coordinator (http://gmod.org/)                     216-392-3087
Ontario Institute for Cancer Research




More information about the Bioperl-l mailing list