Download presentation
Presentation is loading. Please wait.
Published byWilla Barnett Modified over 9 years ago
1
GO in OWL part 2: JSON-LD serialization
2
Some subtleties The following 4 assertion sets are semantically equivalent but structurally different 1. Fred instantiates the type owns some dog 3. Fred owns ?x ?x instantiates dog 4. Fred owns object-000001234 object-000001234 instantiates dog Individual: Fred Types: owns some dog Individual: Fred Facts: owns _:1 Individual: _:1 Types: dog Individual: Fred Facts: owns object-000001234 Individual: object-000001234 Types: dog Natural language(ish) OWL Manchester Syntax 2. Fred is a type of “dog owner”, Every “dog owner” owns some dog Individual: Fred Types: DogOwner Class: DogOwner SubClassOf:owns some dog
3
Our Conventions We use 1 for occurs_in, enabled_by (or anything pointing at a material entity) We use 4 for part_of (or anything not connecting to a material entity) This is more convenient for certain purposes (e.g. tracking entities) but is just a convention 1. Fred instantiates the type owns some dog 3. Fred owns ?x ?x instantiates Dog 4. Fred owns object-000001234 object-000001234 instantiates Dog Individual: Fred Types: owns some dog Individual: Fred Facts: owns _:1 Individual: _:1 Types: dog Individual: Fred Facts: owns object-000001234 Individual: object-000001234 Types: dog Natural language(ish) OWL Manchester Syntax 2. Fred is a type of “dog owner”, Every “dog owner” owns some dog Individual: Fred Types: DogOwner Class: DogOwner SubClassOf:owns some dog
4
Persistence and over-the-wire options OWL2 has many serialization options – RDF/XML – OWL-XML – Manchester – JSON-LD introduced with RDF1.1
5
JSON-LD JSON-LD goals: “near-zero edits” – i.e. existing JSON “in the wild” can be semanticized Our approach: – Reuse JSON LD as much as possible, unless it hurts – Introduce our own custom json where necessary
6
Example (Combined) { type: "GO:nnnn", ## MF (optional) part_of: { type: "GO:nnnn" }, ## BP (optional) occurs_in: { type: "GO:nnnn" }, ## CC (optional) enabled_by: { type: "UniProtKB:nnn"}, ## mandatory-ish describedBy: { reference: "PMID:123456", evidence: { type: "ECO:0000001", with: "XXXX" }
7
Convenience for URI mapping { type: "GO:nnnn", ## MF part_of: { type: "GO:nnnn" }, ## BP occurs_in: { type: "GO:nnnn" }, ## CC enabled_by: { type: "UniProtKB:nnn"}, ## mandatory describedBy: { reference: "PMID:123456", evidence: { type: "ECO:0000001", with: "XXXX" } “@”: { “GO”:”http://purl.obolibrary.org/obo/GO_”,”http://purl.obolibrary.org/obo/GO_ “BFO”:”http://purl.obolibrary.org/obo/BFO_”,”http://purl.obolibrary.org/obo/BFO_ “part_of”:”BFO:0000050”, … }
8
All of the following are semantically equivalent id: x, occurs_in: { type: "GO:nnnn" } id: x, type: {type: “owl:Restriction”, onProperty: “occurs_in”, someValuesFrom: “GO:nnnnn”} id: x, occurs_in: { id: “goobj-00000000012345678”, type: "GO:nnnn" } May be useful to have a js function that interconverts May be useful to have a js function that interconverts Blank (anonymous) nodes Named individuals Class expressions x occ Go:nn rdf:type x occ Go:nn rdf:type goobj- 000000000123 45678 x rdf: type Occ onProp GO;nnn someVF Restr rdf:type
9
Basic MF annotations { type: "GO:nnnn", ## MF part_of: { type: "GO:nnnn" }, ## BP occurs_in: { type: "GO:nnnn" }, ## CC enabled_by: { type: "UniProtKB:nnn"}, ## mandatory describedBy: { reference: "PMID:123456", evidence: { type: "ECO:0000001", with: "XXXX" }
10
Basic BP annotations { type: "GO:0003674", ## MF part_of: { type: "GO:nnnn" }, ## BP occurs_in: { type: "GO:nnnn" }, ## CC enabled_by: { type: "UniProtKB:nnn"}, ## mandatory describedBy: { reference: "PMID:123456", evidence: { type: "ECO:0000001", with: "XXXX" }
11
Nesting { type: "GO:nnnn", ## MF has_input: “CHEBI:nnnn”, ## (same as c16) part_of: { type: "GO:nnnn" }, ## BP occurs_in: { type: "GO:nnnn”, ## CC part_of: { type: “CL:nnnnn”, part_of: { type: “UBERON:nnnn” }}}, enabled_by: { type: "UniProtKB:nnn"}, ## describedBy: { reference: "PMID:123456", evidence: { type: "ECO:0000001", with: "XXXX" } (assume a blank node Serialization here)
12
Facts (OPAs) { id: “GOC:ann12345”, type: "GO:nnnn", ## MF has_input: “CHEBI:nnnn”, ## (same as c16) part_of: { type: "GO:nnnn" }, ## BP occurs_in: { type: "GO:nnnn”, ## CC part_of: { type: “CL:nnnnn”, part_of: { type: “UBERON:nnnn” }}}, enabled_by: { type: "UniProtKB:nnn"}, ## describedBy: { reference: "PMID:123456", evidence: { type: "ECO:0000001", with: "XXXX" } }, directly_activates: “GOC:ann9876”, }
13
Alternate way of tree-ifying facts { id: “GOC:ann12345”, type: "GO:nnnn", ## MF has_input: “CHEBI:nnnn”, ## (same as c16) hasFacts : [ {property: “part_of”, target: "GO:nnnn”}, {property: “directly_activates”, target: "GOC:ann9876”}, ] occurs_in: { type: "GO:nnnn”, ## CC part_of: { type: “CL:nnnnn”, part_of: { type: “UBERON:nnnn” }}}, enabled_by: { type: "UniProtKB:nnn"}, ## describedBy: { reference: "PMID:123456", evidence: { type: "ECO:0000001", with: "XXXX" } }, }
14
Alternate way of tree-ifying facts { id: “GOC:ann12345”, type: "GO:nnnn", ## MF has_input: “CHEBI:nnnn”, ## (same as c16) hasFacts : [ {property: “part_of”, target: "GO:nnnn”}, {property: “directly_activates”, target: "GOC:ann9876”}, ] hasTypes : [ { id: “GO:nnnn”}, { property: “enabled_by”, value: "UniProtKB:nnn"}, { property: “occurs_in”, value: { hasTypes: ["GO:nnnn”, …]} ], describedBy: { reference: "PMID:123456", evidence: { type: "ECO:0000001", with: "XXXX" } }, }
15
JSON-LD Schema: mapping to RDF { id: “GOC:ann12345”, type: "GO:nnnn", ## MF has_input: “CHEBI:nnnn”, ## (same as c16) part_of: { type: "GO:nnnn" }, ## BP occurs_in: { type: "GO:nnnn”, ## CC part_of: { type: “CL:nnnnn”, part_of: { type: “UBERON:nnnn” }}}, enabled_by: { type: "UniProtKB:nnn"}, ## describedBy: { reference: "PMID:123456", evidence: { type: "ECO:0000001", with: "XXXX" } }, directly_activates: “GOC:ann9876”, } { “GO”: http://purl.obolibrary.org/obo/GO_,http://purl.obolibrary.org/obo/GO_ “type”: “rdf:type”, “has_input”: “RO:0002233” “part_of”: “BFO:0000050”, “occurs_in”: “BFO:0000066”, }
16
JSON-LD Schema: mapping to RDF { id: “GOC:ann12345”, type: "GO:nnnn", ## MF has_input: “CHEBI:nnnn”, ## (same as c16) part_of: { type: "GO:nnnn" }, ## BP occurs_in: { type: "GO:nnnn”, ## CC part_of: { type: “CL:nnnnn”, part_of: { type: “UBERON:nnnn” }}}, enabled_by: { type: "UniProtKB:nnn"}, ## describedBy: { reference: "PMID:123456", evidence: { type: "ECO:0000001", with: "XXXX" } }, directly_activates: “GOC:ann9876”, } { “GO”: http://purl.obolibrary.org/obo/GO_,http://purl.obolibrary.org/obo/GO_ “type”: “rdf:type”, “has_input”: “RO:0002233” “part_of”: “BFO:0000050”, “occurs_in”: “BFO:0000066”, } iron ion transmembrane transporter activity enabled by fip1
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.