Instantly share code, notes, and snippets.


OpenBioDiv query to get specimens from MNRJ

Query by Viktor Senderov:

"In order to illustrate the capabilities of OpenBiodiv and draw attention to the impact of the tragically lost collection of the Museu Nacional de Rio de Janeiro (MNRJ), I can ask our system to give me the number of times a specimen from that collection was used in a taxonomic article, and in which ones."

See query at

View clements2017-2018.html
html, body{
#wrapper {
# Install autoconf, automake and libtool smoothly on Mac OS X.
# Newer versions of these libraries are available and may work better on OS X
# This script is originally from
export build=~/devtools # or wherever you'd like to build
curl -XDELETE 'localhost:9200/jsonld'
curl -XPOST 'localhost:9200/jsonld'
curl -XPUT 'localhost:9200/jsonld/doc/1' -d '
"dc": "",
View Multiple identifiers
== Handling multiple identifiers
Many objects of interest will have multiple identifiers, and each identifier may have different, complementary data associated with it.
One approach is to treat each identifier as a node, and link it to node for the corresponding object (essentially the object is treated as a bnode). We therefore refer to an object as "the object identifier by <identifier>". If we have correctly associated multiple identifiers with the same object, then we can link the two objects together.
When we have a link to create to another object, we use MERGE (id)-[]-(object) to ensure that id-object exists, then we link to it. In the example below we have a work with DOI 10.3897/phytokeys.44.7993, which cites PMID 21653447. First we create the work with DOI 10.3897/phytokeys.44.7993.
View query.txt
The Mediawiki API can be used to find qhat wikipedia pages link to BioStor, e.g.:
See for details.
Begin trees; [Treefile saved Thu Aug 20 21:42:14 2015]
>Data file = /Users/rpage/Sites/geojson-phylogeny-demo/bold-api/service/tmp/SAUPA642-10/SAUPA642-10.nex
>Neighbor-joining search settings:
> Ties (if encountered) will be broken systematically
> Distance measure = uncorrected ("p")
> (Tree is unrooted)
View Cricula.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View primers.txt
Reference COI is NC_003128 Buteo buteo COI
TZBRD035-15.COI-5P [648bp] ctgatctttggtgnatgagcaggcatagccggcacagcacttagcctactaatccgcgcagaactaggacagccaggaacactattgggagacgaccaaatctacaatgtaatcgtaacagcccacgctttcgtcataatcttcttcatagtcatacctattatgatcggaggcttcggaaactgactggttccactcataattggcgccccagacatagcattcccccgcataaataatatgagcttctgactcctcccaccttcttttctcctcctactagcctcctctacagtagaagccggggctggcactggatgaactgtttatccacccctagccggtaatcttgcccacgcgggcgcatcagtagacctggctattttttcccttcacttggcaggcgtgtcgtccatcttaggagctattaactttatcaccacaattattaacataaagccccctgcactatcacaatatcaaacacccctcttcgtatgatccgtcctcattactgctatcctcttactactatccctgccagtcctagccgccgggattacaatactcctcaccgatcgcaacctcaacactacattctttgaccctgcaggaggaggagacccaatcctgtatcaacacctattc
TZBRD019-15.COI-5P tcttcggcgcctgagctggtatagtcggcaccgccctcagcttactcatccgtgcagaactcggccaacccggcacactcctaggtgacgaccaaatttataacgtaatcgttaccgcacatgccttcgtaataatcttcttcatagttataccaatcatgatcggaggattcggaaactgacttgttccactcataattggcgctc
View index.html
<!DOCTYPE html>
<title>GBIF search</title>
<meta charset="utf-8" />