Skip to content
hchiba1 edited this page Oct 1, 2017 · 10 revisions

Usage of SPANG

Basic options

Search triples by specifying the subject

spang uniprot -S tax:511145

Get abbreviated form using prefix definitions

spang uniprot -S tax:511145 -a

Get sorted results

spang uniprot -S tax:511145 -a | sort

Search by specifying the subject and predicate

spang uniprot -S tax:511145 -P up:otherName -a

Search by specifying the object

spang uniprot -O tax:511145 -a

Other options

Get the list of graphs

spang mbgd -G

Search from a specific graph and limit the output

spang mbgd -F mbgdr:uniprot-goa -L10

Count

spang mbgd -F mbgdr:uniprot-goa -N

Print the internally generated SPARQL query and quit

spang mbgd -F mbgdr:uniprot-goa -N -q

Make inference by specifying a rule set (only for Virtuoso)

spang mbgd -S tax:511145 -P rsfs:label -i ontologies -a

SPARQL library on the Web

spang mbgd mbgdl:get_ortholog K9Z723

User-defined settings

Users can additionally define user-defined settings as follows.

cd ~
mkdir .spang
vi .spang/endpoints
vi .spang/prefix
mkdir .spang/template
vi .spang/template/example.rq

User-defined settings overwrites the system-wide settings.

Aliases of endpoints

  • (system-wide settings) spang-*.*.*/etc/endpoints
  • (user-defined settings) ~/.spang/endpoints

Prefix declarations

  • (system-wide settings) spang-*.*.*/etc/prefix
  • (user-defined settings) ~/.spang/prefix

SPARQL library

  • (system-wide library) spang-*.*.*/etc/template/*
  • (user-defined library) ~/.spang/template/*
Clone this wiki locally