From 0462173561b0467b4b9059f23df519a83f5e0eee Mon Sep 17 00:00:00 2001 From: Jerven Bolleman Date: Sun, 21 Feb 2016 11:03:04 +0900 Subject: [PATCH 1/3] #109 Start with making public stable URIs for the VG graph RDF concepts. For now I put them in the biohackathon.org namespace, but this needs to be discussed with all stakeholders. --- ontology/owl2xhtml.xsl | 863 +++++++++++++++++++++++++++++++++++++++++ ontology/vg.html | 568 +++++++++++++++++++++++++++ ontology/vg.ttl | 74 ++++ 3 files changed, 1505 insertions(+) create mode 100644 ontology/owl2xhtml.xsl create mode 100644 ontology/vg.html create mode 100644 ontology/vg.ttl diff --git a/ontology/owl2xhtml.xsl b/ontology/owl2xhtml.xsl new file mode 100644 index 00000000000..4eeeac5fe0d --- /dev/null +++ b/ontology/owl2xhtml.xsl @@ -0,0 +1,863 @@ + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + <xsl:value-of select="//owl:Ontology/rdfs:label" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+

+ Ontology description +

+
+ + + + +
+
+
+

+ Classes +

+
+ + + + + +
+
+
+

+ Properties +

+
+

Object properties

+ + + + + +

Datatype properties

+ + + + + +
+
+
+
+ + + + + +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + BLANK + + + + + + + + + + + + + +
+ + + + + + (rdf:type + + + + + ) + +
+
+ + + + + + + + + + + BLANK + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + BLANK + + + + (rdf:type + + + + + ) + +
+
+ + + + + + + rdf: + + + + + rdfs: + + + + + owl: + + + + + dc: + + + + + skos: + + + + + foaf: + + + + + core: + + + + + vg: + + + + + dcterms: + + + + + spin: + + + + + + + + + + + + + + + + + + + + + + owl: + + + rdf: + + + rdfs: + + + xsd: + + + foaf: + + + skos: + + + core: + + + vg: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + owl:hasKey consisting of (
+ + + + + +
and +
+
+
+ ) +
+ + + + + "" + @ + + + + + + ^^ + + + hasKey + + + + + + + + + owl:unionOf + + + + ( + + + + +
+
+ + + or
+
+
+
+ + + + + + + +
+
+ + + +
+
+ + + + +
or +
+
+
+
+ + + +
+
+ + +
or +
+
+
+
+ + + +
+
+ + + + +
or +
+
+
+
+
+ ) +
+ + owl:intersectionOf + + + + ( + + + + +
+
+ + + and
+
+
+
+ + + +
+
+ + + and
+
+
+
+ + + +
+
+ + + + + and
+
+
+
+
+ ) +
+
+
+ + +
+ + Restrict + + + + + + + to owl:someValuesFrom + + + + to owl:allValuesFrom + + + + to owl:cardinality + + + + + + to owl:maxCardinality + + + + + + to owl:minCardinality + + + + + + owl:onClass + + + + owl:onDataRange + + + + owl:onDatatype to + with a value of + + + at least + + + at most + + + + + to owl:maxQualifiedCardinality + + + + + + to owl:minQualifiedCardinality + + + + + + owl:HasValue + + + + +
+
+
diff --git a/ontology/vg.html b/ontology/vg.html new file mode 100644 index 00000000000..73a21e7fcdd --- /dev/null +++ b/ontology/vg.html @@ -0,0 +1,568 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+

+ Classes +

