[Gmod-schema] [Gmod-help] Alternatives to DBIx::DBStag for loading ontologies
Scott Cain
scott at scottcain.net
Tue Jan 26 15:58:08 EST 2010
Hi Chris,
Removing that "patch" makes everything behave as it should. I think I
must have put that in Bio::Chado::Builder years ago because the GO obo
files were behaving badly. It appears to behave at least reasonably
well now (though I still don't get why it needs its own "part_of", but
I'm not an ontologist), so I took those few lines out, and ontology
loading in Chado seems none the worse :-) Thanks for your help with
this. Also, if you haven't already, it would be great if you could
get a release of DBIx::DBStag out to cpan.
Thanks,
Scott
On Tue, Jan 26, 2010 at 8:14 AM, Scott Cain <scott at scottcain.net> wrote:
> Hi Chris,
>
> Ah, of course that is the (most immediate) problem. I forgot that I
> did that; as I recall, stag-storenode was following GO's orders and
> replacing is_a and part_of in REL with the ones in GO, and thus
> breaking other things. I need to rewrite the queries in this fix to
> use a little less sledgehammer and a little more finesse.
>
> Thanks,
> Scott
>
>
> On Mon, Jan 25, 2010 at 5:22 PM, Chris Mungall <cjm at berkeleybop.org> wrote:
>>
>> Aha, this is coming from Bio::Chado::Builder, I'm not too familiar with this
>> code:
>>
>> #fix up DBIx::DBStag stomping on part_of and derives_from
>> $m->log->debug("fix up DBIx::DBStag stomping on part_of and derives_from");
>> my $dbh =
>> DBI->connect("dbi:Pg:dbname=$db_name;host=$db_host;port=$db_port",
>> $db_user, $db_pass);
>> $dbh->do("UPDATE cvterm SET
>> cv_id = (SELECT cv_id FROM cv WHERE name='relationship')
>> WHERE name='derives_from'");
>> $dbh->do("UPDATE cvterm SET
>> cv_id = (SELECT cv_id FROM cv WHERE name='relationship')
>> WHERE name='part_of'");
>> $dbh->disconnect;
>>
>> Ok, so it looks like the original source of the prob may be dbstag / the
>> chadoxml. I guess you could apply a band-aid to the band-aid just now, but
>> the source problem is a bit trickier.
>>
>> cheers
>> c
>>
>> On Jan 25, 2010, at 11:29 AM, Scott Cain wrote:
>>
>>> Hi Chris,
>>>
>>> Here is end of the stag-storenode.pl STDERR output. Note that I am
>>> pretty sure the error messages are coming from the database server,
>>> not stag-storenode, but it would be nice if we could keep that from
>>> happening; people don't like it even if it is harmless.
>>>
>>> Thanks,
>>> Scott
>>>
>>>
>>> On Fri, Jan 22, 2010 at 2:58 PM, Chris Mungall <cjm at berkeleybop.org>
>>> wrote:
>>>>
>>>> if you run this with DBSTAG_TRACE=1 pipe stderr to a file and send me the
>>>> results of
>>>>
>>>> grep -B1000 ERROR
>>>>
>>>> cheers
>>>>
>>>> On Jan 21, 2010, at 3:59 PM, Scott Cain wrote:
>>>>
>>>>> Hi Chris,
>>>>>
>>>>> Thanks so much for looking into this. When I got your email, I had
>>>>> started doing some debugging to give you more info on what was wrong.
>>>>> I got your latest from github, and it appears to work fine.
>>>>>
>>>>> While I have your attention, though: what would also really be great
>>>>> would be if we could get rid of the error/warning messages after
>>>>> loading ontologies into a database that already has some ontologies
>>>>> loaded. They look like this:
>>>>>
>>>>> scott-cains-macbook-pro:chado cain$ make ontologies
>>>>> ./Build ontologies
>>>>> Available ontologies:
>>>>> [1] Relationship Ontology
>>>>> [2] Sequence Ontology
>>>>> [3] Gene Ontology
>>>>> [4] Chado Feature Properties
>>>>> [5] Cell Ontology
>>>>> [6] Plant Ontology
>>>>>
>>>>> Which ontologies would you like to load (Comma delimited)? [0] 2,4
>>>>> fetching files for Sequence Ontology
>>>>> +http://song.cvs.sourceforge.net/*checkout*/song/ontology/so.obo
>>>>> updated
>>>>> loading...done!
>>>>> fetching files for Chado Feature Properties
>>>>> +load/etc/feature_property.obo
>>>>> loading...done!
>>>>> DBD::Pg::db do failed: ERROR: duplicate key value violates unique
>>>>> constraint "cvterm_c1" at lib/Bio/Chado/Builder.pm line 366, <STDIN>
>>>>> line 1.
>>>>> DBD::Pg::db do failed: ERROR: duplicate key value violates unique
>>>>> constraint "cvterm_c1" at lib/Bio/Chado/Builder.pm line 369, <STDIN>
>>>>> line 1.
>>>>>
>>>>> Thanks,
>>>>> Scott
>>>>>
>>>>>
>>>>> On Thu, Jan 21, 2010 at 6:17 PM, Chris Mungall <cjm at berkeleybop.org>
>>>>> wrote:
>>>>>>
>>>>>> It appears DBIx::DBSchema 0.38 treats defaults differently, creating a
>>>>>> reference for them. It also appears to DBI-quote defaults of '',
>>>>>> meaning
>>>>>> that
>>>>>>
>>>>>> version varchar(255) not null default '',
>>>>>>
>>>>>> Is stored internally as "\'\'"
>>>>>>
>>>>>> which ends up getting DBI-quoted again..
>>>>>>
>>>>>> Anyway, I have fixed DBStag on github such that it works around this
>>>>>> and
>>>>>> should work with both earlier and current versions of DBSchema. I will
>>>>>> propagate this to CPAN later if it looks fine.
>>>>>>
>>>>>> http://github.com/cmungall/DBIx-DBStag
>>>>>>
>>>>>> On Jan 21, 2010, at 12:50 PM, Scott Cain wrote:
>>>>>>
>>>>>>> Hi James,
>>>>>>>
>>>>>>> There was a report of this just a few days ago on the schema mailing
>>>>>>> list. It appears that a new release of DBIx::DBSchema breaks
>>>>>>> DBIx::DBStag. Try going to cpan and getting an older version to see
>>>>>>> if it fixes it.
>>>>>>>
>>>>>>> Scott
>>>>>>>
>>>>>>> On Thursday, January 21, 2010, James Estill <jestill at plantbio.uga.edu>
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> I am to the point where I am attempting to load ontologies into my
>>>>>>>> CHADO
>>>>>>>> installation.
>>>>>>>>
>>>>>>>> Using 'make ontologies' gives
>>>>>>>>
>>>>>>>> Died at lib/Bio/Chado/Builder.pm line 315, <STDIN> line 1.
>>>>>>>> make: *** [ontologies] Error 2
>>>>>>>>
>>>>>>>> I can download the ontologies and convert to xml manually, but it
>>>>>>>> looks
>>>>>>>> like DBIx::DBStag is broken in some way, when I do
>>>>>>>>
>>>>>>>> stag-storenode.pl -d
>>>>>>>> 'dbi:Pg:dbname=chado_test;host=localhost;port=5432'
>>>>>>>> --user myname --password mypassword ro.oboxml
>>>>>>>>
>>>>>>>> I get the error message
>>>>>>>>
>>>>>>>> Cannot quote a reference at /Library/Perl/5.8.8/DBIx/DBStag.pm line
>>>>>>>> 3736.
>>>>>>>>
>>>>>>>> Is there an alternative way to load ontologies into the database that
>>>>>>>> do
>>>>>>>> not rely on DBIx::DBStag? I installed DBIx::DBStag the "manual" way
>>>>>>>> and
>>>>>>>> it
>>>>>>>> is apparently not doing its job.
>>>>>>>>
>>>>>>>> -- Jamie Estill
>>>>>>>> -- jestill at uga.edu
>>>>>>>> -- http://jestill.myweb.uga.edu
>>>>>>>> -- http://www.epernicus.com/people/jestill
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> ------------------------------------------------------------------------
>>>>>>> Scott Cain, Ph. D. scott at
>>>>>>> scottcain
>>>>>>> dot net
>>>>>>> GMOD Coordinator (http://gmod.org/) 216-392-3087
>>>>>>> Ontario Institute for Cancer Research
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ------------------------------------------------------------------------------
>>>>>>> Throughout its 18-year history, RSA Conference consistently attracts
>>>>>>> the
>>>>>>> world's best and brightest in the field, creating opportunities for
>>>>>>> Conference
>>>>>>> attendees to learn about information security's most important issues
>>>>>>> through
>>>>>>> interactions with peers, luminaries and emerging and established
>>>>>>> companies.
>>>>>>> http://p.sf.net/sfu/rsaconf-dev2dev
>>>>>>> _______________________________________________
>>>>>>> Gmod-schema mailing list
>>>>>>> Gmod-schema at lists.sourceforge.net
>>>>>>> https://lists.sourceforge.net/lists/listinfo/gmod-schema
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> ------------------------------------------------------------------------
>>>>> Scott Cain, Ph. D. scott at scottcain
>>>>> dot net
>>>>> GMOD Coordinator (http://gmod.org/) 216-392-3087
>>>>> Ontario Institute for Cancer Research
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Throughout its 18-year history, RSA Conference consistently attracts the
>>>>> world's best and brightest in the field, creating opportunities for
>>>>> Conference
>>>>> attendees to learn about information security's most important issues
>>>>> through
>>>>> interactions with peers, luminaries and emerging and established
>>>>> companies.
>>>>> http://p.sf.net/sfu/rsaconf-dev2dev
>>>>> _______________________________________________
>>>>> Gmod-schema mailing list
>>>>> Gmod-schema at lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/gmod-schema
>>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> ------------------------------------------------------------------------
>>> Scott Cain, Ph. D. scott at scottcain
>>> dot net
>>> GMOD Coordinator (http://gmod.org/) 216-392-3087
>>> Ontario Institute for Cancer Research
>>> <stag_error.out>
>>
>>
>
>
>
> --
> ------------------------------------------------------------------------
> Scott Cain, Ph. D. scott at scottcain dot net
> GMOD Coordinator (http://gmod.org/) 216-392-3087
> Ontario Institute for Cancer Research
>
--
------------------------------------------------------------------------
Scott Cain, Ph. D. scott at scottcain dot net
GMOD Coordinator (http://gmod.org/) 216-392-3087
Ontario Institute for Cancer Research
More information about the Gmod-help
mailing list