Command examples¶
One example of each change type, written as a KGCL command and as YAML. The
examples are generated from the test suite (tests/cases.py), so every command on
this page is known to parse. For before-and-after diagrams of the most common
changes, see the visual guide to change types.
Labels¶
Rename a node (replace its label)¶
Class: NodeRename
rename GO:0005635 from 'nuclear envelope' to 'foo bar'
id: CHANGE:001
type: NodeRename
old_value: nuclear envelope
new_value: foo bar
about_node: GO:0005635
about_node_representation: curie
Add a label to an unlabeled node¶
Class: NewLabel
add label 'nucleus' to GO:0005634
id: CHANGE:001
type: NewLabel
new_value: nucleus
about_node: GO:0005634
about_node_representation: curie
Synonyms¶
Add a synonym¶
Class: NewSynonym
create exact synonym 'foo' for GO:0005634
id: CHANGE:001
type: NewSynonym
new_value: foo
about_node: GO:0005634
about_node_representation: curie
qualifier: exact
Remove a synonym¶
Class: RemoveSynonym
remove synonym 'foo' for GO:0005634
id: CHANGE:001
type: RemoveSynonym
old_value: foo
about_node: GO:0005634
about_node_representation: curie
Replace the text of a synonym¶
Class: SynonymReplacement
change synonym 'cell nucleus' for GO:0005634 to 'cell NUCLEUS'
id: CHANGE:001
type: SynonymReplacement
old_value: cell nucleus
new_value: cell NUCLEUS
about_node: GO:0005634
about_node_representation: label
Definitions¶
Add a definition¶
Class: NewTextDefinition
add definition 'this is dummy description' to GO:0005635
id: CHANGE:001
type: NewTextDefinition
new_value: this is dummy description
about_node: GO:0005635
about_node_representation: curie
Change a definition¶
Class: NodeTextDefinitionChange
change definition of GO:0005635 to 'this is dummy description'
id: CHANGE:001
type: NodeTextDefinitionChange
new_value: this is dummy description
about_node: GO:0005635
about_node_representation: curie
Remove a definition¶
Class: RemoveTextDefinition
remove definition for GO:0005634
id: CHANGE:001
type: RemoveTextDefinition
about_node: GO:0005634
about_node_representation: curie
Relationships (edges)¶
Create an edge¶
Class: EdgeCreation
create edge GO:0005634 BFO:0000050 GO:0009411
id: CHANGE:001
type: EdgeCreation
object_type: curie
subject: GO:0005634
predicate: BFO:0000050
object: GO:0009411
subject_type: curie
predicate_type: curie
Place a node under another node (create an is_a edge)¶
Class: PlaceUnder
create edge GO:0005634 rdfs:subClassOf GO:0009411
id: CHANGE:001
type: PlaceUnder
object_type: curie
subject: GO:0005634
predicate: rdfs:subClassOf
object: GO:0009411
subject_type: curie
predicate_type: curie
Delete an edge¶
Class: EdgeDeletion
delete edge GO:0005635 BFO:0000050 GO:0005634
id: CHANGE:001
type: EdgeDeletion
object_type: curie
subject: GO:0005635
predicate: BFO:0000050
object: GO:0005634
subject_type: curie
predicate_type: curie
Remove a node from under another node (delete an is_a edge)¶
Class: RemoveUnder
delete edge GO:0005634 rdfs:subClassOf GO:0043231
id: CHANGE:001
type: RemoveUnder
object_type: curie
subject: GO:0005634
predicate: rdfs:subClassOf
object: GO:0043231
subject_type: curie
predicate_type: curie
Change the predicate (relationship type) of an edge¶
Class: PredicateChange
change relationship between GO:0005635 and GO:0005634 from BFO:0000050 to rdfs:subClassOf
id: CHANGE:001
type: PredicateChange
old_value: BFO:0000050
new_value: rdfs:subClassOf
old_value_type: curie
new_value_type: curie
about_edge:
subject: GO:0005635
predicate: BFO:0000050
object: GO:0005634
subject_representation: curie
predicate_representation: curie
object_representation: curie
Move a node under a more specific parent¶
Class: NodeDeepening
deepen GO:0005739 from GO:0043231 to GO:0005634
id: CHANGE:001
type: NodeDeepening
old_value: GO:0043231
new_value: GO:0005634
about_edge:
subject: GO:0005739
object: GO:0043231
subject_representation: curie
object_representation: curie
old_object_type: curie
new_object_type: curie
Move a node under a more general parent¶
Class: NodeShallowing
shallow GO:0005739 from GO:0005634 to GO:0043231
id: CHANGE:001
type: NodeShallowing
old_value: GO:0005634
new_value: GO:0043231
about_edge:
subject: GO:0005739
object: GO:0005634
subject_representation: curie
object_representation: curie
old_object_type: curie
new_object_type: curie
Move an edge's object from one node to another¶
Class: NodeMove
move GO:0005634 BFO:0000050 GO:0043231 from GO:0043231 to GO:0005739
id: CHANGE:001
type: NodeMove
old_value: GO:0043231
new_value: GO:0005739
about_edge:
subject: GO:0005634
predicate: BFO:0000050
object: GO:0043231
subject_representation: curie
predicate_representation: curie
object_representation: curie
old_object_type: curie
new_object_type: curie
Annotations¶
Change the value of an annotation¶
Class: NodeAnnotationChange
change annotation of GO:0005634 with rdfs:comment from "old"@en to "new"@fr
id: CHANGE:001
type: NodeAnnotationChange
old_value: old
new_value: new
old_value_type: literal
new_value_type: literal
new_language: fr
old_language: en
about_node: GO:0005634
about_node_representation: curie
annotation_property: rdfs:comment
annotation_property_type: curie
Obsoletion¶
Obsolete a node¶
Class: NodeObsoletion
obsolete GO:0005634
id: CHANGE:001
type: NodeObsoletion
about_node: GO:0005634
about_node_representation: curie
Obsolete a node and name its replacement¶
Class: NodeObsoletionWithDirectReplacement
obsolete GO:0005634 with replacement GO:999
id: CHANGE:001
type: NodeObsoletionWithDirectReplacement
about_node: GO:0005634
about_node_representation: curie
has_direct_replacement: GO:999
Subsets¶
Add a node to a subset¶
Class: AddNodeToSubset
add GO:0005634 to subset foo
id: CHANGE:001
type: AddNodeToSubset
about_node: GO:0005634
about_node_representation: curie
in_subset: foo
Remove a node from a subset¶
Class: RemoveNodeFromSubset
remove GO:0005634 from subset foo
id: CHANGE:001
type: RemoveNodeFromSubset
about_node: GO:0005634
about_node_representation: curie
in_subset: foo
Creating nodes¶
Create a class¶
Class: ClassCreation
create GO:9999999
id: CHANGE:001
type: ClassCreation
about_node: GO:9999999
about_node_representation: curie
Create a node with a label¶
Class: NodeCreation
create node GO:9999999 'foo'
id: CHANGE:001
type: NodeCreation
about_node: GO:9999999
about_node_representation: curie
name: foo
Create an object property¶
Class: ObjectPropertyCreation
create object property BFO:0000050
id: CHANGE:001
type: ObjectPropertyCreation
about_node: BFO:0000050
about_node_representation: curie
Deleting nodes¶
Delete a class¶
Class: ClassDeletion
delete class GO:9999999
id: CHANGE:001
type: ClassDeletion
about_node: GO:9999999
about_node_representation: curie
Delete an object property¶
Class: ObjectPropertyDeletion
delete object property BFO:0000050
id: CHANGE:001
type: ObjectPropertyDeletion
about_node: BFO:0000050
about_node_representation: curie