[BioSQL-l] Re: [Bioperl-l] loading up swissprot into bioperl-db

Hilmar Lapp hlapp@gnf.org
Sat, 19 Oct 2002 16:56:11 -0700


Fixed on the branch. Binomial was actually also a UK. MySQL < 
3.23.50 incorrectly or not at all handled UKs on nullable fields. In 
fact it still doesn't for composite UKs, of which one or more 
components may be NULL (this hit me when I wrote the Oracle version 
of the drivers).

	-hilmar

On Tuesday, October 15, 2002, at 03:08 AM, <shawnh@worf.fugu-sg.org> 
wrote:

> Sorry didn't see this mail earlier.
>
> I'm using bioperl-release-1-1-0 for all modules.
>
> Basically the biosql schema for the taxa table is:
>
> mysql> describe taxa;
> +--------------+------------------+------+-----+---------+----------------+
> | Field        | Type             | Null | Key | Default | 
> Extra          |
> +--------------+------------------+------+-----+---------+----------------+
> | taxa_id      | int(10) unsigned |      | PRI | NULL    | 
> auto_increment |
> | binomial     | varchar(96)      |      | 
> UNI |         |                |
> | common_name  | varchar(255)     | YES  | MUL | 
> NULL    |                |
> | ncbi_taxa_id | int(10)          | YES  | MUL | 
> NULL    |                |
> | full_lineage | 
> mediumtext       |      |     |         |                |
> +--------------+------------------+------+-----+---------+----------------+
>
> In Bio::DB::BioSQL::SpeciesAdaptor::store_if_needed
>
> its storing into the table:
> $sth = $self->prepare("insert into taxa (full_lineage,common_name) 
> values ($str,$common_name)");
>   $sth->execute;
>
> and its a problem since ncbi_taxa_id is a key.
>
> DBD::mysql::st execute failed: Duplicate entry '' for key 4 at 
> /usr/users/shawnh//_tmp_src/bioperl-
> db-1-1-0/Bio/DB/BioSQL/SpeciesAdaptor.pm line 148, <GEN0> line 99.
>
> thanks
>
> shawn
>
>
>
> On Tue, 8 Oct 2002, Hilmar Lapp wrote:
>
>> You should be using bioperl-release-1-1-0 across the modules, 
>> i.e., biosql-schema, bioperl-db, and bioperl-live. Later versions 
>> of bioperl-live may work, later versions of the other two won't 
>> (unless you upgrade everything to their main trunks, but that 
>> would need innodb support).
>>
>> What is the error message you're getting?
>>
>> 	-hilmar
>>
>>
>>> -----Original Message-----
>>> From: shawnh@worf.fugu-sg.org [mailto:shawnh@worf.fugu-sg.org]
>>> Sent: Tuesday, October 08, 2002 5:50 AM
>>> To: bioperl-l@bioperl.org
>>> Subject: [Bioperl-l] loading up swissprot into bioperl-db
>>>
>>>
>>> Hi,
>>> 	I'm trying to load up swissprot files into bioperl-db
>>> and am trying out the branch bioperl-release-1-1-0. Currently get
>>> errors on the taxa table, since the store method in SpeciesAdaptor
>>> doesn't seem to be inserting the binomial and ncbi_taxa_id. Is this
>>> a problem of the schema and the code version being out of sync?
>>> or should I revert to a older version? I can't work off the main 
>>> trunk
>>> as our mysql db here isn't compiled with INNODB.
>>>
>>>
>>> thanks
>>>
>>>
>>> shawn
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Bioperl-l mailing list
>>> Bioperl-l@bioperl.org
>>> http://bioperl.org/mailman/listinfo/bioperl-l
>>>
>>
>
> --
> ********************************
> * Shawn Hoon
> * http://www.fugu-sg.org/~shawnh
> ********************************
>
>
--
-------------------------------------------------------------
Hilmar Lapp                            email: lapp at gnf.org
GNF, San Diego, Ca. 92121              phone: +1-858-812-1757
-------------------------------------------------------------