+
+ + + + + + + + + + + + +
+ vg:Node + (rdf:type + + owl:Class + ) + +
+ rdfs:comment + "A node in the variant graph, representing a sequence section." + + xsd:string +
+ rdfs:subClassOf + owl:Thing
+ + + + + + + + + + + + +
+ vg:Path + (rdf:type + + owl:Class + ) + +
+ rdfs:comment + "A Path is a collection of steps from path to path that represent an assembled sequence integrated into the variant grap." + + xsd:string +
+ rdfs:subClassOf + owl:Thing
+ + + + + + + + + + + + +
+ vg:Step + (rdf:type + + owl:Class + ) + +
+ rdfs:comment + "A step along a path in the variant graph. A series of steps along a path represent an assembled sequence that was originally inserted into the the variant graph. A step points to a :Node or the reverse complement of a node and has a rank (step number)." + + xsd:string +
+ rdfs:subClassOf + owl:Thing
+
+
+
+

+ Properties +

+
+

Object properties

+ + + + + + + + + + + + + + + + +
+ vg:linksForwardToForward + (rdf:type + + owl:ObjectProperty + ) + +
+ rdfs:comment + "This links a node from the forward (5' to 3') strand on the subject node to the forward (5' to 3') strand on the predicate node." + + xsd:string +
+ rdfs:domain + vg:Node
+ rdfs:range + vg:Node
+ + + + + + + + + + + + + + + + +
+ vg:linksForwardToReverse + (rdf:type + + owl:ObjectProperty + ) + +
+ rdfs:comment + "This links a node from the forward (5' to 3') strand on the subject node to the reverse (3' to 5') strand on the predicate node." + + xsd:string +
+ rdfs:domain + vg:Node
+ rdfs:range + vg:Node
+ + + + + + + + + + + + + + + + +
+ vg:linksReverseToForward + (rdf:type + + owl:ObjectProperty + ) + +
+ rdfs:comment + "This links a node from the reverse (3' to 5') strand on the subject node to the forward (5' to 3') strand on the predicate node." + + xsd:string +
+ rdfs:domain + vg:Node
+ rdfs:range + vg:Node
+ + + + + + + + + + + + + + + + +
+ vg:linksReverseToReverse + (rdf:type + + owl:ObjectProperty + ) + +
+ rdfs:comment + "This links a node from the reverse (3' to 5') strand on the subject node to the reverse (3' to 5') strand on the predicate node." + + xsd:string +
+ rdfs:domain + vg:Node
+ rdfs:range + vg:Node
+ + + + + + + + + + + + + + + + +
+ vg:node + (rdf:type + + owl:ObjectProperty + ) + +
+ rdfs:comment + "This means that this step occurs on the forward strand of the sequence attaced to the node (i.e. it is on the explicit encoded forward (5' to 3') strand) of the predicate node." + + xsd:string +
+ rdfs:domain + vg:Step
+ rdfs:range + vg:Step
+ + + + + + + + + + + + + + + + +
+ vg:reverseOfNode + (rdf:type + + owl:ObjectProperty + ) + +
+ rdfs:comment + "This means this step occurs on the revese complement of the sequence attaced to the node (i.e. it is on the implicit reverse (3' to 5') strand) of the predicate node." + + xsd:string +
+ rdfs:domain + vg:Step
+ rdfs:range + vg:Node
+

Datatype properties

