id: https://w3id.org/kgcl name: kgcl_schema title: Knowledge Graph Change Language description: 'A data model for describing change operations at a high level on an ontology or ontology-like artefact, such as a Knowledge Graph. * [Browse Schema](https://cmungall.github.io/knowledge-graph-change-language/) * [GitHub](https://github.com/cmungall/knowledge-graph-change-language)' license: https://creativecommons.org/publicdomain/zero/1.0/ version: 0.0.1 prefixes: kgcl: http://w3id.org/kgcl/ dcterms: http://purl.org/dc/terms/ IAO: http://purl.obolibrary.org/obo/IAO_ oio: http://www.geneontology.org/formats/oboInOwl# xml: http://www.w3.org/XML/1998/namespace# linkml: https://w3id.org/linkml/ rdfs: http://www.w3.org/2000/01/rdf-schema# default_prefix: kgcl default_range: string imports: - linkml:types - ontology_model - prov types: ChangeClassType: typeof: uriorcurie description: CURIE for a class within this data model. E.g. kgcl:NodeObsoletion classes: ChangeLanguageElement: abstract: true description: A broad grouping for all elements of the change language Change: abstract: true is_a: ChangeLanguageElement description: Any change perform on an ontology or knowledge graph slots: - id - type - was_generated_by - see_also - pull_request - term_tracker_issue - creator - change_date - contributor - has_undo - change_description - associated_change_set slot_usage: was_generated_by: comments: - we use the PROV model to represent the agent making a change see_also: comments: - If this change is in relationship to an issue on a system like github, include the URL here pull_request: comments: - If this change has a pull request on a system like github, include the URL here term_tracker_issue: comments: - If this change has an issue on a system like github, include the URL here creator: slot_uri: dcterms:creator comments: - This should be the composition of 'was generated by' and 'was associated with' change_date: comments: - This should be the composition of 'was generated by' and 'ended at time' SimpleChange: abstract: true aliases: - atomic change is_a: Change description: A change that is about a single ontology element slots: - old_value - new_value - old_value_type - new_value_type - new_language - old_language - new_datatype - old_datatype ComplexChange: abstract: true is_a: Change description: A change that is is a composition of other changes slots: - change_set MultiNodeObsoletion: aliases: - multi node deprecation - multi class obsoletion - multi term obsoletion - multi concept obsoletion is_a: ComplexChange description: A complex change consisting of multiple obsoletions. see_also: - https://github.com/cmungall/obo-scripts/blob/master/obo-obsoletify.pl slot_usage: change_set: range: NodeObsoletion change_description: string_serialization: obsolete multiple {change set} associated_change_set: description: >- All changes associated with a set of obsoletions. This change set is the composed change set rather than the set of individual changes. For example, if previous state is:\n `A subClassOf B subClassOf C subClassOf D` and we obsolete {B,C}, then the individual changes are `A moves from B to C` and `B moves from C to D`, but the composed change set is `A moves from B to D`" Transaction: is_a: Change description: A change that is a composition of a set of changes, where those changes are treated as a single unit. Could be a single change, or the results of an ontology diff slots: - change_set ChangeSetSummaryStatistic: is_a: ChangeLanguageElement description: A summary statistic for a set of changes of the same type, grouped by zero or more node properties slot_usage: #change type: # range: ChangeClassType #count: # range: integer #property_value_set: # description: Summary statistic is grouped by these constraints ChangeMixin: mixin: true description: root class for all change mixins slots: - about - has_undo - old_value - new_value Obsoletion: aliases: - deprecation - retiring is_a: ChangeMixin mixin: true description: Obsoletion of an element deprecates usage of that element, but does not delete that element. comments: - In OWL, deprecation is handled by the deprecation axiom. In OBO, we use this, but place additional requirements and expectations on obsolete elements see_also: - http://wiki.geneontology.org/index.php/Obsoleting_an_Existing_Ontology_Term - https://mondo.readthedocs.io/en/latest/editors-guide/merging-and-obsoleting/ slot_usage: about: description: The element that is obsoleted by this change. has_undo: range: Obsoletion DatatypeOrLanguageTagChange: is_a: ChangeMixin mixin: true description: A change in a value assertion where the value remain unchanged but either the datatype or language changes LanguageTagChange: is_a: DatatypeOrLanguageTagChange slot_usage: old_value: multivalued: false range: LanguageTag new_value: multivalued: false range: LanguageTag DatatypeChange: is_a: DatatypeOrLanguageTagChange AllowsAutomaticReplacementOfEdges: is_a: Obsoletion mixin: true description: Applies to an obsoletion in which annotations or edges pointing at the obsoleted node can be automatically rewired to point to a target Unobsoletion: is_a: ChangeMixin mixin: true description: Opposite operation of obsoletion. Rarely performed. see_also: - http://wiki.geneontology.org/index.php/Restoring_an_Obsolete_Ontology_Term slot_usage: has_undo: range: Obsoletion Deletion: is_a: ChangeMixin mixin: true description: Removal of an element. comments: - In general, for OBO ontologies, node elements should never be deleted, always obsolete. However, edge deletion is more common. Creation: is_a: ChangeMixin mixin: true description: Creation of an element. slot_usage: has_undo: range: Deletion SubsetMembershipChange: is_a: ChangeMixin mixin: true description: A change in the membership status of a node with respect to a subset (view) slots: - in_subset AddToSubset: is_a: SubsetMembershipChange mixin: true description: placing an element inside a subset slot_usage: in_subset: description: subset that the element is being placed inside. RemoveFromSubset: is_a: SubsetMembershipChange mixin: true description: removing an element from a subset slot_usage: in_subset: description: subset that the element is being removed from has_undo: range: AddToSubset EdgeChange: abstract: true aliases: - axiom change - triple change is_a: SimpleChange description: A change in which the element that is the focus of the change is an edge. slots: - about_edge - object_type - language - datatype slot_usage: about_edge: comments: - if subject is empty, use the about field of the last node change todos: - decide on flat serialization, see https://github.com/cmungall/knowledge-graph-change-language/issues/7 EdgeCreation: aliases: - relationship creation is_a: EdgeChange description: An edge change in which a de-novo edge is created. The edge is potentially annotated in the same action. mixins: - Creation slots: - subject - predicate - object - subject_type - predicate_type - object_type - annotation_set slot_usage: change_description: string_serialization: create edge {edge.subject} {edge.predicate} {edge.object} see_also: - http://wiki.geneontology.org/index.php/Guidelines_for_creating_relationships_between_terms PlaceUnder: is_a: EdgeCreation description: An edge creation where the predicate is owl:subClassOf EdgeDeletion: aliases: - relationship deletion is_a: EdgeChange description: An edge change in which an edge is removed. All edge annotations/properies are removed in the same action. mixins: - Deletion slots: - subject - predicate - object - subject_type - predicate_type - object_type - annotation_set slot_usage: change_description: string_serialization: delete edge {edge.subject} {edge.predicate} {edge.object} RemoveUnder: is_a: EdgeDeletion description: "An edge deletion where the predicate is owl:subClassOf\n " EdgeObsoletion: aliases: - relationship obsoletion is_a: EdgeChange description: An edge change in which an edge is obsoleted. comments: - Note there is not yet consensus in how this should be done in rdf/owl implementations. Simply marking the edge deprecated with render it visible to most clients. Care must be taken because simply adding a deprecation tag to an axiom does not silence it -- it is still asserted. It is therefore more common to obsolete an edge by shadowing the axiom as an annotation. See the Mondo docs for example see_also: - https://mondo.readthedocs.io/en/latest/editors-guide/g-logical-axioms/#excluded-subclassof mixins: - Obsoletion slots: - subject - predicate - object - annotation_set slot_usage: change_description: string_serialization: obsolete edge {edge.subject} {edge.predicate} {edge.object} EdgeRewiring: is_a: EdgeChange description: An edge change where one node is replaced with another, as in the case of obsoletion with replacement examples: - value: changing G1 annotated-to T1 to G1 annotated-to T2, after obsoletion of T1 and replacement with T2 MappingCreation: deprecated: use NewMapping aliases: - xref creation is_a: EdgeCreation description: A specific kind of edge creation in which the created edge is a mapping. mixins: - Creation slots: - subject - predicate - object - annotation_set slot_usage: change_description: string_serialization: create mapping {subject} {predicate} {object} subject: description: This corresponds to subject_id in SSSOM predicate: description: This corresponds to predicate_id in SSSOM. The value of this is typically a predicate from SKOS object: description: This corresponds to object_id in SSSOM todos: - decide whether to make a corresponding change to the datamodel NodeMove: is_a: EdgeChange description: A node move is a combination of deleting a parent edge and adding a parent edge, where the predicate is preserved and the object/parent node changes slots: - old_object_type - new_object_type examples: - value: changing a is-a b to a is-a c slot_usage: change_description: string_serialization: move {about_edge.subject} {about_edge.predicate} {about_edge.object} from {old_value} to {new_value} NodeDeepening: is_a: NodeMove description: A node move in which a node where the destination is a proper descendant of the original location. Note that here descendant applied not just to subclass, but edges of any predicate in the relational graph examples: - value: changing a is-a b to a is-a c, where c is a subclass of b slot_usage: change_description: string_serialization: deepen {about_edge.subject} {about_edge.predicate} {about_edge.object} from {old_value} to {new_value} NodeShallowing: is_a: NodeMove description: The opposite of node deepening examples: - value: changing a is-a c to a is-a b, where c is a subclass of b slot_usage: change_description: string_serialization: lift {about_node} from {old_value} to {new_value} PredicateChange: is_a: EdgeChange description: An edge change where the predicate (relationship type) is modified. examples: - value: changing a is-a b to a part-of b slot_usage: change_description: string_serialization: change edge type between {about.subject} and {about.object} from {old_value} to {new_value} EdgeLogicalInterpretationChange: is_a: EdgeChange description: An edge change where the subject, object, and predicate are unchanged, but the logical interpretation changes examples: - value: changing a SubClassOf r some b to a subClassOf r only b LogicalAxiomChange: is_a: SimpleChange description: A simple change where a logical axiom is changed, where the logical axiom cannot be represented as an edge NodeChange: abstract: true is_a: SimpleChange description: A simple change where the change is about a node slots: - about_node - about_node_representation - language NodeRename: is_a: NodeChange description: A node change where the name (aka rdfs:label) of the node changes slots: - old_value - new_value - has_textual_diff - new_language - old_language slot_usage: old_value: multivalued: false new_value: multivalued: false change_description: string_serialization: rename {about_node} from {old_value} to {new_value} examples: - value: rename UBERON:0002398 from 'manus' to 'hand' description: replacing the rdfs:label of 'manus' on an uberon class with the rdfs:label 'hand' SetLanguageForName: is_a: NodeChange mixins: - LanguageTagChange description: A node change where the string value for the name is unchanged but the language tag is set slots: - old_value - new_value slot_usage: change_description: string_serialization: changed {about_node} name language from {old_value} to {new_value} NodeAnnotationChange: description: A node change where the change alters node properties/annotations. TODO is_a: NodeChange slots: - annotation_property - annotation_property_type NodeAnnotationReplacement: is_a: NodeAnnotationChange description: A node annotation change where the change replaces a particular property value. TODO NodeSynonymChange: is_a: NodeChange NewSynonym: description: A node synonym change where a de-novo synonym is created is_a: NodeSynonymChange slots: - new_value - language - qualifier - predicate aliases: - new alias - create synonym - add synonym NameBecomesSynonym: is_a: NodeSynonymChange description: A node synonym where the name NAME of an node NODE moves to a synonym, and NODE receives a new name. This change consists of compose of (1) a node rename where NAME is replaced by a different name (2) a new synonym slot_usage: #change_1: # range: NodeRename #change 2: # range: NewSynonym # description: '' change_description: string_serialization: synonym {synonym} becomes new name of {about_node}, and name {name} becomes a synonym RemoveSynonym: description: A node synonym change where a synonym is deleted is_a: NodeSynonymChange slots: - old_value SynonymReplacement: description: A node synonym change where the text of a synonym is changed is_a: NodeSynonymChange slots: - old_value - new_value - qualifier - has_textual_diff SynonymPredicateChange: aliases: - node scope change description: 'A node synonym change where the predicate of a synonym is changed. Background: synonyms can be represented by a variety of predicates. For example, many OBO ontologies make use of predicates such as oio:hasExactSynonym, oio:hasRelatedSynonym, etc' is_a: NodeSynonymChange slots: - old_value - new_value - has_textual_diff - target NodeMappingChange: description: A node change where the mappings for that node are altered is_a: NodeChange aliases: - xref change NewMapping: description: A node mapping change where a mapping is added to a node is_a: NodeMappingChange slots: - object - predicate aliases: - xref change RemoveMapping: description: A node mapping change where a mapping is deleted is_a: NodeMappingChange slots: - object - predicate MappingReplacement: description: A node mapping change where the object of a mapping is changed is_a: NodeMappingChange slots: - old_value - new_value MappingPredicateChange: aliases: - node scope change description: A node mapping change where the predicate of a mapping is changed. is_a: NodeMappingChange slots: - old_value - new_value NodeMetadataAssertionChange: description: A node change where the metadata assertion (OWL annotations) for that node are altered is_a: NodeChange aliases: - NodeAnnotationChange NewMetadataAssertion: description: A node metadata assertion change where a metadata assertion is added to a node is_a: NodeMetadataAssertionChange slots: - object - predicate aliases: - xref change RemoveMetadataAssertion: description: A node metadata assertion change where a metadata assertion is deleted is_a: NodeMetadataAssertionChange slots: - object - predicate MetadataAssertionReplacement: description: A node metadata assertion change where the object of a metadata assertion is changed is_a: NodeMetadataAssertionChange slots: - old_value - new_value MetadataAssertionPredicateChange: aliases: - node scope change description: A node metadata assertion change where the predicate of a metadata assertion is changed. is_a: NodeMetadataAssertionChange slots: - old_value - new_value NodeTextDefinitionChange: abstract: true is_a: NodeChange description: A node change where the text definition is changed NewTextDefinition: description: A node change where a de-novo text definition is created is_a: NodeTextDefinitionChange slots: - new_value RemoveTextDefinition: description: A node change where a text definition is deleted is_a: NodeTextDefinitionChange slots: - old_value TextDefinitionReplacement: description: A node change where a text definition is modified is_a: NodeTextDefinitionChange slots: - old_value - new_value - has_textual_diff AddNodeToSubset: aliases: - add term to slim is_a: NodeChange mixins: - AddToSubset description: Places a node inside a subset, by annotating that node see_also: - http://wiki.geneontology.org/index.php/Adding_a_Term_to_a_GO_Subset_(Slim) RemoveNodeFromSubset: aliases: - remove term from slim is_a: NodeChange mixins: - RemoveFromSubset description: Removes a node from a subset, by removing an annotation slot_usage: change_description: string_serialization: removing {about_node} from {subset} about_node: description: The node that is removed from the subset in_subset: description: The subset from which the node is to be removed NodeObsoletion: aliases: - node deprecation - class obsoletion - term obsoletion - concept obsoletion is_a: NodeChange mixins: - Obsoletion description: Obsoletion of a node deprecates usage of that node, but does not delete it. slots: - has_direct_replacement - has_nondirect_replacement slot_usage: change_description: string_serialization: obsoleting {about_node} associated_change_set: is_a: change_set description: 'All changes forced as a result of this obsoletion. For example, starting with `A subClassOf B subClassOf C`, if we obsolete node B, then we may decide to bundle in a node move change of A from B to C. Note: this change set is not considered a part of the obsoletion, as obsoletion is considered atomic/simple. Instead this is a reference to a change set that may exist elsewhere' see_also: - http://wiki.geneontology.org/index.php/Obsoleting_an_Existing_Ontology_Term NodeUnobsoletion: aliases: - node undeprecation - class unobsoletion - term unobsoletion - concept unobsoletion is_a: NodeChange mixins: - Unobsoletion description: unobsoletion of a node deprecates usage of that node. Rarely applied. slots: - has_direct_replacement - has_nondirect_replacement slot_usage: change_description: string_serialization: unobsoleting {about_node} see_also: - http://wiki.geneontology.org/index.php/Restoring_an_Obsolete_Ontology_Term NodeCreation: is_a: NodeChange mixins: - Creation description: a node change in which a new node is created slots: - node_id - name - owl_type - annotation_set - language slot_usage: change_description: string_serialization: creating node {id} {label} with {annotation set} todos: - allow this for the creation of an instance from a class. This may include metaclasses (templates) see_also: - http://wiki.geneontology.org/index.php/Guidelines_for_creating_a_GO_term ClassCreation: is_a: NodeCreation description: A node creation where the owl type is 'owl:Class' slots: - superclass slot_usage: change_description: string_serialization: create class {about_node} ObjectPropertyCreation: is_a: NodeCreation description: A node creation where the owl type is 'ObjectProperty' slot_usage: change_description: string_serialization: create object property {about_node} NodeDeletion: is_a: NodeChange mixins: - Deletion description: Deletion of a node from the graph. Note it is recommended nodes are obsoleted and never merged, but this operation exists to represent deletions in ontologies, accidental or otherwise slot_usage: change_description: string_serialization: delete {about_node} NodeDirectMerge: is_a: NodeObsoletion mixins: - AllowsAutomaticReplacementOfEdges description: An obsoletion change in which all metadata (including name/label) from the source node is deleted and added to the target node, and edges can automatically be rewired to point to the target node comments: - In the OBO format serialization of the graph, the source node vanishes from the file as a distinct entry and is retained only as an alt_id slot_usage: has_direct_replacement: required: true about_node: aliases: - alt_id change_description: string_serialization: merge {about_node} into {has_direct_replacement} see_also: - http://wiki.geneontology.org/index.php/Merging_Ontology_Terms - http://wiki.geneontology.org/index.php/Principles_for_merging_terms NodeObsoletionWithDirectReplacement: is_a: NodeObsoletion mixins: - AllowsAutomaticReplacementOfEdges description: An obsoletion change in which information from the obsoleted node is selectively copied to a single target, and edges can automatically be rewired to point to the target node slot_usage: has_direct_replacement: required: true change_description: string_serialization: obsolete {about_node} with replacement {has_direct_replacement} see_also: - http://wiki.geneontology.org/index.php/Merging_Ontology_Terms - http://wiki.geneontology.org/index.php/Principles_for_merging_terms NodeObsoletionWithNoDirectReplacement: is_a: NodeObsoletion description: An obsoletion change in which there is no direct replacement slot_usage: has_nondirect_replacement: required: true change_description: string_serialization: obsolete {about_node} with alternative {has_nondirect_replacement} TextualDiff: is_a: ChangeLanguageElement description: A summarizing of a change on a piece of text. This could be rendered in a number of different ways Configuration: is_a: ChangeLanguageElement description: The meaning of operations can be configured attributes: name_predicate: null definition_predicate: null main_synonym_predicate: null synonym_predicates: null creator_predicate: null contributor_predicate: null obsolete_node_label_prefix: range: string description: A prefix to add to the label of an obsolete node. This may include a space at the end. obsoletion_workflow: null obsoletion_policies: multivalued: true range: ObsoletionPolicyEnum obsolete_subclass_of_shadow_property: range: uriorcurie description: >- specifies the annotation property to be used to create a shadow annotation assertion triple when a subclass edge is deleted. Session: is_a: ChangeLanguageElement description: A session consists of a set of change sets bundled with the activities that generated those change sets tree_root: true slots: - change_set - activity_set slots: type: designates_type: true slot_uri: rdf:type pull_request: null see_also: slot_uri: rdfs:seeAlso creator: slot_uri: dcterms:creator contributor: slot_uri: dcterms:creator change_date: slot_uri: dcterms:date term_tracker_issue: exact_mappings: - IAO:0000233 has_undo: domain: Change description: A change that reverses this change range: Change multivalued: false node_id: description: id of a node to be created todos: - consider using 'about' instead range: Node superclass: range: Node language: range: LanguageTag description: The language tag of a literal about: description: The 'focus' entity on which the change operates multivalued: false range: OntologyElement about_node: is_a: about multivalued: false range: Node about_edge: is_a: about multivalued: false range: Edge about_node_representation: deprecated: no longer required description: 'The representation of a node (URI, CURIE, label) ' target: description: The secondary entity on which the change operates old_value: description: The value of a property held in the old instance of the ontology new_value: description: The value of a property held in the new instance of the ontology datatype: description: The datatype of a literal new_datatype: description: The new datatype of a literal old_datatype: description: The old datatype of a literal new_language: description: The new language tag of a literal old_language: description: The old language tag of a literal qualifier: description: The qualifier of a change operation subclass: description: The subclass of a subsumption axiom new_subclass: description: The new subclass of a subsumption axiom new_property: description: The new property of an OWL restriction new_filler: description: The new filler of an OWL restriction object_type: deprecated: no longer required description: The type (IRI or Literal) of an object new_object_type: deprecated: no longer required description: The type (IRI or Literal) of a new object old_object_type: deprecated: no longer required description: The type (IRI or Literal) of an old object new_value_type: deprecated: no longer required description: The type (IRI or Literal) of a new value old_value_type: deprecated: no longer required description: The type (IRI or Literal) of an old value subject_type: deprecated: no longer required description: The type (IRI or Literal) of an edge's subject subclass_type: deprecated: no longer required description: The type of a subclass superclass_type: deprecated: no longer required description: The type of a superclass predicate_type: deprecated: no longer required description: The type (IRI or Literal) of an edge's subject in_subset: description: The subset that pertains to this change range: OntologySubset annotation_property: description: An annotation property annotation_property_type: deprecated: no longer required description: 'The type of a property (URI, CURIE, label) ' change_description: description: A string serialization of the change. This should be both human-readable, and parseable. comments: - Form 1: IRIs are denoted by CURIEs, optionally followed by label in parenthesis - Form 2: IRIs are denoted by the rdfs:label in single quotes, e.g. 'nervous system' examples: - value: rename UBERON:0002398 from 'manus' to 'hand' - value: move 'hand' from 'part of' 'hindlimb' to 'part of' 'forelimb' - value: merge 'cellular metabolic process' into 'metabolic process' - value: search and replace 'metabolic process' with 'metabolism' in all labels under 'biological process' - value: search and replace 'metabolic process' with 'metabolism' in all labels under 'biological process' retaining as 'exact synonym' has_textual_diff: description: A representation of character-level changes on a textual literal property. For example, if a text definition may change by only a single character such as addition of a period, it is useful to be able to see this visually. comments: - this is NOT for representing the diff of the change as a whole. domain: Change range: TextualDiff change_set: description: A collection of changes range: Change multivalued: true inlined: true inlined_as_list: true associated_change_set: is_a: change_set description: 'All changes forced as a result of this obsoletion. For example, starting with `A subClassOf B subClassOf C`, if we obsolete node B, then we may decide to bundle in a node move change of A from B to C. Note: this change set is not considered a part of the obsoletion, as obsoletion is considered atomic/simple. Instead this is a reference to a change set that may exist elsewhere' has_replacement: domain: NodeObsoletion range: Node abstract: true is_a: target description: A single node obsoletion event may be accompanied by one or more suggested replacement nodes comments: - In OBO, the replacement term is indicated using IAO:nnnnnn has_direct_replacement: range: Node multivalued: false close_mappings: - IAO:0100001 description: An obsoletion replacement where it IS valid to automatically update annotations/edges pointing at the node with its direct replacement comments: - if a node obsoletion C, C about N1, and C has direct replacement N2, and there exists an edge with an edge property referencing N1, it is possible to replace with N2 - if a node obsoletion C C about N1, and Chas direct replacement N2, then N1 IAO:0100001 N2 has_nondirect_replacement: range: Node multivalued: true description: An obsoletion replacement where it is NOT valid to automatically update annotations/edges pointing at the node with its direct replacement close_mappings: - oio:consider comments: - if a node obsoletion C, C about N1, and C has direct replacement N2, and there exists an edge with an edge property referencing N1, it is possible to replace with N2 - if a node obsoletion C C about N1, and Chas direct replacement N2, then N1 oio:consider N2 enums: ObsoletionPolicyEnum: permissible_values: NoLogicalAxiomsOnObsoletes: description: The obsoletion policy is that there MUST NOT be logical axioms about an obsolete node ObsoleteLabelsArePrefixed: description: The obsoletion policy is that any label on an obsolete node MUST be prefixed with 'obsolete' or similar