[Bioperl-l] Re: [BioSQL-l] namespace and find_by_unique_key

Hilmar Lapp hlapp at gnf.org
Sun May 23 18:11:02 EDT 2004


I made the following changes in bioperl-db:

	- be strict if namespace is provided with the query object (i.e., if 
it is provided and not found, you won't find the accession or 
identifier either).

	- allow namespace to be omitted from the query object for the query by 
identifier ($seq->primary_id)

	- namespace must be provided (and found) for a by-accession query to 
be successful

	- version# is optional for (accession,version,namespace) queries; if 
defined it will be used and otherwise will match whatever version is in 
the database. CAVEAT: if you have multiple versions of the same 
accession in the same namespace and you omit the version when querying 
by unique key, you'll get an exception because multiple rows will match.

Let me know any comments, suggestions, and feedback if this behavior is 
not useful.

	-hilmar

On Monday, May 10, 2004, at 03:02  AM, Marc Logghe wrote:

> Hi Hilmar,
>> 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?
>
> You think it is feasible to code a kind of comprimise ? Setting a 
> 'strict' argument to 1 if you don't want cross namespace searches in 
> case no/wrong namespace is passed. The default could be strict => 0, 
> the original behaviour, being graceful with typos.
> Just an idea.
> Cheers,
> Marc
>
-- 
-------------------------------------------------------------
Hilmar Lapp                            email: lapp at gnf.org
GNF, San Diego, Ca. 92121              phone: +1-858-812-1757
-------------------------------------------------------------




More information about the Bioperl-l mailing list