Last active
December 15, 2017 23:06
-
-
Save jhpoelen/27aff3b7236e25c21b4c2aa445f33d16 to your computer and use it in GitHub Desktop.
Elton nanopubs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Example of how to create trustry nanopubs from species interaction data using elton and nanopub-java | |
# | |
echo download elton tool... | |
curl -L "https://github.com/globalbioticinteractions/elton/releases/download/0.4.1/elton.jar" > elton.jar | |
echo download elton tool done. | |
# you can also use https://github.com/globalbioticinteractions/elton-archive to retrieve archived datasets from the internet archive | |
echo get bird diets ... | |
java -jar elton.jar update hurlbertlab/dietdatabase | |
echo get bird diets done. | |
echo export nanopubs... | |
java -jar elton.jar nanopubs hurlbertlab/dietdatabase | gzip > nanopubs.trig.gz | |
echo export nanopubs done. | |
# print first 5 nanopubs - one nanopub per line | |
zcat nanopubs.trig.gz | head -n 5 | |
echo get nanopub-java tool... | |
curl -L "https://github.com/Nanopublication/nanopub-java/releases/download/nanopub-1.14/nanopub-1.14-jar-with-dependencies.jar" > np.jar | |
echo get nanopub-java tool done. | |
echo checking nanopubs... | |
java -jar np.jar check nanopubs.trig.gz | |
echo checking nanopubs done. | |
echo make trustry nanopubs... | |
java -jar np.jar mktrusty nanopubs.trig.gz | |
echo make trustry nanopubs done. | |
echo checking trustry nanopubs... | |
java -jar np.jar check trustry.nanopubs.trig.gz | |
echo checking trustry nanopubs done. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment