Skip to content

Commit

Permalink
add some doc
Browse files Browse the repository at this point in the history
  • Loading branch information
LoesvdBiggelaar committed Apr 18, 2024
1 parent 75661be commit 74a951d
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions docs/output/RDF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Output to RDF

In this section, we will learn how to use and implement the output to RDF using the `_RDFWriter` module.


## RDF settings

To write your output to RDF, you have to specify some RDF settings in the biocypher_config.yaml. Using `rdf_format`, you can choose to export to xml, turtle or any other format `rdflib` supports. The second configuration is the `rdf_namespaces` where you can specify which namespaces exist in your data. if e.g. your data contains SO (Sequence ontology) terms, like `SO:0000001`, it will convert the id to a working URI to allow referencing. So `SO:0000001` will be converted into `http://purl.obolibrary.org/obo/SO_0000001`.

```{code-block} yaml
:caption: biocypher_config.yaml
biocypher:
strict_mode: true
schema_config_path: config/schema_config.yaml
dbms: rdf
### RDF configuration ###
rdf:
rdf_format: turtle # choose: xml, n3, turtle, nt, pretty-xml, trix, trig, nquads, json-ld
rdf_namespaces:
so: http://purl.obolibrary.org/obo/SO_
efo: http://www.ebi.ac.uk/efo/EFO_
```

## Output
The `_RDFWriter` will create a file for every node and relationship type you have specified.

0 comments on commit 74a951d

Please sign in to comment.