tripal / tripal

The Tripal package is a suite of Drupal modules for creating biological (genomic, genetic, breeding) websites. Visit the Tripal homepage at http://tripal.info for documentation, support, and other information. The Drupal project page is at http://drupal.org/project/tripal.
GNU General Public License v2.0
67 stars 49 forks source link

Vocab/IDSpace/Term support for borrowed terms #1421

Open laceysanderson opened 1 year ago

laceysanderson commented 1 year ago

Core Tripal 4 Development Task

Branch Name: tv4g1-issue1421-borrowedTerms

The following comments are in the Default + Chado Vocab plugin instances:

// @todo there may be a problem in the future if we are able to
// associate borrowed terms with a vocabulary.  If we
// add the ID space of borrowed terms to a vocabulary then
// setting the URL will be incorrect for those ID spaces.

This is actually due to a misunderstanding somewhere along the line during implementation as the original design did support borrowed terms. This needs to be fixed ASAP as we need to support borrowed terms for most modern ontologies.

You can see more about the original design here: https://tripaldoc.readthedocs.io/en/latest/design/vocab/file-structure.html and https://tripaldoc.readthedocs.io/en/latest/design/vocab.html.

This was intended to work by having multiple terms with the same ID Space and different vocabularies.

For example, say you have the following term in it's primary vocabulary:

Name: person
ID Space: ABC
Accession: 12345
Vocabulary: The Core Ontology for People

This term was then hypothetically borrowed by the "Components of a Research Group Ontology". This would result in an additional term object in Tripal as so:

Name: person
ID Space: ABC
Accession: 12345
Vocabulary: Components of a Research Group Ontology

You would be able to tell that the term was borrowed because you could get the default vocabulary of the ID Space and see that it is different then the id space of this particular term.

laceysanderson commented 1 year ago

Note: This issue was created in response to review of PR #1417 where I noticed the comment. I have specified a branch name based on the template but am not personally working on it yet.