Tripal: request: dbxref widget create new accessions like the primary accession widget can

Created on 4 Dec 2018  路  4Comments  路  Source: tripal/tripal

feature request

A checkbox on the dbxref input widget, that allows you to create a dbxref (accession) if it doesnt already exist.

Description

Right now, it's difficult to create a dbxref accession via the GUI. If you want to use the GUI, you have to insert a cvterm. The dbxref admin area only lets you look up, not insert, accessions.

What I propose and @almasaeed2010 supports and will develop is modifying the input dbxref widget. We'll add a checkbox that says "create accession". If checked, the widget will insert a new dbxref record before inserting into the db.

Your Specific Use Case

We have undergrad annotators, and we want to associate ncbi accessions (bioproject) with stuff as they create it. Asking them to insert cvterms via the GUI, or to do SQL, is both too hard.

generally applicable

If you ask me this is a weakness shared by other input widgets where it would be really handy to create the linked record "on the fly".

PMC voting bug tripal-7.x-3.x

Most helpful comment

I Vote yes. I don't even think it needs to be gated behind a checkbox since that's what I would expect to happen

All 4 comments

oops: is this a bug instead?

https://github.com/tripal/tripal/blob/e9f107bf41e70658f003d4e659bbb024d029c7d9/tripal_chado/includes/TripalFields/data__accession/data__accession_widget.inc#L140-L150

@almasaeed2010 can you please provide the message for failed submission with a novel accession?

The error message on a publication entity:

Could not save the TripalEntity: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "" LINE 1: ... INTO chado.pub_dbxref (pub_id, dbxref_id) VALUES ('23', '') ^
Cannot save entity

Similar error on organism entities:

Could not save the TripalEntity: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "" LINE 1: ...o.organism_dbxref (organism_id, dbxref_id) VALUES ('60', '') ^
Cannot save entity

sorry i got confused because the c ode i linked above is for data__accession, which is for a primary accession. we are discussing cases of secondary accessions, handled by the sbo__database_cross_reference widget.

So we're back to feature request: can this widget also create accessions, gated behind a checkbox (or perhaps a field setting?) if necessary?

either way the bug component is that the validate portion of the cross_reference widget is failing.

I Vote yes. I don't even think it needs to be gated behind a checkbox since that's what I would expect to happen

Was this page helpful?
0 / 5 - 0 ratings

Related issues

taytayp picture taytayp  路  6Comments

almasaeed2010 picture almasaeed2010  路  9Comments

risharde picture risharde  路  6Comments

laceysanderson picture laceysanderson  路  5Comments

kyrenya picture kyrenya  路  6Comments