Adding Taxon Restrictions: Difference between revisions

From GO Wiki
Jump to navigation Jump to search
mNo edit summary
(Update to document new taxon constraint template system.)
Line 1: Line 1:
   See [[Ontology_Editors_Daily_Workflow]] for creating branches and basic Protégé instructions.
   See [[Ontology_Editors_Daily_Workflow]] for creating branches and basic Protégé instructions.


==Only in taxon relations==
Taxon restrictions are managed outside of the main ontology file, in tab-separated (TSV) text files. These text files are used by the build system to generate an OWL ontology containing taxon restriction axioms. This file `imports/go_taxon_constraints.owl` is imported into GO. There are two TSVs to edit: one storing 'only in taxon' assertions and one storing 'never in taxon' assertions. They both have the same structure.
* Only in taxon relations are added as SubClasses.
 
# Navigate to the term for which you want to add the only in taxon restriction.
==Editing taxon constraints==
# In the Description window, click on the + to add a new SubClass Of relationship.
To add a taxon constraint, add a line to either [https://github.com/geneontology/go-ontology/blob/master/src/taxon_constraints/only_in_taxon.tsv src/taxon_constraints/only_in_taxon.tsv] or [https://github.com/geneontology/go-ontology/blob/master/src/taxon_constraints/never_in_taxon.tsv src/taxon_constraints/never_in_taxon.tsv]. You must use a tab character to separate the columns—this is best done in a plain text editor. Each line contains a GO term and a taxon term:
# In the pop-up window type a new relationship (e.g. 'only_in_taxon' some Viridiplantae).
 
# The taxa available are imported ontology terms and can be browsed just like any other ontology term.
  defined_class defined_class_label taxon taxon_label
   
  GO:0000131 incipient cellular bud site NCBITaxon:4895 Schizosaccharomyces
==Never in taxon relations==
  GO:0000795 synaptonemal complex NCBITaxon:4896 Schizosaccharomyces pombe
* Never in taxon relations are added as Annotations.
 
# Navigate to the term for which you want to add the never in taxon restriction.
To remove a constraint, just delete the line.
# In the class annotations window, click on the +.
 
# In the left-hand panel, select never_in_taxon.
==Regenerating go_taxon_constraints.owl==
# In the right-hand panel, in the Entity IRI tab, navigate to the correct taxon. The full path is: thing/continuant/independent continuant/material entity/object/organism.
After editing one of the taxon constraint TSVs, you need to regenerate go_taxon_constraints.owl so that the new axioms appear in GO. From within the 'ontology' directory, run:
# Select the appropriate taxon.
 
# Click OK to save your changes.
  ./run.sh make imports/go_taxon_constraints.owl
 
==Checking existing taxon constraints==
If an 'only in taxon' constraint is requested to be added to the ontology, you can use the reasoner to check whether the term can already be inferred to have that constraint (either through constraints asserted in GO or via imported ontologies such as Uberon). In Protege, turn on the reasoner (ELK) and go to the DL Query tab. For the requested taxon constraint (e.g. Eukaryota) and GO term (e.g. 'CAM photosynthesis'), do a DL query for "Equivalent classes":
 
  'CAM photosynthesis' and 'in taxon' some Eukaryota
 
Since this term already has the constraint 'Viridiplantae', you will see that this expression is equivalent to 'CAM photosynthesis' itself. So there is no need to add a taxon constraint to 'Eukaryota'.
 
On the other hand, if someone requested that this be restricted to 'Embryophyta', the equivalent class query for <code>'CAM photosynthesis' and 'in taxon' some Embryophyta</code> would have no results in the DL query panel. So adding that restriction to 'CAM photosynthesis' would be new information.
 
'''Note that your DL query must use 'in taxon', not 'only in taxon'.'''
 
Querying the classification for 'never in taxon' inference is more difficult, but for 'in taxon' this procedure should provide complete results.


   See [[Ontology_Editors_Daily_Workflow]] for commit, push and merge instructions.
   See [[Ontology_Editors_Daily_Workflow]] for commit, push and merge instructions.
Line 21: Line 34:
== Review Status ==
== Review Status ==


Last reviewed: May 24, 2017
Last reviewed: Nov 26, 2018


[http://wiki.geneontology.org/index.php/Ontology_Editing_Guide Back to: Ontology Editing Guide]
[http://wiki.geneontology.org/index.php/Ontology_Editing_Guide Back to: Ontology Editing Guide]

Revision as of 16:00, 26 November 2018

 See Ontology_Editors_Daily_Workflow for creating branches and basic Protégé instructions.

Taxon restrictions are managed outside of the main ontology file, in tab-separated (TSV) text files. These text files are used by the build system to generate an OWL ontology containing taxon restriction axioms. This file `imports/go_taxon_constraints.owl` is imported into GO. There are two TSVs to edit: one storing 'only in taxon' assertions and one storing 'never in taxon' assertions. They both have the same structure.

Editing taxon constraints

To add a taxon constraint, add a line to either src/taxon_constraints/only_in_taxon.tsv or src/taxon_constraints/never_in_taxon.tsv. You must use a tab character to separate the columns—this is best done in a plain text editor. Each line contains a GO term and a taxon term:

 defined_class	defined_class_label	taxon	taxon_label
 GO:0000131	incipient cellular bud site	NCBITaxon:4895	Schizosaccharomyces
 GO:0000795	synaptonemal complex	NCBITaxon:4896	Schizosaccharomyces pombe

To remove a constraint, just delete the line.

Regenerating go_taxon_constraints.owl

After editing one of the taxon constraint TSVs, you need to regenerate go_taxon_constraints.owl so that the new axioms appear in GO. From within the 'ontology' directory, run:

 ./run.sh make imports/go_taxon_constraints.owl

Checking existing taxon constraints

If an 'only in taxon' constraint is requested to be added to the ontology, you can use the reasoner to check whether the term can already be inferred to have that constraint (either through constraints asserted in GO or via imported ontologies such as Uberon). In Protege, turn on the reasoner (ELK) and go to the DL Query tab. For the requested taxon constraint (e.g. Eukaryota) and GO term (e.g. 'CAM photosynthesis'), do a DL query for "Equivalent classes":

 'CAM photosynthesis' and 'in taxon' some Eukaryota

Since this term already has the constraint 'Viridiplantae', you will see that this expression is equivalent to 'CAM photosynthesis' itself. So there is no need to add a taxon constraint to 'Eukaryota'.

On the other hand, if someone requested that this be restricted to 'Embryophyta', the equivalent class query for 'CAM photosynthesis' and 'in taxon' some Embryophyta would have no results in the DL query panel. So adding that restriction to 'CAM photosynthesis' would be new information.

Note that your DL query must use 'in taxon', not 'only in taxon'.

Querying the classification for 'never in taxon' inference is more difficult, but for 'in taxon' this procedure should provide complete results.

 See Ontology_Editors_Daily_Workflow for commit, push and merge instructions.

Review Status

Last reviewed: Nov 26, 2018

Back to: Ontology Editing Guide