[BioSQL-l] genbank, references, and crc's

Hilmar Lapp hlapp at gmx.net
Tue Apr 10 16:09:43 UTC 2007


Hi Bryan,

thanks for tracking this down - great, I've committed it.

The 'correct' condition, as defined by the schema, would actually be  
test for author or title being specified, because location must be  
non-empty, according to the schema.

I.e., at least theoretically, the condition will now always be true,  
unless you removed the NOT NULL constraint locally on  
reference.location.

Would you mind testing whether removing the location() part from the  
if clause will still solve the issue?

	-hilmar

On Apr 9, 2007, at 12:05 PM, Bryan Cardillo wrote:

>         This is probably more of a bioperl issue, but since it was
>         previously discussed here, this is where I'll continue the
>         discussion.  I've just run into the same issues mentioned in
>         these threads while loading some refseq sequences.
>
>         http://lists.open-bio.org/pipermail/biosql-l/2006-July/ 
> 001024.html
>         http://lists.open-bio.org/pipermail/biosql-l/2006-August/ 
> 001048.html
>
>
>         I believe the bioperl-db patch below solves these issues.
>         The crux of the problem is that the _crc64 code uses the
>         authors, title, and location to determine a unique key.
>         However the get_unique_key_query method only checks authors
>         before deferring to a crc lookup.  The fix causes the crc key
>         to be used if any of authors, title, or location is
>         specified.
>
>         Cheers,
>         Bryan Cardillo
>         Penn Bioinformatics Core
>         University of Pennsylvania
>
>  ReferenceAdaptor.pm |    2 +-
>  1 files changed, 1 insertion(+), 1 deletion(-)
>
> Index: ./Bio/DB/BioSQL/ReferenceAdaptor.pm
> ===================================================================
> RCS file: /home/repository/bioperl/bioperl-db/Bio/DB/BioSQL/ 
> ReferenceAdaptor.pm,v
> retrieving revision 1.24
> diff -u -r1.24 ReferenceAdaptor.pm
> --- ./Bio/DB/BioSQL/ReferenceAdaptor.pm	4 Jul 2006 22:23:12 -0000	1.24
> +++ ./Bio/DB/BioSQL/ReferenceAdaptor.pm	9 Apr 2007 15:38:35 -0000
> @@ -426,7 +426,7 @@
>  	    });
>  	}
>      }
> -    if($obj->authors()) {
> +    if($obj->authors() || $obj->title() || $obj->location()) {
>  	push(@ukqueries, {
>  	    'doc_id' => $self->_crc64($obj),
>  	});
> _______________________________________________
> BioSQL-l mailing list
> BioSQL-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biosql-l

-- 
===========================================================
: Hilmar Lapp  -:-  Durham, NC  -:-  hlapp at gmx dot net :
===========================================================








More information about the BioSQL-l mailing list