<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Robin Richardson on Medium]]></title>
        <description><![CDATA[Stories by Robin Richardson on Medium]]></description>
        <link>https://medium.com/@r.richardson?source=rss-b70d8c4535f1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Robin Richardson on Medium</title>
            <link>https://medium.com/@r.richardson?source=rss-b70d8c4535f1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 22:39:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@r.richardson/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[(Nano)Publish your research with Python]]></title>
            <link>https://medium.com/escience-center/nano-publish-your-research-with-python-b81aa54eb1a2?source=rss-b70d8c4535f1------2</link>
            <guid isPermaLink="false">https://medium.com/p/b81aa54eb1a2</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[semanticweb]]></category>
            <category><![CDATA[fair]]></category>
            <category><![CDATA[nanopublications]]></category>
            <category><![CDATA[academic-publishing]]></category>
            <dc:creator><![CDATA[Robin Richardson]]></dc:creator>
            <pubDate>Tue, 16 Mar 2021 14:01:48 GMT</pubDate>
            <atom:updated>2021-05-31T09:21:24.135Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<h4>Using nanopub, a high-level, user-friendly python interface to the nanopublication network</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*LiE_8fxRUMEeCIwk0OteRQ.png" /><figcaption>Nanopublications encourage scientists to formally publish small units of information, assigning each a URI</figcaption></figure><p><em>By Robin Richardson and Sven van der Burg</em></p><p>Those familiar with the world of academic research will be equally familiar with the old maxim, <em>publish or perish</em>. Indeed, communicating the results of scientific research is arguably the most important function of a scientist. For academics, this almost always means traditional publishing in journals — lengthy and information-rich research articles written in a natural language such as English, with all the accompanying ambiguities and misunderstandings.</p><p>There are millions of papers published every year, which is far too many for a human to read or reason about. There also exist many scientific results that, despite being potentially useful to other researchers, are not yet sufficiently developed to warrant an entire research article. How do we formally communicate such findings such that they may be cited and credit attributed accordingly? One means of achieving this is to use ‘nanopublications’.</p><p>We wanted to unlock the power of this way of creating and preserving knowledge to Python users. Today, we proudly present to you the result of this desire: the nanopub Python library.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gFG_xavrHBGDSuq36bH4Ww.png" /><figcaption>The <a href="http://app.tkuhn.eculture.labs.vu.nl/nanopub-monitor/">nanopublication server network</a> presently covered by the nanopub library</figcaption></figure><h3>What are nanopublications?</h3><blockquote><em>Nanopublications are a formalized and machine-readable way of communicating the smallest possible units of publishable information.</em></blockquote><p>Here is an example nanopublication of an inter-species interaction observation between a bird and an insect (it can be found on the nanopub server <a href="http://purl.org/np/RAMzGwLotMRSQTHRCS15B6hvuYSyEupGnxZaFU3EmcItA">here</a>):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PRX16LU3HA0WxU_S_yxCWw.png" /><figcaption>A <a href="http://server.nanopubs.lod.labs.vu.nl/RAMzGwLotMRSQTHRCS15B6hvuYSyEupGnxZaFU3EmcItA">real nanopublication</a> in all its gory detail.</figcaption></figure><p>You need to speak some <a href="https://en.wikipedia.org/wiki/Resource_Description_Framework">RDF</a> in order to understand this, but if you squint a bit you can read that:</p><ul><li>The bird (<em>Picoides villosus</em>) <a href="http://purl.obolibrary.org/obo/RO_0002470">ate</a> a beetle (<em>Ips</em>). <strong>A</strong></li><li>This inter-species interaction <a href="http://purl.obolibrary.org/obo/BFO_0000066">took place</a> in <a href="http://www.ontobee.org/ontology/ENVO?iri=http://purl.obolibrary.org/obo/ENVO_01000240">conifer woodland</a> on the date of 1962–12–01. <strong>B&amp;C</strong></li><li>This observation came from a 1985 paper by Otvos &amp; Stark. <strong>D</strong></li><li>The information was extracted from the <a href="https://github.com/hurlbertlab/dietdatabase">dietdatabase</a>. <strong>E</strong></li></ul><p>The bold letters (<strong>A-E</strong>) correspond to the circles on the left side of the image above, indicating the location of these bits of information in the RDF.</p><h3>Anatomy of a nanopublication</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*V5vhg5e3xYVpWP0s.png" /><figcaption>A nanopublication consists of an ‘assertion’ (some kind of claim), the origin of that information, and who or what has published it. Find out more at find out more at <a href="http://nanopub.org/">nanopub.org</a> or see <a href="http://doi.org/10.3233/ISU-2010-0613">this paper</a>.</figcaption></figure><p>As can be seen in this image, a nanopublication has three basic elements:</p><ul><li>Assertion: The assertion is the main content of a nanopublication. This is generally some kind of scientific claim (an observation, result, interpretation of someone else’s result etc.)</li><li>Provenance: This part describes how the assertion above came to be.</li><li>Publication Info: This part contains metadata about the nanopublication as a whole, such as when and by whom it was created.</li></ul><h3>In what way are nanopublications machine-readable?</h3><p>Nanopublications are made up of <a href="https://en.wikipedia.org/wiki/Linked_data">Linked Data</a>: structured data which is interlinked with other data so it becomes more useful through semantic queries. In more concrete terms, you can think of this as a network of concepts like organisms, places and dates (nodes) and the relationship between them (edges). This formal structure allows computers to process it unambiguously in a way that natural languages such as English cannot be.</p><p>This allows for queries like:</p><ul><li>Which species of insects were observed to be on the menu of <em>Picoides villosus</em> (a type of bird)?</li><li>Give me all nanopublications which describe historic events happening between 50 BC and 40 BC which mention Cleopatra VII.</li></ul><p>Let’s now see what this might look like with our python library.</p><h3>How do I do that with python?</h3><p>The nanopub library provides a high-level, user-friendly python interface for searching, publishing and retracting nanopublications. The development repository can be found <a href="https://github.com/fair-workflows/nanopub">here</a> with detailed documentation <a href="https://nanopub.readthedocs.io/">here</a>. nanopub is available on the Python Package Index, so setup should be as simple as typing:</p><pre>pip install nanopub</pre><p>In your python script, you can then set up the nanopub client:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cc70419165200ea4f34701fdaddd72ca/href">https://medium.com/media/cc70419165200ea4f34701fdaddd72ca/href</a></iframe><p>The client carries out all searching, fetching, publishing, retraction etc of nanopublications from the servers.</p><p>For example, if you want to e.g. search for all nanopublications containing the text <em>Picoides</em>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8e329891e7499d16889229889f608533/href">https://medium.com/media/8e329891e7499d16889229889f608533/href</a></iframe><p>which returns two results both pointing to the example nanopublication we just discussed:</p><pre>{&#39;np&#39;: &#39;<a href="http://purl.org/np/RAMzGwLotMRSQTHRCS15B6hvuYSyEupGnxZaFU3EmcItA&#39;">http://purl.org/np/RAMzGwLotMRSQTHRCS15B6hvuYSyEupGnxZaFU3EmcItA&#39;</a>, &#39;description&#39;: &#39;Inter-species interaction of Picoides villosus with Ips&#39;, &#39;date&#39;: &#39;2020-12-24T10:51:43.931Z&#39;}<br>{&#39;np&#39;: &#39;<a href="http://purl.org/np/RAMzGwLotMRSQTHRCS15B6hvuYSyEupGnxZaFU3EmcItA&#39;">http://purl.org/np/RAMzGwLotMRSQTHRCS15B6hvuYSyEupGnxZaFU3EmcItA&#39;</a>, &#39;description&#39;: &#39;Picoides villosus&#39;, &#39;date&#39;: &#39;2020-12-24T10:51:43.931Z&#39;}</pre><p>You can then fetch a specific nanopublication directly using its URI:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fc43b90cdab0f0011360be04ccd9c93f/href">https://medium.com/media/fc43b90cdab0f0011360be04ccd9c93f/href</a></iframe><p>This snippet will fetch the nanopublication we discussed earlier, about the interaction of the bird and the beetle, and print the contents of its assertion. Of course, you are not limited to simple text searches. The library has several search methods, including finding nanopubs with a given triple pattern — you can find detailed documentation <a href="https://nanopub.readthedocs.io/en/latest/searching.html">here</a>.</p><h3>Hold on, I want to publish Nanopublications of my own!</h3><p>To publish to the nanopub server you need to set up your profile. This allows the nanopub server to identify you. Run the following interactive command (on the command line):</p><pre>setup_nanopub_profile</pre><p>It will add and store RSA keys to sign your nanopublications, publish a nanopublication with your name and ORCID iD to declare that you are using using these RSA keys, and store your ORCID iD to automatically add as author to the provenance of any nanopublication you will publish using this library.</p><p>You can then publish a quick claim:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/98eb11042e5abdd78bd02a43bb6be56d/href">https://medium.com/media/98eb11042e5abdd78bd02a43bb6be56d/href</a></iframe><pre>Published to <a href="http://purl.org/np/RA47eJP2UBJCWuJ324c6Qw0OwtCb8wCrprwSk39am7xck">http://purl.org/np/RA47eJP2UBJCWuJ324c6Qw0OwtCb8wCrprwSk39am7xck</a></pre><p>View the resulting nanopublication <a href="http://purl.org/np/RA47eJP2UBJCWuJ324c6Qw0OwtCb8wCrprwSk39am7xck">here</a>. Note that the URI of your nanopublication is a signed hash of its contents, making its authorship verifiable and enforcing its immutability — known as a <a href="https://doi.org/10.1007/978-3-319-07443-6_27">trusty URI</a>.</p><p>Or, to leverage the true power of semantic technologies, you can build your own RDF graph of triples and publish that:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bfaa7556826b18798a0e44344596039a/href">https://medium.com/media/bfaa7556826b18798a0e44344596039a/href</a></iframe><p>The above builds a graph containing a single triple that states (essentially) the concept pointed to by www.example.org/timbernersleeis of type Person. We use the <a href="https://github.com/RDFLib/rdflib">rdflib</a> library to build the graph, but this is already a dependency of nanopub. A Publication object is then created, using that graph as its assertion, and finally published using the NanopubClient as before. The code produces the following output:</p><pre>Published to <a href="http://purl.org/np/RAfk_zBYDerxd6ipfv8fAcQHEzgZcVylMTEkiLlMzsgwQ">http://purl.org/np/RAfk_zBYDerxd6ipfv8fAcQHEzgZcVylMTEkiLlMzsgwQ</a></pre><p>You can view the resulting nanopublication <a href="http://purl.org/np/RAfk_zBYDerxd6ipfv8fAcQHEzgZcVylMTEkiLlMzsgwQ">here</a>.</p><h3>Outlook</h3><p>nanopub makes interacting with nanopublications quite intuitive for those with sufficient RDF and python skills. For all others we foresee tools built around nanopub that make it intuitive for domain-experts (but not RDF-experts) to make use of the nanopublication network.</p><p>There are a couple of those already in the making:</p><ul><li><a href="https://github.com/nanotate-tool/nanotate">nanotate</a>: Create nanopublications from annotations in PDF-files made with <a href="https://web.hypothes.is/">hypothes.is</a></li><li><a href="https://github.com/fair-workflows/fairworkflows">fairworkflows</a>: Support the construction, manipulation and publishing of FAIR scientific workflows using semantic technologies. This is developed as part of the wider <a href="https://www.esciencecenter.nl/projects/fair-is-as-fair-does/">FAIR is as FAIR does</a> project at the eScience Center.</li></ul><h3>Conclusion</h3><p>The python nanopub library provides a high-level, user-friendly python interface for the nanopub server, making it easy to publish and search small scientific publications. We created this library to bring nanopublishing to python users and we’re keen to help people make use of it.</p><p>Consider how <a href="http://nanopub.org/wordpress/">nanopublications</a> might fit in with your field, and feel free to <a href="https://github.com/fair-workflows/nanopub">try the library out</a>!</p><h3>Acknowledgements</h3><p>The quality of this text was greatly improved by the suggestions of <a href="https://egpbos.medium.com/">Patrick Bos</a>, Tobias Kuhn, <a href="https://orcid.org/0000-0003-1711-7961">Arnold Kuzniar</a>, Lars Ridder, <a href="https://medium.com/@pab.rod">Pablo Rodríguez-Sánchez</a>, and <a href="https://medium.com/@s.verhoeven">Stefan Verhoeven</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b81aa54eb1a2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/escience-center/nano-publish-your-research-with-python-b81aa54eb1a2">(Nano)Publish your research with Python</a> was originally published in <a href="https://medium.com/escience-center">Netherlands eScience Center</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>