+ + + + + + + + + + + + + + + + +
+ vg:rank + (rdf:type + + owl:DatatypeProperty + ) + +
+ rdfs:comment + "The rank records the step place along its path." + + xsd:string +
+ rdfs:domain + vg:Step
+ rdfs:range + xsd:positiveInteger
+
+
+
+
+ +
+ + + diff --git a/ontology/vg.ttl b/ontology/vg.ttl new file mode 100644 index 00000000000..29c7113a9bb --- /dev/null +++ b/ontology/vg.ttl @@ -0,0 +1,74 @@ +# baseURI: http://biohackathon.org/resource/vg + +@prefix : . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix spin: . +@prefix xsd: . + + + rdf:type owl:Ontology ; + ; + spin:imports ; + spin:imports ; + spin:imports ; + owl:versionInfo "Created at the DBCLS RDF Summit 2, Sendai Japan 20"^^xsd:string ; +. +:Node + rdf:type owl:Class ; + rdfs:comment "A node in the variant graph, representing a sequence section."^^xsd:string ; + rdfs:subClassOf owl:Thing ; +. +:Path + rdf:type owl:Class ; + rdfs:comment "A Path is a collection of steps from path to path that represent an assembled sequence integrated into the variant grap."^^xsd:string ; + rdfs:subClassOf owl:Thing ; +. +:Step + rdf:type owl:Class ; + rdfs:comment "A step along a path in the variant graph. A series of steps along a path represent an assembled sequence that was originally inserted into the the variant graph. A step points to a :Node or the reverse complement of a node and has a rank (step number)."^^xsd:string ; + rdfs:subClassOf owl:Thing ; +. +:linksForwardToForward + rdf:type owl:ObjectProperty ; + rdfs:comment "This links a node from the forward (5' to 3') strand on the subject node to the forward (5' to 3') strand on the predicate node."^^xsd:string ; + rdfs:domain :Node ; + rdfs:range :Node ; +. +:linksForwardToReverse + rdf:type owl:ObjectProperty ; + rdfs:comment "This links a node from the forward (5' to 3') strand on the subject node to the reverse (3' to 5') strand on the predicate node."^^xsd:string ; + rdfs:domain :Node ; + rdfs:range :Node ; +. +:linksReverseToForward + rdf:type owl:ObjectProperty ; + rdfs:comment "This links a node from the reverse (3' to 5') strand on the subject node to the forward (5' to 3') strand on the predicate node."^^xsd:string ; + rdfs:domain :Node ; + rdfs:range :Node ; +. +:linksReverseToReverse + rdf:type owl:ObjectProperty ; + rdfs:comment "This links a node from the reverse (3' to 5') strand on the subject node to the reverse (3' to 5') strand on the predicate node."^^xsd:string ; + rdfs:domain :Node ; + rdfs:range :Node ; +. +:node + rdf:type owl:ObjectProperty ; + rdfs:comment "This means that this step occurs on the forward strand of the sequence attaced to the node (i.e. it is on the explicit encoded forward (5' to 3') strand) of the predicate node."^^xsd:string ; + rdfs:domain :Step ; + rdfs:range :Step ; +. +:rank + rdf:type owl:DatatypeProperty ; + rdfs:comment "The rank records the step place along its path."^^xsd:string ; + rdfs:domain :Step ; + rdfs:range xsd:positiveInteger ; +. +:reverseOfNode + rdf:type owl:ObjectProperty ; + rdfs:comment "This means this step occurs on the revese complement of the sequence attaced to the node (i.e. it is on the implicit reverse (3' to 5') strand) of the predicate node."^^xsd:string ; + rdfs:domain :Step ; + rdfs:range :Node ; +. From 0e0bed34351e041b3ba908c3c96e9acf641d08d8 Mon Sep 17 00:00:00 2001 From: Jerven Bolleman Date: Sun, 21 Feb 2016 11:38:45 +0900 Subject: [PATCH 2/3] #109 add rdfs:label to all concepts --- ontology/vg.html | 128 ++++++++++++++++++++++++++++++++++++++++++++++- ontology/vg.ttl | 16 +++++- 2 files changed, 142 insertions(+), 2 deletions(-) diff --git a/ontology/vg.html b/ontology/vg.html index 73a21e7fcdd..fb25b33b0ce 100644 --- a/ontology/vg.html +++ b/ontology/vg.html @@ -239,6 +239,15 @@

+ + rdfs:label + + "Node" + + xsd:string + + + rdfs:subClassOf @@ -260,7 +269,16 @@

rdfs:comment - "A Path is a collection of steps from path to path that represent an assembled sequence integrated into the variant grap." + "A Path is a collection of steps from path to path that represent an asserdfs:labelmbled sequence integrated into the variant grap." + + xsd:string + + + + + rdfs:label + + "Path" xsd:string @@ -293,6 +311,15 @@

