Adding Taxon Restrictions

From GO Wiki
Jump to navigation Jump to search
 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 on a new branch locally. Alternatively, you can edit the file directly in GH and create a new branch. 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. If you orginally edited the tsv file on GH, do a git pull on your local machine and then switch to the branch that has your requested taxon constraint.

~/repos/go-ontology/src/ontology(master) $ git pull
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 5 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (5/5), done.
f20f612..5a26f66 ukemi-patch-2 -> origin/ukemi-patch-2
~/repos/go-ontology/src/ontology(master) $ git checkout ukemi-patch-2
Branch ukemi-patch-2 set up to track remote branch ukemi-patch-2 from origin.
Switched to a new branch 'ukemi-patch-2'


If you don't have Docker running, start it. From within the 'ontology' directory, run:

 ./run.sh make imports/go_taxon_constraints.owl


Running Docker will change two files, src/ontology/imports/go_taxon_constraints.owl and /src/taxon_constraints/only_in_taxon.ofn. You should see stanzas representing the constraints you added.

Change directories to repos/go-ontology/src and commit the two files.

Push you branch to origin and then create a pull request. The Travis checks will run and you can merge once they pass.

Checking existing taxon constraints

If a 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 a requested 'only in 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 an only in 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 use the exact same kind of query. However, instead of looking for equivalence to the term, you check that the expression is equivalent to owl:Nothing. For a 'never in taxon' request for 'adiponectin binding' in Schizosaccharomyces, do this DL query:

 'adiponectin binding' and 'in taxon' some Schizosaccharomyces

Under 'Equivalent classes' you will see that the expression is equivalent to owl:Nothing. This means that this restriction is already in the ontology (it comes from a never in taxon Fungi that was asserted). If no equivalent was found, then adding the never in taxon constraint would add new information.

 See Ontology_Editors_Daily_Workflow for commit, push and merge instructions.

Review Status

Last reviewed: Nov 29, 2018

Back to: Ontology Editing Guide