https://github.com/biodatafuse/elixir_biohackathon_2024

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
Last synced: 7 months ago · JSON representation

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
Created over 1 year ago · Last pushed over 1 year ago
Metadata Files
Readme License

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]

  1. Start Virtuoso Triplestore (docker compose up -d):
    Ensure you're in the correct directory and execute this command to start Virtuoso.

  2. Access Virtuoso Conductor (http://localhost:8899/):
    Login at this address to manage the Virtuoso instance and go to the Conductor tab. Default credentials are dba with CONDUCTOR_PASSWORD.

  3. 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 ```

  1. Upload VoID RDF Data:
    Use this interface to upload RDF graphs and manage namespaces. To do so, go to the Linked Data tab and click the Quad Store Upload. Upload the turtle file and add a custom IRI (eg. http://localhost:8899/sparql/).

  2. Allow CORS:
    To allow Cross-Origin Resource Sharing (CORS), follow these instructions. We sumamrize some steps below:

    • Go to Web Application Server tab and click on Virtual Domains & Directories
    • Click on the folder icon for the default web site
    • In the expanded Interface, search for /sparql
    • Edit the Cross-Origin Resource Sharing input to * and save the edit.
  3. Create the SHACL Prefixes file:
    Create a preliminary .shacl file that lists prefixes for all namespaces in the VoID file, as the rdf-config generator 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
] .
``` 
  1. Upload the SHACL Prefixes file to Virtuoso: Upload the SHACL file the same way as you did the graph file previously.

  2. 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.

  3. Configure RDF Generator (SPARQL Endpoint):
    In the RDF config tool (test-rdf-config.html), set the endpoint to http://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.

  1. 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