+ + rdfs:label + + "Step" + + xsd:string + + + rdfs:subClassOf @@ -334,6 +361,24 @@

Object properties

vg:Node
+ + rdfs:label + + "++" + + xsd:string + + + + + rdfs:label + + "linksForwardToForward" + + xsd:string + + + rdfs:range @@ -367,6 +412,24 @@

Object properties

vg:Node
+ + rdfs:label + + "+-" + + xsd:string + + + + + rdfs:label + + "linksForwardToReverse" + + xsd:string + + + rdfs:range @@ -400,6 +463,24 @@

Object properties

vg:Node
+ + rdfs:label + + "-+" + + xsd:string + + + + + rdfs:label + + "linksReverseToForward" + + xsd:string + + + rdfs:range @@ -433,6 +514,24 @@

Object properties

vg:Node
+ + rdfs:label + + "--" + + xsd:string + + + + + rdfs:label + + "linksReverseToReverse" + + xsd:string + + + rdfs:range @@ -466,6 +565,15 @@

Object properties

vg:Step
+ + rdfs:label + + "node" + + xsd:string + + + rdfs:range @@ -499,6 +607,15 @@

Object properties

vg:Step
+ + rdfs:label + + "reverseOfNode" + + xsd:string + + + rdfs:range @@ -533,6 +650,15 @@

Datatype properties

