From: Nicolas J. <nic...@gm...> - 2012-04-13 05:07:08
|
Hi Steve, OK! I had specified the soCvsVersion because I had first investigated the plugin "InsertSequenceOntology" and assumed that the required arguments where the same for InsertSequenceOntologyOBO: my mistake. That said, I double checked the so.obo file I downloaded and there seems to be an issue with a few lines, including the one with the version (see file header below). For some reason some of the new line (\n) character is not read properly for some lines. I don't know if this may be a problem or not, just thought I'd point it out. Finally, regarding the work-around by providing the soExtDbRlsName argument: again, I hadn't looked at the ISOntologyOBO argument list, so I didn't see that it was an option. And I still had in mind that the soVersion and soCvsVersion were required (as in the ISOntology plugin). Just for future reference, can you confirm that by using the soExtDbRlsName argument, the system assumes that there is only one version of the SO? In the end, I got impatient yesterday (there is too much time difference between Japan and the US!), so I went ahead and updated the soCvsVersion to its correct value in the SequenceOntology table and used that argument instead of the soExtDbRlsName work-around. That brings me to my next error message... But that will be for another thread if I can't manage on my own ;) I really appreciate your help Steve, and of course that of all the others who have helped these past few weeks! Best regards, Nicolas Header lines for the so.obo file: format-version: 1.2 date: 05:04:2012 16:30 saved-by: kareneilbeck auto-generated-by: OBO-Edit 2.1.1-beta7 subsetdef: biosapiens "biosapiens protein feature ontology" subsetdef: DBVAR "database of genomic structural variation" subsetdef: SOFA "SO feature annotation" synonymtypedef: aa1 "amino acid 1 letter code" synonymtypedef: aa3 "amino acid 3 letter code" synonymtypedef: AAMOD "amino acid modification" synonymtypedef: BS "biosapiens" synonymtypedef: dbsnp "dbsnp variant terms" synonymtypedef: dbvar "DBVAR" synonymtypedef: ebi_variants "ensembl variant terms" synonymtypedef: RNAMOD "RNA modification" EXACT default-namespace: sequence remark: autogenerated-by: DAG-Edit version 1.417\nsaved-by: eilbeck\ndate: Tue May 11 15:18:44 PDT 2004\nversion: $Revision: 1.324 $ ontology: so-xp.obo [Term] id: SO:0000000 name: Sequence_Ontology subset: SOFA is_obsolete: true On Thu, Apr 12, 2012 at 20:31, <gus...@li...>wrote: > Send Gusdev-gusdev mailing list submissions to > gus...@li... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev > or, via email, send a message with subject or body 'help' to > gus...@li... > > You can reach the person managing the list at > gus...@li... > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Gusdev-gusdev digest..." > > > Today's Topics: > > 1. InsertSequenceOntology bug? (Nicolas Joannin) > 2. Re: InsertSequenceOntology bug? (Steve Fischer) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 12 Apr 2012 13:44:27 +0900 > From: Nicolas Joannin <nic...@gm...> > Subject: [GUSDEV] InsertSequenceOntology bug? > To: Gus...@li... > Message-ID: > <CAPJVvAw2oXyWnA9XM=EGW...@ma... > > > Content-Type: text/plain; charset="iso-8859-1" > > Hello, > > I am proceeding with inserting data into my gusdb. > I downloaded the latest so.obo file from www.sequenceontology.org and > added > that data to the db (see output below). > > Once that done, I tried to insert sequence features but ran into the > following error message: ERROR: Can't find primary key for SO term 'gene' > > Going through the code to find the error, I've manually checked the output > of the following sql code: > select term_name, sequence_ontology_id from sres.SequenceOntology where > so_cvs_version = '$soCvsVersion' > > In my case the soCvsVersion is 1.324. And the result was nothing. So I > checked the table in question, and found it full of data, but with an > erroneous soCvsVersion: the InsertSequenceOntologyOBO plugin seems to have > used the soVersion as both the soVersion and the soCvsVersion. > > Is this a bug in that plugin or is it supposed to be that way? > > If it is a bug, I found in the InsertSequenceOntologyOBO.pm file the > following code (lines 170 to 178): > > my $soTerm = GUS::Model::SRes::SequenceOntology-> > new({'so_id' => $obo->{'id'}, > 'ontology_name' => 'sequence', > 'so_version' => $soVer, > *'so_cvs_version' => $soVer,* > 'term_name' => $obo->{'name'}, > 'definition' => $definition }); > > return $soTerm; > > > Is there a specific way to update the table (I don't see any UNDO for this > plugin)? Or should I just use plain sql UPDATE for this? > > Best regards, > Nicolas > > > > Nicolas-work-iMac:~ Nicolas$ ga > GUS::Supported::Plugin::InsertSequenceOntologyOBO --inputFile > ~/Data_for_GUS/so.obo --soVersion 1.2 --soCvsVersion 1.324 --commit > Wed Apr 11 15:51:53 2012 DSN dbi:Pg:dbname=varDB_2012 > Wed Apr 11 15:51:53 2012 PLUGIN > GUS::Supported::Plugin::InsertSequenceOntologyOBO > Wed Apr 11 15:51:53 2012 ARG algoinvo 1 > Wed Apr 11 15:51:53 2012 ARG comment > Wed Apr 11 15:51:53 2012 ARG commit 1 > Wed Apr 11 15:51:53 2012 ARG debug 0 > Wed Apr 11 15:51:53 2012 ARG group > Wed Apr 11 15:51:53 2012 ARG gusconfigfile > /Users/Nicolas/GUS/gus_home/config/gus.config > Wed Apr 11 15:51:53 2012 ARG help 0 > Wed Apr 11 15:51:53 2012 ARG helpHTML 0 > Wed Apr 11 15:51:53 2012 ARG inputFile /Data_for_GUS/so.obo > Wed Apr 11 15:51:53 2012 ARG project > Wed Apr 11 15:51:53 2012 ARG soCvsVersion 1.324 > Wed Apr 11 15:51:53 2012 ARG soExtDbRlsName > Wed Apr 11 15:51:53 2012 ARG soVersion 1.2 > Wed Apr 11 15:51:53 2012 ARG sqlVerbose 0 > Wed Apr 11 15:51:53 2012 ARG user > Wed Apr 11 15:51:53 2012 ARG verbose 0 > Wed Apr 11 15:51:53 2012 ARG veryVerbose 0 > Wed Apr 11 15:51:53 2012 ARG workflowstepid 0 > Wed Apr 11 15:51:53 2012 AlgInvocationId 29 > Wed Apr 11 15:51:53 2012 COMMIT commit on > Wed Apr 11 15:51:54 2012 Submitted 100 terms > Wed Apr 11 15:51:54 2012 Submitted 200 terms > Wed Apr 11 15:51:54 2012 Submitted 300 terms > Wed Apr 11 15:51:54 2012 Submitted 400 terms > Wed Apr 11 15:51:54 2012 Submitted 500 terms > Wed Apr 11 15:51:54 2012 Submitted 600 terms > Wed Apr 11 15:51:54 2012 Submitted 700 terms > Wed Apr 11 15:51:54 2012 Submitted 800 terms > Wed Apr 11 15:51:54 2012 Submitted 900 terms > Wed Apr 11 15:51:55 2012 Submitted 1000 terms > Wed Apr 11 15:51:55 2012 Submitted 1100 terms > Wed Apr 11 15:51:55 2012 Submitted 1200 terms > Wed Apr 11 15:51:55 2012 Submitted 1300 terms > Wed Apr 11 15:51:55 2012 Submitted 1400 terms > Wed Apr 11 15:51:55 2012 Submitted 1500 terms > Wed Apr 11 15:51:55 2012 Submitted 1600 terms > Wed Apr 11 15:51:55 2012 Submitted 1700 terms > Wed Apr 11 15:51:55 2012 Submitted 1800 terms > Wed Apr 11 15:51:56 2012 Submitted 1900 terms > Wed Apr 11 15:51:56 2012 Submitted 2000 terms > Wed Apr 11 15:51:56 2012 Submitted 2100 terms > Wed Apr 11 15:51:56 2012 TIME 3 sec (0:00:03) > Wed Apr 11 15:51:56 2012 RESULT Inserted 2120 terms into SequenceOntology > Wed Apr 11 15:51:56 2012 Rows Written SRes.SequenceOntology: 2120 > Wed Apr 11 15:51:56 2012 AlgInvocationId 29 > Wed Apr 11 15:51:56 2012 COMMIT commit on > -------------- next part -------------- > An HTML attachment was scrubbed... > > ------------------------------ > > Message: 2 > Date: Thu, 12 Apr 2012 07:31:14 -0400 > From: Steve Fischer <sfi...@pc...> > Subject: Re: [GUSDEV] InsertSequenceOntology bug? > To: gus...@li... > Message-ID: <4F8...@pc...> > Content-Type: text/plain; charset="iso-8859-1" > > Joanin- > > this looks to be a nest of bugs: > > 1) the purpose of storing soCvsVersion is that, originally at least, > that value was available in the downloaded file. if we use an > automated system (workflow) to download it, we do not know in advance > what it will be. so it should be extracted from the .obo file and > inserted. however, the plugin is no longer doing that extraction. if > this use case is no longer active, then i don't see any reason to write > or read this value. > > 2) instead it is taking two optional values on the command line, version > and so version, and, as you point out, using only the former. we > should make the fix you suggest, so that we write the version into the > soVersion column > > 3) the SequenceOntology table does not have a foreign key to > ExternalDatabaseRelease. Instead it has a column soVersion, storing > its "external database release" inline. This is not the standard design > pattern in GUS. I don't know why we did it this way, perhaps because > the table is dedicated to SequenceOntology, so we always know what > ExternalDatabase it is. if i could go back in time, i would recommend > we stick to the pattern even for this table > > 4) the ISF plugin allows the soCvsVersion to be optoinal. instead you > can provide the value in ExternalDatabase.name for the SO. it then does > a look-up to find the ExternalDatabaseRelease.version of SO. this > allows us to leverage the common use case that there is only one SO in > the database, so its name is sufficient, we don't really care about its > version. however, in this case ISF is still querying using the > soCvsVersion. instead, it should either: > a) remove that condition from the where clause altogether. using > the --soExtDbRlsName effectively means "ignore version" > b) change that condition to read the soVersion instead of soCvsVersion > > you can work around this problem by using --soExtDbRlsName instead of > --soCvsVersion when you call ISF > > steve > > On 4/12/2012 12:44 AM, Nicolas Joannin wrote: > > Hello, > > > > I am proceeding with inserting data into my gusdb. > > I downloaded the latest so.obo file from www.sequenceontology.org > > <http://www.sequenceontology.org> and added that data to the db (see > > output below). > > > > Once that done, I tried to insert sequence features but ran into the > > following error message: ERROR: Can't find primary key for SO term 'gene' > > > > Going through the code to find the error, I've manually checked the > > output of the following sql code: > > select term_name, sequence_ontology_id from > > sres.SequenceOntology where so_cvs_version = '$soCvsVersion' > > > > In my case the soCvsVersion is 1.324. And the result was nothing. So I > > checked the table in question, and found it full of data, but with an > > erroneous soCvsVersion: the InsertSequenceOntologyOBO plugin seems to > > have used the soVersion as both the soVersion and the soCvsVersion. > > > > Is this a bug in that plugin or is it supposed to be that way? > > > > If it is a bug, I found in the InsertSequenceOntologyOBO.pm file the > > following code (lines 170 to 178): > > > > my $soTerm = GUS::Model::SRes::SequenceOntology-> > > new({'so_id' => $obo->{'id'}, > > 'ontology_name' => 'sequence', > > 'so_version' => $soVer, > > *'so_cvs_version' => $soVer,* > > 'term_name' => $obo->{'name'}, > > 'definition' => $definition }); > > return $soTerm; > > > > > > Is there a specific way to update the table (I don't see any UNDO for > > this plugin)? Or should I just use plain sql UPDATE for this? > > > > Best regards, > > Nicolas > > > > > > > > Nicolas-work-iMac:~ Nicolas$ ga > > GUS::Supported::Plugin::InsertSequenceOntologyOBO --inputFile > > ~/Data_for_GUS/so.obo --soVersion 1.2 --soCvsVersion 1.324 --commit > > Wed Apr 11 15:51:53 2012DSNdbi:Pg:dbname=varDB_2012 > > Wed Apr 11 15:51:53 > > 2012PLUGINGUS::Supported::Plugin::InsertSequenceOntologyOBO > > Wed Apr 11 15:51:53 2012ARGalgoinvo1 > > Wed Apr 11 15:51:53 2012ARGcomment > > Wed Apr 11 15:51:53 2012ARGcommit1 > > Wed Apr 11 15:51:53 2012ARGdebug0 > > Wed Apr 11 15:51:53 2012ARGgroup > > Wed Apr 11 15:51:53 > > 2012ARGgusconfigfile/Users/Nicolas/GUS/gus_home/config/gus.config > > Wed Apr 11 15:51:53 2012ARGhelp0 > > Wed Apr 11 15:51:53 2012ARGhelpHTML0 > > Wed Apr 11 15:51:53 2012ARGinputFile/Data_for_GUS/so.obo > > Wed Apr 11 15:51:53 2012ARGproject > > Wed Apr 11 15:51:53 2012ARGsoCvsVersion1.324 > > Wed Apr 11 15:51:53 2012ARGsoExtDbRlsName > > Wed Apr 11 15:51:53 2012ARGsoVersion1.2 > > Wed Apr 11 15:51:53 2012ARGsqlVerbose0 > > Wed Apr 11 15:51:53 2012ARGuser > > Wed Apr 11 15:51:53 2012ARGverbose0 > > Wed Apr 11 15:51:53 2012ARGveryVerbose0 > > Wed Apr 11 15:51:53 2012ARGworkflowstepid0 > > Wed Apr 11 15:51:53 2012AlgInvocationId29 > > Wed Apr 11 15:51:53 2012COMMITcommit on > > Wed Apr 11 15:51:54 2012Submitted 100 terms > > Wed Apr 11 15:51:54 2012Submitted 200 terms > > Wed Apr 11 15:51:54 2012Submitted 300 terms > > Wed Apr 11 15:51:54 2012Submitted 400 terms > > Wed Apr 11 15:51:54 2012Submitted 500 terms > > Wed Apr 11 15:51:54 2012Submitted 600 terms > > Wed Apr 11 15:51:54 2012Submitted 700 terms > > Wed Apr 11 15:51:54 2012Submitted 800 terms > > Wed Apr 11 15:51:54 2012Submitted 900 terms > > Wed Apr 11 15:51:55 2012Submitted 1000 terms > > Wed Apr 11 15:51:55 2012Submitted 1100 terms > > Wed Apr 11 15:51:55 2012Submitted 1200 terms > > Wed Apr 11 15:51:55 2012Submitted 1300 terms > > Wed Apr 11 15:51:55 2012Submitted 1400 terms > > Wed Apr 11 15:51:55 2012Submitted 1500 terms > > Wed Apr 11 15:51:55 2012Submitted 1600 terms > > Wed Apr 11 15:51:55 2012Submitted 1700 terms > > Wed Apr 11 15:51:55 2012Submitted 1800 terms > > Wed Apr 11 15:51:56 2012Submitted 1900 terms > > Wed Apr 11 15:51:56 2012Submitted 2000 terms > > Wed Apr 11 15:51:56 2012Submitted 2100 terms > > Wed Apr 11 15:51:56 2012TIME3 sec (0:00:03) > > Wed Apr 11 15:51:56 2012RESULTInserted 2120 terms into SequenceOntology > > Wed Apr 11 15:51:56 2012Rows WrittenSRes.SequenceOntology: 2120 > > Wed Apr 11 15:51:56 2012AlgInvocationId29 > > Wed Apr 11 15:51:56 2012COMMITcommit on > > > > > > > > > ------------------------------------------------------------------------------ > > For Developers, A Lot Can Happen In A Second. > > Boundary is the first to Know...and Tell You. > > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > > http://p.sf.net/sfu/Boundary-d2dvs2 > > > > > > _______________________________________________ > > Gusdev-gusdev mailing list > > Gus...@li... > > https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev > -------------- next part -------------- > An HTML attachment was scrubbed... > > ------------------------------ > > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > > ------------------------------ > > _______________________________________________ > Gusdev-gusdev mailing list > Gus...@li... > https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev > > > End of Gusdev-gusdev Digest, Vol 23, Issue 9 > ******************************************** > |