spang v2.7.5
SPANG
Website: http://purl.org/spang
npm: https://www.npmjs.com/package/spang
Docker: https://hub.docker.com/r/sparqling/spang
Command line interface
$ npm install -g spangA symbolic link to ./bin/spang.js will be created as spang2 in your path.
For the help message, just type the command
$ spang2Install from GitHub
git clone https://github.com/sparqling/spang
cd spang
npm ciOptional:
$ npm linkwill make a symbolic link to ./bin/* in your path.
Installation of node
spang2 requires node (version >= 14).
node -vIf you do not have node, install it as follows.
Linux
If you do not have npm, install it.
sudo apt -y install npmon Ubuntu, or
sudo yum -y install npmon CentOS.
The defualt directories for installation of npm modules are under /usr/local/, which requires sudo.
You can change the directories as follows.
npm set prefix ~/.npm-globalThe configuration is saved in ~/.npmrc, so you can also configure by editing it.
Install n to manage node version.
npm install -g n
n stable
node -vMac
If you do not have brew, install it.
brew -v/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Install node or nodebrew using brew.
brew install nodebrew install nodebrew
mkdir -p ~/.nodebrew/src
export PATH=$HOME/.nodebrew/current/bin:$PATHNow you can use node. Check the version.
node -vFor maintainers
js/spang.js should be updated after modifying codes for those who call spang functions through their Web applications.
Update the js/spang.js by converting codes using browserify as follows.
npm run browserifyRequirements
- npm (>= 6.12.0)
Test
npm testSPARQL specifications
Syntax
The EBNF notation of SPARQL is extracted from: https://www.w3.org/TR/sparql11-query/#sparqlGrammar
The PEG expression of SPARQL grammer was originally provided by: https://github.com/antoniogarrote/rdfstore-js/
PEG can be tested at: https://pegjs.org/online
Medadata
# @title Get orthololog from MBGD
# @author Hirokazu Chiba
# @tag ortholog
# @endpoint http://sparql.nibb.ac.jp/sparqlextension
# @prefixes https://
# @input_class id:Taxon
# @output_class up:Protein
# @param gene=