cvtermpath table: Unique violation

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

cvtermpath table: Unique violation

Sofia Robb
Hello,

I am using tripal 2 still. Should I be posting this question on the github site?

I am trying to load an ontology. I get this message about duplicate terms in the cvtermpath. What is this table? How can I fix the data to not cause this error?

Thanks,
Sofia



Tripal Job Launcher
Running as user 'administrator'
-------------------
Calling: tripal_cv_load_obo_v1_2_id(14, 732)

NOTE: Loading of this OBO file is performed using a database transaction.
If the load fails or is terminated prematurely then the entire set of
insertions/updates is rolled back and will not be found in the database

Step 1: Preloading File //var/other_data/organisms/zebrafish/Drer/ontology/zfa.obo
Parsing Line 38498 (100.00%). Memory: 37,065,912 bytes.
Step 2: Loading type defs...
8 of 8 records. (100.00%) Memory: 37,068,976 bytes
Step 3: Loading terms...
3098 of 3098 records. (100.00%) Memory: 37,068,328 bytes
Updating cvtermpath table.  This may take a while...

Updating cvtermpath for zebrafish_anatomical_ontology...

Updating cvtermpath for zebrafish_anatomy...


Updating cvtermpath for zebrafish_stages...
WD tripal_cv: Could not fill cvtermpath table: SQLSTATE[23505]: Unique violation: 7 ERROR:  duplicate key value violates unique constraint "cvtermpath_c1"                            [error]
DETAIL:  Key (subject_id, object_id, type_id, pathdistance)=(73409, 73409, 34, 0) already exists.
CONTEXT:  SQL statement "INSERT INTO cvtermpath (object_id, subject_id, cv_id, type_id, pathdistance) VALUES(origin, child_id, cvid, typeid, depth)"
PL/pgSQL function _fill_cvtermpath4node(integer,integer,integer,integer,integer) line 15 at SQL statement
SQL statement "SELECT _fill_cvtermpath4node(rootid, rootid, cvid, ttype, 0)"
PL/pgSQL function _fill_cvtermpath4root(integer,integer) line 10 at PERFORM
SQL statement "SELECT _fill_cvtermpath4root(cterm.subject_id, cvid)"
PL/pgSQL function _fill_cvtermpath4root(integer,integer) line 12 at PERFORM
SQL statement "SELECT _fill_cvtermpath4root(cterm.subject_id, cvid)"
PL/pgSQL function _fill_cvtermpath4root(integer,integer) line 12 at PERFORM
SQL statement "SELECT _fill_cvtermpath4root(root.cvterm_id, root.cv_id)"
PL/pgSQL function fill_cvtermpath(integer) line 8 at PERFORM
SQL statement "SELECT          fill_cvtermpath(cv_id)"
PL/pgSQL function fill_cvtermpath(character varying) line 8 at SQL statement
[site http://default] [TRIPAL ERROR] [TRIPAL_CV] Could not fill cvtermpath table: SQLSTATE[23505]: Unique violation: 7 ERROR:  duplicate key value violates unique constraint "cvtermpath_c1"DETAIL:  Key (subject_id, object_id, type_id, pathdistance)=(73409, 73409, 34, 0) already exists.CONTEXT:  SQL statement "INSERT INTO cvtermpath (object_id, subject_id, cv_id, type_id, pathdistance) VALUES(origin, child_id, cvid, typeid, depth)"PL/pgSQL function _fill_cvtermpath4node(integer,integer,integer,integer,integer) line 15 at SQL statementSQL statement "SELECT _fill_cvtermpath4node(rootid, rootid, cvid, ttype, 0)"PL/pgSQL function _fill_cvtermpath4root(integer,integer) line 10 at PERFORMSQL statement "SELECT _fill_cvtermpath4root(cterm.subject_id, cvid)"PL/pgSQL function _fill_cvtermpath4root(integer,integer) line 12 at PERFORMSQL statement "SELECT _fill_cvtermpath4root(cterm.subject_id, cvid)"PL/pgSQL function _fill_cvtermpath4root(integer,integer) line 12 at PERFORMSQL statement "SELECT _fill_cvtermpath4root(root.cvterm_id, root.cv_id)"PL/pgSQL function fill_cvtermpath(integer) line 8 at PERFORMSQL statement "SELECT          fill_cvtermpath(cv_id)"PL/pgSQL function fill_cvtermpath(character varying) line 8 at SQL statement

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gmod-tripal mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-tripal
Reply | Threaded
Open this post in threaded view
|

Re: cvtermpath table: Unique violation

Cannon, Ethalinda K [COM S]

Hi Sofia,


In simple terms, ctermpath stores the paths between terms. It's helpful for quickly traversing ontology graphs.


I've been fighting with the cvterm loader and have seen this too. I made some changes that enabled me to load the GO terms. Stephen has someone working on this and have sent my changes for consideration. I also sent my changes to Meg and will send them to you as well in a personal e-mail, for use until there is a formal fix, if the code solve your problem.


Alternatively, you could disable the Postgres procedure that fills the cvtermpath table if you aren't using it.


My changes are a bit of a hack; Stephen is taking are more careful, disciplined, and generalized approach.


Ethy


From: Sofia Robb <[hidden email]>
Sent: Friday, April 28, 2017 12:01 PM
To: [hidden email]
Subject: [Gmod-tripal] cvtermpath table: Unique violation
 
Hello,

I am using tripal 2 still. Should I be posting this question on the github site?

I am trying to load an ontology. I get this message about duplicate terms in the cvtermpath. What is this table? How can I fix the data to not cause this error?

Thanks,
Sofia



Tripal Job Launcher
Running as user 'administrator'
-------------------
Calling: tripal_cv_load_obo_v1_2_id(14, 732)

NOTE: Loading of this OBO file is performed using a database transaction.
If the load fails or is terminated prematurely then the entire set of
insertions/updates is rolled back and will not be found in the database

Step 1: Preloading File //var/other_data/organisms/zebrafish/Drer/ontology/zfa.obo
Parsing Line 38498 (100.00%). Memory: 37,065,912 bytes.
Step 2: Loading type defs...
8 of 8 records. (100.00%) Memory: 37,068,976 bytes
Step 3: Loading terms...
3098 of 3098 records. (100.00%) Memory: 37,068,328 bytes
Updating cvtermpath table.  This may take a while...

Updating cvtermpath for zebrafish_anatomical_ontology...

Updating cvtermpath for zebrafish_anatomy...


Updating cvtermpath for zebrafish_stages...
WD tripal_cv: Could not fill cvtermpath table: SQLSTATE[23505]: Unique violation: 7 ERROR:  duplicate key value violates unique constraint "cvtermpath_c1"                            [error]
DETAIL:  Key (subject_id, object_id, type_id, pathdistance)=(73409, 73409, 34, 0) already exists.
CONTEXT:  SQL statement "INSERT INTO cvtermpath (object_id, subject_id, cv_id, type_id, pathdistance) VALUES(origin, child_id, cvid, typeid, depth)"
PL/pgSQL function _fill_cvtermpath4node(integer,integer,integer,integer,integer) line 15 at SQL statement
SQL statement "SELECT _fill_cvtermpath4node(rootid, rootid, cvid, ttype, 0)"
PL/pgSQL function _fill_cvtermpath4root(integer,integer) line 10 at PERFORM
SQL statement "SELECT _fill_cvtermpath4root(cterm.subject_id, cvid)"
PL/pgSQL function _fill_cvtermpath4root(integer,integer) line 12 at PERFORM
SQL statement "SELECT _fill_cvtermpath4root(cterm.subject_id, cvid)"
PL/pgSQL function _fill_cvtermpath4root(integer,integer) line 12 at PERFORM
SQL statement "SELECT _fill_cvtermpath4root(root.cvterm_id, root.cv_id)"
PL/pgSQL function fill_cvtermpath(integer) line 8 at PERFORM
SQL statement "SELECT          fill_cvtermpath(cv_id)"
PL/pgSQL function fill_cvtermpath(character varying) line 8 at SQL statement
[site http://default] [TRIPAL ERROR] [TRIPAL_CV] Could not fill cvtermpath table: SQLSTATE[23505]: Unique violation: 7 ERROR:  duplicate key value violates unique constraint "cvtermpath_c1"DETAIL:  Key (subject_id, object_id, type_id, pathdistance)=(73409, 73409, 34, 0) already exists.CONTEXT:  SQL statement "INSERT INTO cvtermpath (object_id, subject_id, cv_id, type_id, pathdistance) VALUES(origin, child_id, cvid, typeid, depth)"PL/pgSQL function _fill_cvtermpath4node(integer,integer,integer,integer,integer) line 15 at SQL statementSQL statement "SELECT _fill_cvtermpath4node(rootid, rootid, cvid, ttype, 0)"PL/pgSQL function _fill_cvtermpath4root(integer,integer) line 10 at PERFORMSQL statement "SELECT _fill_cvtermpath4root(cterm.subject_id, cvid)"PL/pgSQL function _fill_cvtermpath4root(integer,integer) line 12 at PERFORMSQL statement "SELECT _fill_cvtermpath4root(cterm.subject_id, cvid)"PL/pgSQL function _fill_cvtermpath4root(integer,integer) line 12 at PERFORMSQL statement "SELECT _fill_cvtermpath4root(root.cvterm_id, root.cv_id)"PL/pgSQL function fill_cvtermpath(integer) line 8 at PERFORMSQL statement "SELECT          fill_cvtermpath(cv_id)"PL/pgSQL function fill_cvtermpath(character varying) line 8 at SQL statement

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gmod-tripal mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-tripal