Tripal: Can't add genome annotation

Created on 19 Apr 2021  Â·  6Comments  Â·  Source: tripal/tripal

BUG/ERROR report

System information

  • Tripal Version: 7.x-3.x (3.5)
  • Drupal Version: 7.78
  • PostgreSQL Version: 12.6
  • PHP Version: 7.4.16

Issue description


When adding a Genome Annotation, an error is encountered which blocks Tripal from saving the new Genome Annotation to the database.
The database logs indicate that no inserts were attempted, indicating that the problem occurs before this step.

Steps to reproduce


Attempt to add a new Genome Annotation content. This may be specific to this site, but we are wondering if this has been seen elsewhere or if this error message means more to someone else.

Error messages and screenshots



113027419-474f0a80-9147-11eb-9d18-6ae72bd854b2


Error run through OCR and prettified:
• Could not save the TripalEntity: Unable to write fields to Chado: Array (
 [schema name] => Array (
 [0] => Array (
 [value] => test genome annotation )
)
 [schema description] => Array (
 [0] => Array (
 [value] => test [format] => 1 )
)
 [swo software] => Array (
 [0] => Array (
 [value] => test )
)
 [iao version_number] => Array (
 [0] => Array (
 [value] => 1 )
)
 [iao algorithm] => Array (
 ) [local time_executed] => Array (
 [0] => Array (
 [value] => 2021-03-30 15:53:00 [show_todate] => 1 [timezone] => America/New_York [offset] => -14400 [offset2] => -14400 [value2] => 2021-03-30 15:53:00 )
)
 [local source_data] => Array (
 [0] => Array (
 [value] => test [chado-analysis sourcename] => test [chado-analysis sourceversion] => 1 [chado-analysis sourceuri] => https://test.org/123 [source_data] => Array (
 [sourcename] => test [sourceversion] => 1 [sourceuri] => https://test.org/123 )
)
 ) [sio annotation] => Array (
 [0] => Array (
 [value] => delete_me [chado-analysis_cvterm analysis_cvterm_id] => [chado-analysis_cvterm cvterm_id] => [chado-analysis_cvterm analysis_id] => [cv_id] => 0 [cvterm_name] => [chado-analysis_cvterm is_not] => [chado-analysis_cvterm rank] => [chado-analysis_cvterm_is_not] => )
)
 [schema publication] => Array (
 [0] => Array (
 [value] => [chado-analysis_pub analysis_pub =id] => [chado-analysis_pub analysis_id] => [chado-analysis_pub pub_id] => [pub_title] => )
)
 [sbo relationship] => Array (
 [0] => Array (
 [value] => [chado-analysis_relationship analysis_relationship_id] => [chado-analysis_relationship subject_id] => [chado-analysis_relationship type_id] => [chado-analysis_relationship object_id] => [chado-analysis_relationship value] => [chado-analysis_relationship rank] => [subject_name] => [vocabulary] => [type_name] => [object_name] => )
)
 [obi organism_linker] => Array (
 [0] => Array (
 [value] => 56 [chado-organism_analysis organism_analysis_id] => [chado-organism_analysis analysis_id] => [chado-organism_analysis organism_id] => 56 )
)
 [sbo database_cross_reference] => Array (
 [0] => Array (
 [value] => delete_me [chado-analysis_dbxref analysis_dbxref_id] => [chado-analysis_dbxref analysis_id] => [chado-analysis_dbxref dbxref_id] => [db_id] => 0 [accession] => )
)
 ) • Cannot save entity 

tripal-7.x-3.x

Most helpful comment

Hugs Glad it helped! I'm making it a personal goal to catch these sort of errors in Drupal 8/9 so you get a MUCH more informative error message ;-)

All 6 comments

Hey @Ferrisx4 . I just tried adding a Genome Annotation content type and it inserted just fine. Do you have any other error messages in the Drupal recent logs, web server or PostgreSQL logs?

There was nothing in the Postgres logs near the timestamp for this and the webserver logs were not informative. I've been able to add Genome Annotations on other sites as well, it's specific to this install. We were hoping for some institutional knowledge about a fix someone remembers having to apply years ago.

This error generally means the record invalidated Chado constraints but Tripal didn't catch it. For example, if you try to create a new page whose values invalidate a unique key. You may want to check your chado database to see if you may have a duplicate or if some of your fields are not specific enough.

For example, for chado analysis your unique key is program, programversion, sourcename. Therefore if you use a very generic name for your source data you may end up with conflicts even though it is a new analysis.

For what it's worth, I just saw Lacey's comment, and just want to say that's happened to me too, it's not immediately obvious what's wrong, but that's what it is.

@laceysanderson - thank you, that was exactly it. I had added another 'test' analysis (genome assembly) with the same program, programversion, sourcename. Deleting it made the error go the way. I feel like an idiot now, but thank you for solving our problem!

@dsenalik - thanks for commiserating!

Hugs Glad it helped! I'm making it a personal goal to catch these sort of errors in Drupal 8/9 so you get a MUCH more informative error message ;-)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kyrenya picture kyrenya  Â·  11Comments

shawnawsu picture shawnawsu  Â·  11Comments

risharde picture risharde  Â·  5Comments

bradfordcondon picture bradfordcondon  Â·  4Comments

almasaeed2010 picture almasaeed2010  Â·  5Comments