[BioSQL-l] Error when loading Gene Ontology to biosql

Hilmar Lapp hlapp at gmx.net
Thu Jul 23 12:49:48 UTC 2009


Hi Carlos - that's an odd error that we haven't seen yet. My first  
impulse would be to suspect that your database wasn't empty when you  
ran this, and that the error you got is due to a term in the input  
file clashing with one you already have in the database.

You can check this by looking into your database:

SQL> SELECT * FROM term WHERE identifier = 'GO:0001404' or name =  
'invasive growth';

Does this return anything?

Note that load_ontology.pl is perfectly equipped to update an existing  
ontology - check the POD and look for the --lookup command line option  
(and the several options following it in the POD with which you can  
modify the exact update behavior). By default though the script will  
assume that it is loading a new ontology.

	-hilmar

On Jul 23, 2009, at 3:27 AM, Carlos A. Canchaya wrote:

> Hi Hilmar,
>
> thanks for the help. I've tried now this
>
> load_ontology.pl --driver Pg --dbname biosql --dbuser yyyy--dbpass  
> xxxx --namespace "Gene Ontology" --format obo gene_ontology.1_2.obo
>
> downloaded from here
>
> http://www.geneontology.org/ontology/obo_format_1_2/gene_ontology.1_2.obo
>
> and I have this error message.
>
> --------------------- WARNING ---------------------
> MSG: DBLink exists in the dblink of _default
> ---------------------------------------------------
> Could not store term GO:0001404, name 'invasive growth':
>
> ------------- EXCEPTION: Bio::Root::Exception -------------
> MSG: create: object (Bio::Ontology::OBOterm) failed to insert or to  
> be found by unique key
> STACK: Error::throw
> STACK: Bio::Root::Root::throw /usr/local/share/perl/5.10.0/Bio/Root/ 
> Root.pm:357
> STACK: Bio::DB::BioSQL::BasePersistenceAdaptor::create /usr/local/ 
> share/perl/5.10.0/Bio/DB/BioSQL/BasePersistenceAdaptor.pm:219
> STACK: Bio::DB::BioSQL::BasePersistenceAdaptor::store /usr/local/ 
> share/perl/5.10.0/Bio/DB/BioSQL/BasePersistenceAdaptor.pm:264
> STACK: Bio::DB::Persistent::PersistentObject::store /usr/local/share/ 
> perl/5.10.0/Bio/DB/Persistent/PersistentObject.pm:284
> STACK: main::persist_term /tmp/BioPerl-db-1.6.0/scripts/biosql/ 
> load_ontology.pl:812
> STACK: /tmp/BioPerl-db-1.6.0/scripts/biosql/load_ontology.pl:617
> -----------------------------------------------------------
>
> at /tmp/BioPerl-db-1.6.0/scripts/biosql/load_ontology.pl line 824
>        main::persist_term('-term',  
> 'Bio::Ontology::OBOterm=HASH(0x9330318)', '-db',  
> 'Bio::DB::BioSQL::DBAdaptor=HASH(0x8a17ac0)', '-termfactory', undef,  
> '-throw', 'CODE(0x85f4708)', '-mergeobs', ...) called at /tmp/ 
> BioPerl-db-1.6.0/scripts/biosql/load_ontology.pl line 617
>
> Any hints to know where the problem would be?
>
> Thanks in advance,
>
> Carlos
>
> Carlos  Canchaya
> ccanchaya at gmail.com
>
>
>
> On Jul 22, 2009, at 8:15 PM, Hilmar Lapp wrote:
>
>> Please leave off the --fmtargs GO.defs argument - this is not a  
>> file in the .obo format.
>>
>> 	-hilmar
>>
>> On Jul 22, 2009, at 11:05 AM, Carlos A. Canchaya wrote:
>>
>>> Hi guys,
>>>
>>> I've tried to execute load_ontologies following your suggestions as
>>>
>>> load_ontology.pl --driver Pg --dbname biosql --dbuser yyy --dbpass  
>>> xxx --namespace "Gene Ontology" --fmtargs GO.defs --format obo  
>>> gene_ontology.1_2.obo
>>>
>>> However I have many warnings first
>>>
>>> --------------------- WARNING ---------------------
>>> MSG: DBLink exists in the dblink of _default
>>> ---------------------------------------------------
>>>
>>> and then
>>>
>>> --------------------- WARNING ---------------------
>>> MSG: DBLink exists in the dblink of _default
>>> ---------------------------------------------------
>>> Could not store term GO:0001404, name 'invasive growth':
>>>
>>> ------------- EXCEPTION: Bio::Root::Exception -------------
>>> MSG: create: object (Bio::Ontology::OBOterm) failed to insert or  
>>> to be found by unique key
>>> STACK: Error::throw
>>> STACK: Bio::Root::Root::throw /home/carlos/nascent/download/ 
>>> bioperl-live//Bio/Root/Root.pm:357
>>> STACK: Bio::DB::BioSQL::BasePersistenceAdaptor::create /usr/local/ 
>>> share/perl/5.10.0/Bio/DB/BioSQL/BasePersistenceAdaptor.pm:219
>>> STACK: Bio::DB::BioSQL::BasePersistenceAdaptor::store /usr/local/ 
>>> share/perl/5.10.0/Bio/DB/BioSQL/BasePersistenceAdaptor.pm:264
>>> STACK: Bio::DB::Persistent::PersistentObject::store /usr/local/ 
>>> share/perl/5.10.0/Bio/DB/Persistent/PersistentObject.pm:284
>>> STACK: main::persist_term /tmp/BioPerl-db-1.6.0/scripts/biosql/ 
>>> load_ontology.pl:812
>>> STACK: /tmp/BioPerl-db-1.6.0/scripts/biosql/load_ontology.pl:617
>>> -----------------------------------------------------------
>>>
>>> at /tmp/BioPerl-db-1.6.0/scripts/biosql/load_ontology.pl line 824
>>>      main::persist_term('-term',  
>>> 'Bio::Ontology::OBOterm=HASH(0x9c86078)', '-db',  
>>> 'Bio::DB::BioSQL::DBAdaptor=HASH(0x936ed50)', '-termfactory',  
>>> undef, '-throw', 'CODE(0x8f49a50)', '-mergeobs', ...) called at / 
>>> tmp/BioPerl-db-1.6.0/scripts/biosql/load_ontology.pl line 617
>>>
>>>
>>> Any ideas why?
>>>
>>> Thanks in advance,
>>>
>>> Carlos
>>>
>>>
>>> Carlos  Canchaya
>>> ccanchaya at gmail.com
>>>
>>>
>>>
>>> On Jul 22, 2009, at 1:08 PM, Song Haili wrote:
>>>
>>>> Hi Florian,
>>>> Aha, that's the problem. Gene_ontology.1_2.obo works fine. I  
>>>> didn't use gene_ontology.1_2.obo, but as you can see instead I  
>>>> used gene_ontology.obo (ftp://ftp.geneontology.org/pub/go/ontology/gene_ontology.obo 
>>>> ). However, I don't understand why I can't use gene_ontology.obo  
>>>> which I think, does not differ a lot with gene_ontology.1_2.obo  
>>>> at the beginning of the two files. Thanks a lot again, Florian  
>>>> and Hilmar.
>>>> song
>>>>
>>>> ----- Original Message -----
>>>> From: Florian Mittag <florian.mittag at uni-tuebingen.de>
>>>> Date: Wednesday, July 22, 2009 10:44
>>>> Subject: Re: [BioSQL-l] Error when loading Gene Ontology to biosql
>>>> To: Song Haili <haili at mpiz-koeln.mpg.de>
>>>> Cc: biosql-l at lists.open-bio.org
>>>>
>>>>> Hi Song,
>>>>>
>>>>> just to be clear: Did you download the file
>>>>> gene_ontology.1_2.obo from
>>>>> http://www.geneontology.org/GO.downloads.ontology.shtml ?
>>>>>
>>>>> (http://www.geneontology.org/ontology/obo_format_1_2/gene_ontology.1_2.obo 
>>>>> )
>>>>>
>>>>> You need to specify the correct file then, because the command
>>>>> you described
>>>>> expects a file called "gene_ontology.obo", which is not the
>>>>> orginial name of
>>>>> the file to download.
>>>>>
>>>>> On Wednesday 22 July 2009 09:50, Song Haili wrote:
>>>>>> Hello Hilmar,
>>>>>> Thank you very much for your help.
>>>>>> I got the same error even I don't use the argument --fmtargs.
>>>>> Actually that
>>>>>> was the first try before I use --fmtargs. Any idea on how to
>>>>> solve this
>>>>>> problem? Thanks in advance.
>>>>>>
>>>>>> command:
>>>>>> perl load_ontology.pl --driver Pg --host pg-server --dbname  
>>>>>> sifter
>>>>>> --dbuser sifter --dbpass password --namespace "Gene Ontology" -
>>>>> -format obo
>>>>>> gene_ontology.obo --noobsolete error:
>>>>>> ------------- EXCEPTION -------------
>>>>>> MSG: OBO File Format Error -
>>>>>> Cannot find tag format-version and/ default-namespace . These
>>>>> are required
>>>>>> header.
>>>>>>
>>>>>> STACK Bio::OntologyIO::obo::_header
>>>>>> /opt/share/local/users/haili/bioperl-
>>>>> live/Bio/OntologyIO/obo.pm:518 STACK
>>>>>> Bio::OntologyIO::obo::parse
>>>>>> /opt/share/local/users/haili/bioperl-
>>>>> live/Bio/OntologyIO/obo.pm:209 STACK
>>>>>> Bio::OntologyIO::obo::next_ontology
>>>>>> /opt/share/local/users/haili/bioperl-
>>>>> live/Bio/OntologyIO/obo.pm:342 STACK
>>>>>> toplevel load_ontology.pl:604
>>>>>> -------------------------------------
>>>>>>
>>>>>> ----- Original Message -----
>>>>>> From: Hilmar Lapp <hlapp at gmx.net>
>>>>>> Date: Tuesday, July 21, 2009 19:19
>>>>>> Subject: Re: [BioSQL-l] Error when loading Gene Ontology to  
>>>>>> biosql
>>>>>> To: Song Haili <haili at mpiz-koeln.mpg.de>
>>>>>> Cc: florian.mittag at uni-tuebingen.de, biosql-l at lists.open-bio.org
>>>>>>
>>>>>>> Song: GO.defs is not in OBO format. Where did you find that you
>>>>>>> need
>>>>>>> it when you load .obo formatted files? You don't need the --
>>>>>>> fmtargs
>>>>>>> argument for .obo files other than if you want to specify the
>>>>>>> ontology
>>>>>>> name.
>>>>>>>
>>>>>>> 	-hilmar
>>>>>>>
>>>>>>> On Jul 21, 2009, at 11:32 AM, Song Haili wrote:
>>>>>>>> Hello All,
>>>>>>>> The previous error was solved by the help of Florian. Florian,
>>>>>>>
>>>>>>> Thank
>>>>>>>
>>>>>>>> you very much.
>>>>>>>> But I got another error using the way Florian suggested. I
>>>>>>>
>>>>>>> thought
>>>>>>>
>>>>>>>> it was because parameter --fmtargs was not specified. So I
>>>>>>>
>>>>>>> tried to
>>>>>>>
>>>>>>>> include it with the value "-defs_file, GO.defs", but it didn't
>>>>>>>
>>>>>>> work.
>>>>>>>
>>>>>>>> I think maybe GO.defs is not the right file. Is it?  But
>>>>>>>
>>>>>>> how or
>>>>>>>
>>>>>>>> where to get the right file if it is. Or any other ideas about
>>>>>>>
>>>>>>> how
>>>>>>>
>>>>>>>> to solve this error? Thank you very much in advance.
>>>>>>>> command:
>>>>>>>> perl load_ontology.pl --driver Pg --host pg-server --dbname
>>>>>>>
>>>>>>> sifter
>>>>>>>
>>>>>>>> --dbuser sifter --dbpass password --namespace "Gene
>>>>> Ontology" -
>>>>>>>
>>>>>>> -
>>>>>>>
>>>>>>>> format obo gene_ontology.obo --fmtargs "-defs_file,
>>>>> GO.defs" --
>>>>>>>>
>>>>>>>> noobsolete
>>>>>>>> error:
>>>>>>>> ------------- EXCEPTION -------------
>>>>>>>> MSG: OBO File Format Error -
>>>>>>>> Cannot find tag format-version and/ default-namespace . These
>>>>>>>
>>>>>>> are
>>>>>>>
>>>>>>>> required header.
>>>>>>>>
>>>>>>>> STACK Bio::OntologyIO::obo::_header
>>>>>>>
>>>>>>> /opt/share/local/users/haili/
>>>>>>>
>>>>>>>> bioperl-live/Bio/OntologyIO/obo.pm:518
>>>>>>>> STACK Bio::OntologyIO::obo::parse
>>>>>>>
>>>>>>> /opt/share/local/users/haili/
>>>>>>>
>>>>>>>> bioperl-live/Bio/OntologyIO/obo.pm:209
>>>>>>>> STACK Bio::OntologyIO::obo::next_ontology
>>>>>>>
>>>>>>> /opt/share/local/users/
>>>>>>>
>>>>>>>> haili/bioperl-live/Bio/OntologyIO/obo.pm:342
>>>>>>>> STACK toplevel load_ontology.pl:604
>>>>>>>> -------------------------------------
>>>>>>>>
>>>>>>>> ----- Original Message -----
>>>>>>>> From: Florian Mittag <florian.mittag at uni-tuebingen.de>
>>>>>>>> Date: Tuesday, July 21, 2009 14:41
>>>>>>>> Subject: Re: [BioSQL-l] Error when loading Gene Ontology
>>>>> to biosql
>>>>>>>> To: biosql-l at lists.open-bio.org
>>>>>>>>
>>>>>>>>> Hi!
>>>>>>>>>
>>>>>>>>> AFAIK the goflat format is deprecated. Use the .obo files and
>>>>>>>>> format instead,
>>>>>>>>> that should work.
>>>>>>>>>
>>>>>>>>> perl load_ontology.pl --driver Pg --host pg-server --
>>>>> dbname sifter
>>>>>>>>> 	--dbuser sifter --dbpass password --namespace "Gene
>>>>>>>
>>>>>>> Ontology" --
>>>>>>>
>>>>>>>>> format obo
>>>>>>>>>
>>>>>>>
>>>>>>> gene_ontology.1_2.obo>> --noobsolete
>>>>>>>
>>>>>>>>> On Tuesday 21 July 2009 12:11, Song Haili wrote:
>>>>>>>>>> Dear all,
>>>>>>>>>> I am using perl-5.10.0, BioPerl-1.6.0, and bioperl-db obtaind
>>>>>>>>>
>>>>>>>>> by using CPAN
>>>>>>>>>
>>>>>>>>>> a few days before. Until now, I can load taxonomy and  
>>>>>>>>>> sequence
>>>>>>>>>
>>>>>>>>> data into
>>>>>>>>>
>>>>>>>>>> database successfully. However, I got the following error
>>>>>>>>>
>>>>>>>>> message when
>>>>>>>>>
>>>>>>>>>> trying to load Gene Ontology data into biosql database. Any
>>>>>>>>>
>>>>>>>>> help will be
>>>>>>>>>
>>>>>>>>>> appreciated. Jane
>>>>>>>>>>
>>>>>>>>>> command used:
>>>>>>>>>> perl load_ontology.pl --driver Pg --host pg-server --dbname
>>>>>>>>>
>>>>>>>>> sifter -dbuser
>>>>>>>>>
>>>>>>>>>> sifter --dbpass password --namespace "Gene Ontology" --
>>>>>>>
>>>>>>> format
>>>>>>>
>>>>>>>>>> goflat
>>>>>>>>>> component.ontology process.ontology function.ontology --
>>>>> fmtargs> > >>> "-defs_file, GO.defs" --noobsolete
>>>>>>>>>>
>>>>>>>>>> error:
>>>>>>>>>> ------------- EXCEPTION -------------
>>>>>>>>>> MSG: Could not open --namespace: No such file or  
>>>>>>>>>> directory
>>>>>>>>>> STACK Bio::Root::IO::_initialize_io
>>>>>>>>>> /opt/share/local/users/haili/bioperl-
>>>>> live/Bio/Root/IO.pm:323 STACK
>>>>>>>>>> Bio::OntologyIO::dagflat::parse
>>>>>>>>>> /opt/share/local/users/haili/bioperl-
>>>>>>>>>
>>>>>>>>> live/Bio/OntologyIO/dagflat.pm:277> STACK
>>>>>>>>> Bio::OntologyIO::dagflat::next_ontology>
>>>>>>>>> /opt/share/local/users/haili/bioperl-
>>>>>>>
>>>>>>> live/Bio/OntologyIO/dagflat.pm:
>>>>>>>>> 330
>>>>>>>>>
>>>>>>>>>> STACK toplevel load_ontology.pl:604
>>>>>>>>>> -------------------------------------
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> BioSQL-l mailing list
>>>>>>>>> BioSQL-l at lists.open-bio.org
>>>>>>>>> http://lists.open-bio.org/mailman/listinfo/biosql-l
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> 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 :
>>>>>>> ===========================================================
>>>>
>>>> _______________________________________________
>>>> BioSQL-l mailing list
>>>> BioSQL-l at lists.open-bio.org
>>>> http://lists.open-bio.org/mailman/listinfo/biosql-l
>>>
>>>
>>> _______________________________________________
>>> 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 :
>> ===========================================================
>>
>>
>>
>
>
> _______________________________________________
> 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