-
Notifications
You must be signed in to change notification settings - Fork 36
conversion:NamedGraph
Tim L edited this page Jun 1, 2013
·
6 revisions
Note that conversion:NamedGraph is distinct from sd:NamedGraph. If you're trying to model named graphs, use sd:NamedGraphs. conversion:NamedGraph is only used within the context of specifying conversion results.
https://github.com/timrdf/csv2rdf4lod-automation/issues/331
tax_id,GeneID,GO_ID,Evidence,Qualifier,GO_term,PubMed,Category
9606,2,GO:0051056,TAS,-,regulation of small GTPase mediated signal transduction,-,Process
graph <http://purl.org/twc/lobd/source/ncbi-nlm-nih-gov/entrez_gene_go/2_in_GO:0051056#assertion> {
<http://bio2rdf/geneid:2> sio:is_part_of <http://purl.org/obo/go/GO_0051056>.
<http://purl.org/obo/go/GO_0051056> a <http://purl.org/obo/go/Process>.
}
graph <http://purl.org/twc/lobd/source/ncbi-nlm-nih-gov/entrez_gene_go/2_in_GO:0051056#supporting> {
<http://purl.org/twc/lobd/source/ncbi-nlm-nih-gov/entrez_gene_go/2_in_GO:0051056> sio:has-evidence
[a <http://purl.org/go/evidence/TAS>].
}
Without the new feature, we can get the same triples (shown below). We just need to work to get them into the correct graphs.
## To be #assertion
<http://bio2rdf/geneid:2> sio:is_part_of <http://purl.org/obo/go/GO_0051056> .
<http://purl.org/obo/go/GO_0051056>
dcterms:identifier "0051056" ;
a <http://purl.org/obo/go/Process> ;
rdfs:label "0051056" .
<http://purl.org/obo/go/Process> dcterms:identifier "Process" ;
rdfs:label "Process" .
## To be #supporting
<http://localhost/source/lebot/issue-331-target-ngs/2_in_GO:0051056>
sio:has-evidence <http://localhost/source/lebot/dataset/issue-331-target-ngs/version/2013-May-31/evidence/2>;
.
<http://localhost/source/lebot/dataset/issue-331-target-ngs/version/2013-May-31/evidence/2>
a <http://purl.org/go/evidence/TAS> .
<http://purl.org/go/evidence/TAS> dcterms:identifier "TAS" ;
rdfs:label "TAS" .
The new conversion:in_graph enhancement property points to an instance of conversion:NamedGraph, which has a conversion:name_template. The pattern is similar to the implicit conversion:bundled_by enhancement, where the columns point to an instance that is further described instead of just providing a direct value to be interpreted by the converter.
:assertion #### <--- A graph which can be inserted into
a conversion:NamedGraph;
conversion:name_template "[/s][d][#2]_in_GO:[#3]#assertion";
.
:supporting #### <--- A graph which can be inserted into
a conversion:NamedGraph;
conversion:name_template "[/s][d][#2]_in_GO:[#3]#supporting";
.
:evidence_bundle
a conversion:ImplicitBundle;
conversion:property_name sio:has-evidence;
conversion:name_template "[/sdv]evidence/[r]";
#conversion:type_name "http://purl.org/go/evidence/[#4]";
conversion:in_graph :supporting; #### <--- Bundle indicates which graph to assert into
.
...
conversion:enhance [
conversion:domain_template "[/s][d]/[#2]_in_GO:[#3]";
#conversion:domain_name "Thing";
];
...
conversion:enhance [
ov:csvCol 3;
ov:csvHeader "GO_ID";
conversion:bundled_by [ ov:csvCol 2 ];
conversion:equivalent_property sio:is_part_of;
conversion:interpret [
conversion:regex "^GO:";
conversion:interpretation "";
];
conversion:range_template "http://purl.org/obo/go/GO_[.]";
conversion:range <http://purl.org/obo/go/Process>;
conversion:in_graph :assertion; #### <--- Column indicates which graph to assert into
];
...
<http://localhost/source/lebot/issue-331-target-ngs/2_in_GO:0051056#supporting> {
<http://localhost/source/lebot/issue-331-target-ngs/2_in_GO:0051056>
sio:has-evidence <http://localhost/source/lebot/dataset/issue-331-target-ngs/version/2013-May-31/evidence/2> .
}
<http://localhost/source/lebot/issue-331-target-ngs/2_in_GO:0051056#supporting> {
<http://localhost/source/lebot/dataset/issue-331-target-ngs/version/2013-May-31/evidence/2>
a <http://purl.org/go/evidence/TAS> .
<http://purl.org/go/evidence/TAS> dcterms:identifier "TAS" ;
rdfs:label "TAS" .
}
<http://localhost/source/lebot/issue-331-target-ngs/2_in_GO:0051056#assertion> {
<http://bio2rdf/geneid:2> sio:is_part_of <http://purl.org/obo/go/GO_0051056> .
<http://purl.org/obo/go/GO_0051056>
dcterms:identifier "0051056" ;
a <http://purl.org/obo/go/Process> ;
rdfs:label "0051056" .
}
<http://localhost/source/lebot/issue-331-target-ngs/2_in_GO:0051056#assertion> {
<http://purl.org/obo/go/Process> dcterms:identifier "Process" ;
rdfs:label "Process" .
}