How to apply a license to knowledge graphs

How do you apply a license to a semantic web knowledge graph? I somewhat stumbled across this question during the process of registering the NFDI4BIOIMAGE Knowledge Graph with the NFDI KGI Registry. Amongst other data, the registry form requested the license, under which this KG is published.

Creative Commons Licenses on Wikidata

Ok, but how? The KGI registry’s preferred format is to state the corresponding Wikidata ID. E.g. the Creative Commons License CC-BY 4.0 International is wd:Q6905323. The following wikidata query returns a list of all International 4.0 CC Licenses:

[Read More]

Linked Open Data for Bioimaging – The NFDI4BIOIMAGE Knowledge Graph

This post describes the NFDI4BIOIMAGE Knowledge Graph (N4BIKG). Many aspects of this project are still very much in the flow including a consensus on which ontologies and terms to employ, how to define various namespaces and much more.

The N4BIKG is accessible through a SPARQO endpoint at https://kg.nfdi4bioimage.de/N4BIKG/sparql. The dataset is split into four named graphs:

PREFIX : <https://nfdi.fiz-karlsruhe.de/ontology#>
PREFIX n4bikg: <https://kg.nfdi4bioimage.de/n4bikg/>
PREFIX nfdicore: <https://nfdi.fiz-karlsruhe.de/ontology/>
PREFIX ome_core: <https://ld.openmicroscopy.org/core/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX t4fs: <http://purl.obolibrary.org/obo/T4FS_>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

select distinct ?graph where {
  graph ?graph {?s ?p ?o}
}
graph
https://kg.nfdi4bioimage.de/n4bikg/core
https://kg.nfdi4bioimage.de/n4bikg/n4bi_zenodo_community
https://kg.nfdi4bioimage.de/n4bikg/services
https://kg.nfdi4bioimage.de/n4bikg/owl

As a convenience, the default graph is the union of all named graphs.

[Read More]

Example queries against the Pseudomonas fluorescens SBW25 knowledge graph.

Introduction

In this post I will present example SPARQL queries against the Pseudomonas fluorescens SBW25 knowledge graph (SBW25KG). The knowlegde graph was derived from the manually created annotation in gff3 format, as explained in a previous post.

The queries are run against a local instance of the apache-jena-fuseki triplestore. First, I set the endpoint URL and the maximum number of returned records:

%endpoint http://micropop046:3030/plu/
%show 50
Endpoint set to: http://micropop046:3030/plu/
Result maximum size: 50

Retrieve 10 CDS’s from the SBW25KG.

In this first example, I query for CDS features, list their primary name, locus tag, and protein ID.

[Read More]

Turning a genome annotation into a RDF knowledge graph.

Introduction

In this article, I will describe the steps taken to generate a RDF (Resource Description Format) datastructure starting from a gff3 formatted genome annotation file. The annotation file in question is the new reference annotation for Pseudomonas fluorescens strain SBW25.

Required packages

I will make use of the following python packages:

  • gffutils to read the gff3 file into a sqlite database.
  • rdflib to construct the rdf graph.
  • requests to fetch data (e.g. ontology files)

All packages can be installed via conda from the conda-forge channel or pypi.

[Read More]