Skip to content

Commit

Permalink
Merge pull request #62 from INCATools/issue-61
Browse files Browse the repository at this point in the history
implementing add to and remove from subset commands
  • Loading branch information
hrshdhgd authored Mar 8, 2024
2 parents b2b2cd3 + cd9a371 commit c387b22
Show file tree
Hide file tree
Showing 9 changed files with 203 additions and 71 deletions.
42 changes: 29 additions & 13 deletions src/data/examples/examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,29 @@ Test_6:
command_with_curie: remove synonym 'foo' for GO:0005634
command_with_uri: remove synonym 'foo' for http://purl.obolibrary.org/obo/GO_0005634
Test_7:
id: CHANGE:001
type: AddNodeToSubset
about_node: GO:0005634
about_node_representation: curie
in_subset: foo
command_with_curie: add GO:0005634 to subset foo
command_with_uri: add http://purl.obolibrary.org/obo/GO_0005634 to subset foo
Test_8:
id: CHANGE:001
type: RemoveNodeFromSubset
about_node: GO:0005634
about_node_representation: curie
in_subset: foo
command_with_curie: remove GO:0005634 from subset foo
command_with_uri: remove http://purl.obolibrary.org/obo/GO_0005634 from subset foo
Test_9:
id: CHANGE:001
type: ClassCreation
about_node_representation: curie
node_id: GO:9999999
command_with_curie: create GO:9999999
command_with_uri: create http://purl.obolibrary.org/obo/GO_9999999
Test_8:
Test_10:
id: CHANGE:001
type: NodeCreation
about_node: GO:9999999
Expand All @@ -74,7 +90,7 @@ Test_8:
name: '''foo'''
command_with_curie: create node GO:9999999 'foo'
command_with_uri: TODO
Test_9:
Test_11:
id: CHANGE:001
type: EdgeCreation
object_type: curie
Expand All @@ -86,7 +102,7 @@ Test_9:
command_with_curie: create edge GO:0005634 BFO:0000050 GO:0009411
command_with_uri: create edge http://purl.obolibrary.org/obo/GO_0005634 http://purl.obolibrary.org/obo/BFO_0000050
http://purl.obolibrary.org/obo/GO_0009411
Test_10:
Test_12:
id: CHANGE:001
type: PlaceUnder
object_type: curie
Expand All @@ -98,7 +114,7 @@ Test_10:
command_with_curie: create edge GO:0005634 rdfs:subClassOf GO:0009411
command_with_uri: create edge http://purl.obolibrary.org/obo/GO_0005634 http://www.w3.org/2000/01/rdf-schema#subClassOf
http://purl.obolibrary.org/obo/GO_0009411
Test_11:
Test_13:
id: CHANGE:001
type: PredicateChange
old_value: BFO:0000050
Expand All @@ -114,7 +130,7 @@ Test_11:
object_representation: curie
command_with_curie: change relationship between GO:0005635 and GO:0005634 from BFO:0000050
to rdfs:subClassOf
Test_12:
Test_14:
id: CHANGE:001
type: PredicateChange
old_value: rdfs:subClassOf
Expand All @@ -133,7 +149,7 @@ Test_12:
command_with_uri: change relationship between http://purl.obolibrary.org/obo/GO_0005634
and http://purl.obolibrary.org/obo/GO_0043231 from http://www.w3.org/2000/01/rdf-schema#subClassOf
to http://purl.obolibrary.org/obo/BFO_0000050
Test_13:
Test_15:
id: CHANGE:001
type: RemoveUnder
object_type: curie
Expand All @@ -145,7 +161,7 @@ Test_13:
command_with_curie: delete edge GO:0005634 rdfs:subClassOf GO:0043231
command_with_uri: delete edge http://purl.obolibrary.org/obo/GO_0005634 http://www.w3.org/2000/01/rdf-schema#subClassOf
http://purl.obolibrary.org/obo/GO_0043231
Test_14:
Test_16:
id: CHANGE:001
type: EdgeDeletion
object_type: curie
Expand All @@ -156,7 +172,7 @@ Test_14:
predicate_type: curie
command_with_curie: delete edge GO:0005635 BFO:0000050 GO:0005634
command_with_uri: TODO
Test_15:
Test_17:
id: CHANGE:001
type: NodeDeepening
old_value: GO:0043231
Expand All @@ -170,15 +186,15 @@ Test_15:
new_object_type: curie
command_with_curie: deepen GO:0005739 from GO:0043231 to GO:0005634
command_with_uri: TODO
Test_16:
Test_18:
id: CHANGE:001
type: NewTextDefinition
new_value: '''this is dummy description'''
about_node: GO:0005635
about_node_representation: curie
command_with_curie: add definition 'this is dummy description' to GO:0005635
command_with_uri: add definition 'this is dummy description' to http://purl.obolibrary.org/obo/GO_0005635
Test_17:
Test_19:
id: CHANGE:001
type: NodeTextDefinitionChange
new_value: '''this is dummy description'''
Expand All @@ -187,21 +203,21 @@ Test_17:
command_with_curie: change definition of GO:0005635 to 'this is dummy description'
command_with_uri: change definition of http://purl.obolibrary.org/obo/GO_0005635
to 'this is dummy description'
Test_18:
Test_20:
id: CHANGE:001
type: RemoveTextDefinition
about_node: GO:0005634
about_node_representation: curie
command_with_curie: remove definition for GO:0005634
command_with_uri: remove definition for http://purl.obolibrary.org/obo/GO_0005634
Test_19:
Test_21:
id: CHANGE:001
type: NodeObsoletion
about_node: GO:0005634
about_node_representation: curie
command_with_curie: obsolete GO:0005634
command_with_uri: obsolete http://purl.obolibrary.org/obo/GO_0005634
Test_20:
Test_22:
id: CHANGE:001
type: NodeObsoletionWithDirectReplacement
about_node: GO:0005634
Expand Down
36 changes: 36 additions & 0 deletions src/docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Class: [`NodeRename`](https://w3id.org/kgcl/NodeRename) </br></br>Command: `rename GO:0005635 from 'nuclear envelope' to 'foo bar'`</br></br>YAML:
```
id: CHANGE:001
type: NodeRename
old_value: nuclear envelope
new_value: foo bar
about_node: GO:0005635
Expand All @@ -14,6 +15,7 @@ about_node_representation: curie
Class: [`NodeObsoletion`](https://w3id.org/kgcl/NodeObsoletion) </br></br>Command: `obsolete GO:0005634`</br></br>YAML:
```
id: CHANGE:001
type: NodeObsoletion
about_node: GO:0005634
about_node_representation: curie
Expand All @@ -22,6 +24,7 @@ about_node_representation: curie
Class: [`NodeObsoletionWithDirectReplacement`](https://w3id.org/kgcl/NodeObsoletionWithDirectReplacement) </br></br>Command: `obsolete GO:0005634 with replacement GO:999`</br></br>YAML:
```
id: CHANGE:001
type: NodeObsoletionWithDirectReplacement
about_node: GO:0005634
about_node_representation: curie
has_direct_replacement: GO:999
Expand All @@ -31,6 +34,7 @@ has_direct_replacement: GO:999
Class: [`NewSynonym`](https://w3id.org/kgcl/NewSynonym) </br></br>Command: `create exact synonym 'foo' for GO:0005634`</br></br>YAML:
```
id: CHANGE:001
type: NewSynonym
new_value: foo
about_node: GO:0005634
about_node_representation: curie
Expand All @@ -41,15 +45,37 @@ qualifier: exact
Class: [`RemoveSynonym`](https://w3id.org/kgcl/RemoveSynonym) </br></br>Command: `remove synonym 'foo' for GO:0005634`</br></br>YAML:
```
id: CHANGE:001
type: RemoveSynonym
old_value: foo
about_node: GO:0005634
about_node_representation: curie
```
## Example: Addition of a node to a subset.
Class: [`AddNodeToSubset`](https://w3id.org/kgcl/AddNodeToSubset) </br></br>Command: `add GO:0005634 to subset foo`</br></br>YAML:
```
id: CHANGE:001
type: AddNodeToSubset
about_node: GO:0005634
about_node_representation: curie
in_subset: foo
```
## Example: Removal of a node from a subset.
Class: [`RemoveNodeFromSubset`](https://w3id.org/kgcl/RemoveNodeFromSubset) </br></br>Command: `remove GO:0005634 from subset foo`</br></br>YAML:
```
id: CHANGE:001
type: RemoveNodeFromSubset
about_node: GO:0005634
about_node_representation: curie
in_subset: foo
```
## Example: Creation of new class.
Class: [`ClassCreation`](https://w3id.org/kgcl/ClassCreation) </br></br>Command: `create GO:9999999`</br></br>YAML:
```
id: CHANGE:001
type: ClassCreation
about_node_representation: curie
node_id: GO:9999999
Expand All @@ -58,6 +84,7 @@ node_id: GO:9999999
Class: [`NodeCreation`](https://w3id.org/kgcl/NodeCreation) </br></br>Command: `create node GO:9999999 'foo'`</br></br>YAML:
```
id: CHANGE:001
type: NodeCreation
about_node: GO:9999999
about_node_representation: curie
node_id: GO:9999999
Expand All @@ -68,6 +95,7 @@ name: foo
Class: [`EdgeCreation`](https://w3id.org/kgcl/EdgeCreation) </br></br>Command: `create edge GO:0005634 BFO:0000050 GO:0009411`</br></br>YAML:
```
id: CHANGE:001
type: EdgeCreation
object_type: curie
subject: GO:0005634
predicate: BFO:0000050
Expand All @@ -80,6 +108,7 @@ predicate_type: curie
Class: [`PlaceUnder`](https://w3id.org/kgcl/PlaceUnder) </br></br>Command: `create edge GO:0005634 rdfs:subClassOf GO:0009411`</br></br>YAML:
```
id: CHANGE:001
type: PlaceUnder
object_type: curie
subject: GO:0005634
predicate: rdfs:subClassOf
Expand All @@ -92,6 +121,7 @@ predicate_type: curie
Class: [`PredicateChange`](https://w3id.org/kgcl/PredicateChange) </br></br>Command: `change relationship between GO:0005635 and GO:0005634 from BFO:0000050 to rdfs:subClassOf`</br></br>YAML:
```
id: CHANGE:001
type: PredicateChange
old_value: BFO:0000050
new_value: rdfs:subClassOf
old_value_type: curie
Expand All @@ -109,6 +139,7 @@ about_edge:
Class: [`RemoveUnder`](https://w3id.org/kgcl/RemoveUnder) </br></br>Command: `delete edge GO:0005634 rdfs:subClassOf GO:0043231`</br></br>YAML:
```
id: CHANGE:001
type: RemoveUnder
object_type: curie
subject: GO:0005634
predicate: rdfs:subClassOf
Expand All @@ -121,6 +152,7 @@ predicate_type: curie
Class: [`EdgeDeletion`](https://w3id.org/kgcl/EdgeDeletion) </br></br>Command: `delete edge GO:0005635 BFO:0000050 GO:0005634`</br></br>YAML:
```
id: CHANGE:001
type: EdgeDeletion
object_type: curie
subject: GO:0005635
predicate: BFO:0000050
Expand All @@ -133,6 +165,7 @@ predicate_type: curie
Class: [`NodeDeepening`](https://w3id.org/kgcl/NodeDeepening) </br></br>Command: `deepen GO:0005739 from GO:0043231 to GO:0005634`</br></br>YAML:
```
id: CHANGE:001
type: NodeDeepening
old_value: GO:0043231
new_value: GO:0005634
about_edge:
Expand All @@ -148,6 +181,7 @@ new_object_type: curie
Class: [`NewTextDefinition`](https://w3id.org/kgcl/NewTextDefinition) </br></br>Command: `add definition 'this is dummy description' to GO:0005635`</br></br>YAML:
```
id: CHANGE:001
type: NewTextDefinition
new_value: this is dummy description
about_node: GO:0005635
about_node_representation: curie
Expand All @@ -157,6 +191,7 @@ about_node_representation: curie
Class: [`NodeTextDefinitionChange`](https://w3id.org/kgcl/NodeTextDefinitionChange) </br></br>Command: `change definition of GO:0005635 to 'this is dummy description'`</br></br>YAML:
```
id: CHANGE:001
type: NodeTextDefinitionChange
new_value: this is dummy description
about_node: GO:0005635
about_node_representation: curie
Expand All @@ -166,6 +201,7 @@ about_node_representation: curie
Class: [`RemoveTextDefinition`](https://w3id.org/kgcl/RemoveTextDefinition) </br></br>Command: `remove definition for GO:0005634`</br></br>YAML:
```
id: CHANGE:001
type: RemoveTextDefinition
about_node: GO:0005634
about_node_representation: curie
Expand Down
Loading

0 comments on commit c387b22

Please sign in to comment.