Adding Taxon Restrictions: Difference between revisions
mNo edit summary |
Jamesbalhoff (talk | contribs) (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. | ||
== | 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 [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: | |||
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 <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: | 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