[BioSQL-l] adding non-positional features via bioperl to a biosql database

James Procter jimp at compbio.dundee.ac.uk
Wed Feb 11 10:22:32 EST 2009


More on this - see below for off list discussion :
Hilmar Lapp wrote:
> 
> On Feb 11, 2009, at 3:58 AM, James Procter wrote:
> 
>> Hilmar Lapp wrote:
>>> I think the fact that it doesn't raise an error speaks much more to the
>>> fact that 1-based coordinates aren't fully enforced than that a
>>> coordinate of 0 is fully supported. If the coordinate is undef you
>>> probably get the same translation to '.' in GFF, and the fact that you
>>> get that also for 0 is probably simply due to 0 and undef both
>>> evaluating to false in Perl if in an if clause.
>> The latter is a specific bug and should really be a testcase. Bioperl-DB
>> should not allow a feature with invalid start/end to be persisted -
>> because it makes that sequence feature inaccessible, and throws fatal
>> errors when any additional information is persisted on the sequence.
> 
> 
> I see your reasoning, and I agree that there is a bug here somewhere,
> and that there should be a test case. I guess the way I see it is that
> Bioperl-db is an ORM. It doesn't judge Bioperl - it assumes that if you
> give it a BioPerl object to persist that BioPerl allowed you to create
> then either you or BioPerl or both knew what they were doing and will
> just try to obey the order to persist the object. So I think Bioperl-db
> is the wrong place to put semantic validity checks on BioPerl objects.
yes. The problem is earlier on - bioperl's generic feature module
allowing a feature to be created with start==0.
> 
> That said, maybe BioSQL shouldn't permit entries that don't comply with
> the model definition, as in BioSQL aiming to be the Bio* interoperable
> reference model. So maybe what we should do is put a constraint on
> location that prohibits the start and end to be zero.
I agree. I even had a discussion today with a colleague about ensuring a
schema is sufficiently specified that different user groups do not use
it in incompatible ways. I think its important that the schema is
sufficiently constrained... at least, when everyone can agree on the
constraint!

> Not sure why you thought this isn't relevant to BioSQL anymore :-)
Heh - I thought I was going into the realms of bioperl/db test cases,
rather than purely biosql relevant discussion.

Jim


More information about the BioSQL-l mailing list