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

Hilmar Lapp hlapp at gmx.net
Mon Apr 16 02:54:19 UTC 2007


On Apr 11, 2007, at 11:33 AM, Bryan Cardillo wrote:

> to put it another way, a reference instance with no authors,
>         no title, and a location can have a valid crc.  so why should
>         the adaptor ignore this case?

You're right - I can't just remove the location() test. Instead, I  
should be able to remove the bracketing if clause altogether. I.e.,  
in light of the schema, the construct

     if($obj->authors() || $obj->title() || $obj->location()) {
         push(@ukqueries, {
             'doc_id' => $self->_crc64($obj),
         });
     }

ought to be equivalent to

     push(@ukqueries, {
          'doc_id' => $self->_crc64($obj),
     });

The thing is that the BioPerl object model doesn't complain if you  
leave all three of authors, title, and location empty, no matter how  
non-sensical that is (it so happens that annotation parsed out from a  
legitimate sequence file in e.g. genbank format will always have  
location filled in).

I think I'll leave the if clause in and document that in reality for  
all legitimate annotation sources the clause should always evaluate  
to true.

Thanks for your observations - very sharp. I hope you'll stick around  
with the code for a while, it can certainly benefit from another pair  
of sharp eyes. Don't hesitate to let me know if you need any help.

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







More information about the BioSQL-l mailing list