Publish Nanopublications
Publish Nanopublications using Nanobench.
#
Install the d2s toolSee the complete installation documentation to install pip, pipx and Docker using Chocolatey.
Then install the d2s tool using pipx or pip:
We recommend using pipx, but you can use
pip
orpip3
depending on your preferences.
You will not need the GraphDB installation file for this tutorial. So you can leave it blank when asked.
#
Start NanobenchWe will use the Nanobench web service to publish Nanopublications.
Access on http://localhost:37373
Alternatively Nanobench can be run directly using docker run
if d2s is not installed
#
Complete your profileFollow the instructions provided by the locally deployed Nanobench web UI to complete your profile, and publish your first nanopublication:
Provide your ORCID identifier. If you don't have one you can create an account at https://orcid.org.
You will then be prompted to create you
Keys for Digital Signatures
. Those keys are stored inworkspace/.nanopub/id_rsa
To finish, link your ORCID account to prove you are the rightful owner (follow the Nanobench web UI instructions)
- Keep the URL generated for your first nanopublication. It should starts with
http://purl.org/np/
- Keep the URL generated for your first nanopublication. It should starts with
#
Publish your first nanopublicationsFollow the tutorial from the locally deployed Nanobench web UI to publish your first nanopublications to the Maastricht University Institute of Data Science and and the official Nanopub servers!
Feel free to publish new nanopublications anytime you want ๐ข
#
Create a new templateWe will now create a new template to describe a dataset that has a publicly available SPARQL endpoint.
To create a new template we will need to use Nanopub-java to publish a Nanopublication from an arbitrary number of triples, instead of Nanobench.
#
Define the templateWe defined the template to let the user describe 4 properties:
- title
- description
- homepage
- SPARQL endpoint URL
Additionally the type dcat:Dataset
is used to describe the generated entity.
The template is defined in TRiG format (similar to Turtle):
Copy this template to a file named nanopub.trig
in the project root folder.
#
Publish the templateCopy the id_rsa
key file generated by Nanobench to your home
Sign the nanopub.trig
in the current folder using nanopub-java image from DockerHub:
It should generate a signed.nanopub.trig
, you can now publish it:
Our template can now be used at http://localhost:37373/publish?22&template=http://purl.org/np/RAVF_WDsJRkRXXWgaJx5p9EnjLIguIv0-GqDlbfBtBPcQ
See an example of a nanopub generated using this template to describe the Bio2RDF biomedical dataset: http://server.nanopubs.lod.labs.vu.nl/RAjqGxG3uPcnpa7RA1h-QiSnGZqRhnQNCboV4bl-Vj0m8
Feel free to add more datasets or create new templates!