[BioSQL-l] namespace and find_by_unique_key

Marc Logghe Marc.Logghe at devgen.com
Fri May 7 04:26:52 EDT 2004



> -----Original Message-----
> From: Hilmar Lapp [mailto:hlapp at gnf.org]
> Sent: vrijdag 7 mei 2004 10:03
> To: Marc Logghe
> Cc: biosql-l at open-bio.org
> Subject: Re: [BioSQL-l] namespace and find_by_unique_key
> 
> 
> 
> On Friday, May 7, 2004, at 12:50  AM, Marc Logghe wrote:
> 
> > Some more experiments. Two namespaces WormGene and WormPep. Request 
> > for 'ZK822.4'.
> > 1) namespace set to 'sprot_hum' => error because 2 rows 
> found (ZK8224 
> > is in both namespaces)
> 
> Probably because sprot_hum does not exist as a namespace in your 
> database. Or does it?
> 
> > 2) namesace undef => error because 2 rows found (ZK8224 is in both 
> > namespaces)
> > 3) namespace 'WormGene' => correct bioentry fetched
> > 4) namespace 'WormPep' => correct bioentry fetched
> > Does this mean that when the namespace is undef or does not 
> exist the 
> > system performs a cross-namespace search ?
> 
> Yes, that's what I said.
> 
> You can convince me that this is bad if the namespace is set 
> but fails 
> to be looked up (because it's not in the database). I guess 
> my original 
> intent was to be graceful with typing errors, but you have a 
> case where 
> this behavior clearly doesn't sound very helpful.
> 
> Do you suggest to change this such that if the namespace is 
> defined in 
> the query sequence but is not in the database the unique key query 
> should not find anything?

I'd really like that, but who am I ?
The fact is that this would solve a problem we have with gbrowse (although I did not realize till 2 days ago we had a problem ;-). We consider a namespace as a separate data source for gbrowse. So, in the conf we set the namespace in order to fetch only bientries from that datasource. In that context, we prefer not to have namespace contamination, in the sense that when we want an entry from namespaceA we are absolutely sure it is coming from there (e.g. wormbase fix 110 in namespace WS110, fix 120 in WS120). When a typo is made (or for whatever reason the namespace conf setting does not make it to the relavant adaptor object) in the namespace we should not have anything returned. Maybe a warning about the namespace not existing.
What do others think about that ?
Thanks for the help.
Marc



More information about the BioSQL-l mailing list