https://github.com/biodatafuse/elixir_biohackathon_2024
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.3%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: BioDataFuse
- License: mit
- Default Branch: main
- Size: 1.78 MB
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
elixirbiohackathon2024
Workflow to generate RDF-config files from any RDF graph
Requirements
- Docker
- Java
- Python3
- VoID generator release (https://github.com/JervenBolleman/void-generator/releases)
- RDF config (https://github.com/dbcls/rdf-config)
Check out the RDF Config Documentation directory for more details. To get the VoID generator and RDF-Config, you can run the bash script using `` command.
Steps
mermaid
graph TD
A [Go to `rdf_config` directory] --> |docker compose up -d| B[Start Virtuoso Triplestore and load dataset]
B --> C[Create SHACL Prefix Set and Upload to Virtuoso]
C --> |run *serve_rdf_config.sh* and go to 0.0.0.0:8000/sparql/test-rdf-config.html| D[Generate RDF Config Files by pointing to localhost:8899/sparql]
D --> |run *rdf-config --config . --senbero*| E[Retrieve tree]
D --> |run *rdf-config --config . --schema > schema.svg*| F[Retrieve svg diagram]
Start Virtuoso Triplestore (
docker compose up -d):
Ensure you're in the correct directory and execute this command to start Virtuoso.Access Virtuoso Conductor (
http://localhost:8899/):
Login at this address to manage the Virtuoso instance and go to theConductortab. Default credentials aredbawithCONDUCTOR_PASSWORD.Generate VoID file Generate the VoID file using the following commands: ```bash wget -P "void-generator" "https://github.com/JervenBolleman/void-generator/releases/download/v0.5/void-generator-0.5-uber.jar"
java -jar void-generator/void-generator-0.5-uber.jar \ --from-test-file=GRAPHPATH.ttl \ -i https://TTLPATH.example.org/.well-known/void \ -r https://TTLPATH.example.org/sparql \ -s VOIDFILE_NAME-void.ttl ```
Upload VoID RDF Data:
Use this interface to upload RDF graphs and manage namespaces. To do so, go to theLinked Datatab and click theQuad Store Upload. Upload the turtle file and add a custom IRI (eg. http://localhost:8899/sparql/).Allow CORS:
To allow Cross-Origin Resource Sharing (CORS), follow these instructions. We sumamrize some steps below:- Go to
Web Application Servertab and click onVirtual Domains & Directories - Click on the folder icon for the default web site
- In the expanded Interface, search for
/sparql - Edit the
Cross-Origin Resource Sharinginput to*and save the edit.
- Go to
Create the SHACL Prefixes file:
Create a preliminary.shaclfile that lists prefixes for all namespaces in the VoID file, as therdf-configgenerator depends on these prefixes to label nodes. This file serves as a very basic verison of SHACL file.
The graph for SHACL prefixes should look like the example below:
If you RDF graph is using the following prefixies:
ttl
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix clinvar: <http://purl.obolibrary.org/obo/pr#> .
@prefix sparql_service: <http://www.w3.org/ns/sparql-service-description#> .
The corresponding SHACL file would look as follows: ```ttl @prefix sh: http://www.w3.org/ns/shacl# . @prefix xsd: http://www.w3.org/2001/XMLSchema# .
[] sh:declare [
sh:prefix "sparql_service" ;
sh:namespace "http://www.w3.org/ns/sparql-service-description#"^^xsd:anyURI
] .
[] sh:declare [
sh:prefix "obo" ;
sh:namespace "<http://purl.obolibrary.org/obo"^^xsd:anyURI
] .
[] sh:declare [
sh:prefix "clinvar" ;
sh:namespace "http://purl.jp/bio/10/clinvar/"^^xsd:anyURI
] .
[] sh:declare [
sh:prefix "dcterms" ;
sh:namespace "http://purl.org/dc/terms/"^^xsd:anyURI
] .
```
Upload the SHACL Prefixes file to Virtuoso: Upload the SHACL file the same way as you did the graph file previously.
Run RDF-Config server
sh run.sh:
This script deploys a local RDF config tool interface accessible at your local port (Eg.http://0.0.0.0:8000/test-rdf-config.html), allowing you to generate RDF configuration files based on the Virtuoso SPARQL endpoint.Configure RDF Generator (SPARQL Endpoint):
In the RDF config tool (test-rdf-config.html), set the endpoint tohttp://localhost:8899/sparql/to generate the configuration files correctly.
Save the two outputs (model.yaml, prefixes.yaml) in the different yaml in the rdf-config directory.
- Retrieve Tree Structure:
Follow the following commands line-by-line to get the schema from RDF-Config.
bash
cd rdf-config
bundle install
bash
rdf-config --config . --senbero
to retrieve an ascii art schema, or
bash
rdf-config --config . --schema > schema.svg
for an svg diagram.
GitHub Events
Total
- Push event: 17
- Pull request review event: 3
- Pull request event: 15
- Fork event: 2
- Create event: 3
Last Year
- Push event: 17
- Pull request review event: 3
- Pull request event: 15
- Fork event: 2
- Create event: 3