vg:Step
+ + rdfs:label + + "rank" + + xsd:string + + + rdfs:range diff --git a/ontology/vg.ttl b/ontology/vg.ttl index 29c7113a9bb..54a2b24bdc4 100644 --- a/ontology/vg.ttl +++ b/ontology/vg.ttl @@ -18,57 +18,71 @@ :Node rdf:type owl:Class ; rdfs:comment "A node in the variant graph, representing a sequence section."^^xsd:string ; + rdfs:label "Node"^^xsd:string ; rdfs:subClassOf owl:Thing ; . :Path rdf:type owl:Class ; - rdfs:comment "A Path is a collection of steps from path to path that represent an assembled sequence integrated into the variant grap."^^xsd:string ; + rdfs:comment "A Path is a collection of steps from path to path that represent an asserdfs:labelmbled sequence integrated into the variant grap."^^xsd:string ; + rdfs:label "Path"^^xsd:string ; rdfs:subClassOf owl:Thing ; . :Step rdf:type owl:Class ; rdfs:comment "A step along a path in the variant graph. A series of steps along a path represent an assembled sequence that was originally inserted into the the variant graph. A step points to a :Node or the reverse complement of a node and has a rank (step number)."^^xsd:string ; + rdfs:label "Step"^^xsd:string ; rdfs:subClassOf owl:Thing ; . :linksForwardToForward rdf:type owl:ObjectProperty ; rdfs:comment "This links a node from the forward (5' to 3') strand on the subject node to the forward (5' to 3') strand on the predicate node."^^xsd:string ; rdfs:domain :Node ; + rdfs:label "++"^^xsd:string ; + rdfs:label "linksForwardToForward"^^xsd:string ; rdfs:range :Node ; . :linksForwardToReverse rdf:type owl:ObjectProperty ; rdfs:comment "This links a node from the forward (5' to 3') strand on the subject node to the reverse (3' to 5') strand on the predicate node."^^xsd:string ; rdfs:domain :Node ; + rdfs:label "+-"^^xsd:string ; + rdfs:label "linksForwardToReverse"^^xsd:string ; rdfs:range :Node ; . :linksReverseToForward rdf:type owl:ObjectProperty ; rdfs:comment "This links a node from the reverse (3' to 5') strand on the subject node to the forward (5' to 3') strand on the predicate node."^^xsd:string ; rdfs:domain :Node ; + rdfs:label "-+"^^xsd:string ; + rdfs:label "linksReverseToForward"^^xsd:string ; rdfs:range :Node ; . :linksReverseToReverse rdf:type owl:ObjectProperty ; rdfs:comment "This links a node from the reverse (3' to 5') strand on the subject node to the reverse (3' to 5') strand on the predicate node."^^xsd:string ; rdfs:domain :Node ; + rdfs:label "--"^^xsd:string ; + rdfs:label "linksReverseToReverse"^^xsd:string ; rdfs:range :Node ; . :node rdf:type owl:ObjectProperty ; rdfs:comment "This means that this step occurs on the forward strand of the sequence attaced to the node (i.e. it is on the explicit encoded forward (5' to 3') strand) of the predicate node."^^xsd:string ; rdfs:domain :Step ; + rdfs:label "node"^^xsd:string ; rdfs:range :Step ; . :rank rdf:type owl:DatatypeProperty ; rdfs:comment "The rank records the step place along its path."^^xsd:string ; rdfs:domain :Step ; + rdfs:label "rank"^^xsd:string ; rdfs:range xsd:positiveInteger ; . :reverseOfNode rdf:type owl:ObjectProperty ; rdfs:comment "This means this step occurs on the revese complement of the sequence attaced to the node (i.e. it is on the implicit reverse (3' to 5') strand) of the predicate node."^^xsd:string ; rdfs:domain :Step ; + rdfs:label "reverseOfNode"^^xsd:string ; rdfs:range :Node ; . From 3f1a814c84060d2ee8c216ee54a17af1266c3350 Mon Sep 17 00:00:00 2001 From: Jerven Bolleman Date: Wed, 24 Feb 2016 17:17:02 +0900 Subject: [PATCH 3/3] Started documenting how to annotate the VG in RDF --- ontology/README.md | 53 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 ontology/README.md diff --git a/ontology/README.md b/ontology/README.md new file mode 100644 index 00000000000..325fd735494 --- /dev/null +++ b/ontology/README.md @@ -0,0 +1,53 @@ +# VG in RDF + +## Conceptual model + +Nodes, Paths and Steps, are the three core parts of any VG graph in RDF. +Node in the VG RDF corersponds directly to the Node concept in the VG protobuf serialization. +Paths are a series of steps that represent a sequence of Node visits that are conceptually a +biological sequence. +Steps are a way to easily find out the + + + +## Annotations on a VG + +Path are annotations on the graph, some paths represent a reference genome, others are the genome of a patient. +Yet some represent a gene, regulatory element or any other feature that we can annotate on any biological sequence. + +For example lets say we have a small VG graph: + +```turtle +node:100 a vg:Node ; vg:linksForwardToForward node:101 ; rdf:value "ACT" . +node:101 a vg:Node ; vg:linksForwardToForward node:102 : rdf:value "TGAAGT" . +node:102 a vg:Node ; vg:linksForwardToForward node:103 ; rdf:value "A" . +node:103 a vg:Node ; vg:linksForwardToForward node:104 ; rdf:value "TGA" + + +alternative_node:103 a vg:Node ; vg:linksForwardToForward node:104 ; rdf:value "A" +node:102 a vg:Node ; vg:linksForwardToForward alternative_node:103 . + + + +``` +In this example node:101 to node:104 are on the reference genome path. +They are also annotated to be a gene coding region. + +```turtle +@prefix ex: . + +my_example:some_gene a ex:Gene, SO:Gene, vg:Path . +my_example:some_gene_step_1 a vg:Step ; vg:rank 1;vg:node node:101 . +my_example:some_gene_step_2 a vg:Step ; vg:rank 2;vg:node node:102 . +my_example:some_gene_step_3 a vg:Step ; vg:rank 3;vg:node node:103 . +my_example:some_gene_step_4 a vg:Step ; vg:rank 4;vg:node node:104 . + +me:example:some_gene rdfs:seeAlso ENSEMBL:ESG00000XXXX . #and then pick up the annotation from the ENSEMBL gene build. + + +``` + + +## Linking a Genomic VG to a Protein VG + +