Simple SPARQL query interface based on the original idea of kurtjx/SNORQL and adapted from the fork eccenca/SNORQL
The purpose of this project is to develop a fully new UI implementation for Snorql that uses the latest web standards for HTML5, CSS3 and JQuery, and add new productivity features to facilitate query retrieval and sharing.
PlantMetWiki Live Instance: sparql-plantmetwiki.bioinformatics.nl
Local instance (Docker):
- Snorql UI: http://localhost:8089
- Virtuoso SPARQL endpoint: http://localhost:8890/sparql
Upstream Demo: Demo 1 | Demo 2
- Modern web UI built with HTML5, Bootstrap and JQuery.
- Responsive design with wonderful look on mobiles and tablets.
- Text editor CodeMirror for the SPARQL query with awesome features like SPARQL syntax highlighter, line numbering and bracket matching.
- SPARQL examples panel that can fetch SPARQL queries (.rq extension) from any GitHub repository on the fly and execute them against the SPARQL endpoint of your choice.
- Export query results into multiple file formats.
- Generate short URLs for your queries for easy sharing.
- No need for any backend programming language!! it is totally a front end application.
-
If you have the SPARQL queries directly inside the repo, then use the full the URL of the repo like the following:
-
But in case the SPARQL queries are inside a folder in the repository, then you need to provide a GitHub API URL for that folder and that is constructed as follows:
If the URL of the folder of the queries is this (for example):
https://github.com/egonw/SARS-CoV-2-Queries/tree/main/sparql
Then the URL template you should use is:
https://api.github.com/repos/{OWNER_USER}/{REPOSITORY_NAME}/contents/{FOLDER_PATH}
And the final URL becomes like this:
https://api.github.com/repos/egonw/SARS-CoV-2-Queries/contents/sparql
The examples panel fetches .rq files from GitHub repositories. Here's how to structure your repository:
- Use
.rqextension for SPARQL query files - Use descriptive filenames (spaces allowed):
Get all metabolites.rq - First line comment becomes the query description in the panel
Organize queries into folders by category:
sparql-queries/
├── Basic/
│ ├── List all classes.rq
│ └── Count triples.rq
├── Metabolites/
│ ├── Get all metabolites.rq
│ └── Metabolites by pathway.rq
└── Advanced/
└── Federated query example.rq
- Folders become expandable nodes in the examples panel
- Files appear as clickable query items
- Nested folders are fully supported
- Alphabetical ordering within each level
- PlantMetWiki: https://github.com/pathway-lod/SPARQLQueries
- WikiPathways: https://github.com/wikipathways/SPARQLQueries
- SARS-CoV-2: https://api.github.com/repos/egonw/SARS-CoV-2-Queries/contents/sparql
- if you want to get a URL for your query (automatically generated for example) without using the permanent link, then you can use the following JavaScript code:
// the SPARQL endpoint URL followed by the query variable 'q'
let endpoint = "https://sparql-plantmetwiki.bioinformatics.nl/?q=";
// The SPARQL query itself
let sparql = `SELECT DISTINCT ?dataset (str(?titleLit) as ?title) ?date ?license
WHERE {
?dataset a void:Linkset ;
dcterms:title ?titleLit .
OPTIONAL {
?dataset dcterms:license ?license ;
pav:createdOn ?date .
}
}`;
// create the URL from the endpoint URL and the URI-encoded query string
let encodedQueryUrl = endpoint + encodeURI(sparql);
// now, encodedQueryUrl can be used for your own purpose- Clone the repository
- Edit
assets/js/snorql.jsand set:_endpoint- Your SPARQL endpoint URL_examples_repo- GitHub repo with .rq example files
- Open
index.htmlin a browser or serve via any HTTP server
- Copy the example configuration files:
cp docker-compose.example.yml docker-compose.yml cp .env.example .env
- Edit
.envwith your settings (or editdocker-compose.ymldirectly) - Start the services:
docker compose up -d
- Access the UI at http://localhost:8088 (or whichever port you set as
SNORQL_PORTin.env)
The easiest way to configure Snorql-UI is with a .env file. This file serves as the single source of truth for both Docker Compose and shell scripts.
# Copy the template
cp .env.example .env
# Edit with your settings
nano .env
# Verify configuration
docker compose config
# Start services
docker compose up -dThe .env file is gitignored, so your local configuration won't be committed.
How configuration flows:
.env (single source of truth)
│
├── Docker Compose (reads .env automatically)
│ └── Container environment variables
│ └── script.sh (configures Snorql-UI at startup)
│
└── Shell scripts (via scripts/config.sh)
└── enable-cors.sh, load-rdf-example.sh, etc.
Shell scripts in scripts/ source config.sh, which automatically loads your .env file. This means you only need to edit .env once - both Docker Compose and shell scripts will use the same values.
All variables can be set in .env, exported in your shell, or hardcoded in docker-compose.yml.
Snorql-UI Settings:
| Variable | Default | Description |
|---|---|---|
SNORQL_CONTAINER |
my-snorql |
Docker container name |
SNORQL_PORT |
8088 |
HTTP port for web interface |
SNORQL_ENDPOINT |
http://localhost:8890/sparql |
SPARQL endpoint URL (as seen from browser) |
SNORQL_EXAMPLES_REPO |
- | GitHub repo with .rq example files |
SNORQL_TITLE |
My SPARQL Explorer |
Browser tab title |
DEFAULT_GRAPH |
(empty) | Default RDF graph |
Virtuoso Settings:
| Variable | Default | Description |
|---|---|---|
VIRTUOSO_CONTAINER |
my-virtuoso |
Docker container name |
VIRTUOSO_HOST |
localhost |
Hostname for external connections |
VIRTUOSO_HTTP_PORT |
8890 |
HTTP/SPARQL endpoint port |
VIRTUOSO_ISQL_PORT |
1111 |
ISQL port for data loading |
VIRTUOSO_USER |
dba |
Database admin username |
VIRTUOSO_PASSWORD |
dba123 |
Database admin password |
SPARQL_UPDATE |
false |
Allow SPARQL UPDATE queries |
CORS_ORIGINS |
* |
CORS allowed origins |
You can override the SPARQL endpoint via URL parameter:
http://localhost:8088/?endpoint=http://other-endpoint/sparql
This is useful for linking to the UI with a specific endpoint pre-configured.
# Start services in background
docker-compose up -d
# Stop services
docker-compose down
# View logs
docker-compose logs -f
# View logs for specific service
docker-compose logs -f snorql
# Rebuild after code changes
docker-compose up -d --build| Port | Service |
|---|---|
| 8088 | Snorql-UI web interface |
| 8890 | Virtuoso HTTP/SPARQL endpoint |
| 1111 | Virtuoso ISQL (for data loading) |
To persist Virtuoso data between container restarts, uncomment the volumes section in docker-compose.yml:
virtuoso:
volumes:
- ./virtuoso-data:/databaseCreate the directory first: mkdir virtuoso-data
Use this procedure whenever a new RDF release is published on Zenodo (concept DOI 10.5281/zenodo.17967619).
The download script skips files that already exist, so old versioned files must be deleted first. Static files that do not change between releases (mibig.ttl, plantismash.ttl, ncbitaxon*.owl) can be left in place.
rm db/data/all-plantcyc*.ttl
rm db/data/all_gpml_taxonomy_extra-plantcyc*.ttl
rm db/data/all_gpml_properties_extra-plantcyc*.ttl
rm db/data/void-plantcyc*.ttlThe script resolves the concept DOI to the latest published record automatically. Use --skip-bgc to leave the BGC crosslink files untouched.
python scripts/download-plantmetwiki-data.py --skip-bgcFiles are written to db/data/. The script prints the Zenodo version and lists everything it downloaded.
--clear drops all existing PlantMetWiki named graphs before loading, so no triples from the previous release survive.
bash scripts/load-plantmetwiki-data.sh --clearbash scripts/load-plantmetwiki-data.sh --checkThis prints triple counts per named graph. Check that the numbers are plausible (core pathway graph graph/pathways should be a few million triples, and only one release should be present).
bash scripts/load-graphs/create-vocabularies-void.shSee Vocabularies below.
load-plantmetwiki-data.sh also runs scripts/load-graphs/load-vocabularies.sh (disable with LOAD_VOCABULARIES=false). It loads the WikiPathways wp:/gpml: vocabularies, the VoID vocabulary and the PlantMetWiki vocabulary (vocab/pmw.ttl) into graph/vocabularies, so the classes used in the data have rdfs:labels. It can be run on its own at any time.
After (re)loading the vocabularies, describe the graph in the VoID so /.well-known/void stays complete:
bash scripts/load-graphs/create-vocabularies-void.shIt reads the triple count and the pmw: version from Virtuoso, writes db/data/void-vocabularies.ttl, and then runs scripts/reload-void.sh (clears and reloads graph/void from every db/data/void-*.ttl and republishes /.well-known/void). Use --no-load to only write the file. See Generate VoID metadata for the vocabularies graph for what it records.
- The merged VoID is published at
/.well-known/void(served astext/turtle) by the load scripts;bash scripts/reload-void.shrepublishes it. - Resource IRIs under
http://rdf-plantmetwiki.bioinformatics.nl/(/pathways/,/Pathway/,/id/,/dataset/,/vocab/, …) are dereferenceable:httpd-proxy.confanswers RDF requests (Accept: text/turtle,application/rdf+xml,application/n-triples) with the resource's triples from Virtuoso, and redirects browsers to the explorer with a query for the resource filled in. - The PlantMetWiki vocabulary (
vocab/pmw.ttl) is served as Turtle at its namespace URI,/vocab/.
| Change | File | What to Modify |
|---|---|---|
| SPARQL endpoint | assets/js/snorql.js |
_endpoint variable |
| Examples repo | assets/js/snorql.js |
_examples_repo variable |
| Page title | index.html |
<title> tag |
| Logo | assets/images/ |
Replace logo files |
| Footer | index.html |
Edit footer section |
| Namespaces | assets/js/namespaces.js |
snorql_namespacePrefixes object |
| Bitly token | assets/js/script.js |
accessToken (line 180) |
To customize branding:
- Replace logo images in
assets/images/ - Edit the footer section in
index.html - Update the page title in
index.html
The default logo is WikiPathways-branded. For your own deployment:
- Create a logo image (recommended: 200x50 pixels, PNG format)
- Replace
assets/images/wikipathways-snorql-logo.pngwith your logo - Or update
index.htmlline 40 to reference a different logo file
For Docker deployments, mount your custom logo:
volumes:
- ./my-logo.png:/usr/share/nginx/html/assets/images/wikipathways-snorql-logo.pngIf using the included Virtuoso container, you can load RDF data using the example script:
# See scripts/load-rdf-example.sh for detailed instructions
./scripts/load-rdf-example.shBasic Virtuoso data loading via isql:
# Connect to Virtuoso container
docker exec -it my-virtuoso isql 1111 dba dba123
# Load data from URL
SPARQL LOAD <http://example.org/data.ttl> INTO GRAPH <http://example.org/graph>;
checkpoint;
quit;For browser-based SPARQL queries to work, CORS (Cross-Origin Resource Sharing) must be enabled on Virtuoso's /sparql endpoint. Without CORS, browsers block requests from web pages (e.g., Snorql-UI at localhost:8088) to different origins (e.g., Virtuoso at localhost:8890).
After starting Virtuoso, run the CORS configuration script:
./scripts/enable-cors.shFor production, restrict CORS to your specific domain:
CORS_ORIGINS="http://yourdomain.com" ./scripts/enable-cors.shThe script supports these environment variables:
| Variable | Default | Description |
|---|---|---|
VIRTUOSO_CONTAINER |
my-virtuoso |
Docker container name |
VIRTUOSO_ISQL_PORT |
1111 |
ISQL connection port |
VIRTUOSO_USER |
dba |
Database username |
VIRTUOSO_PASSWORD |
dba123 |
Database password |
CORS_ORIGINS |
* |
Allowed origins (* = all) |
For persistent configuration, set variables in your .env file. Shell scripts automatically read this file via scripts/config.sh.
Test CORS from your browser console:
fetch('http://localhost:8890/sparql?query=SELECT+*+WHERE+{?s+?p+?o}+LIMIT+1')
.then(r => r.text())
.then(console.log)If CORS is working, you'll see SPARQL results. If not, you'll see a CORS error.
This section guides you through setting up Snorql-UI with your own RDF data and SPARQL endpoint.
your-project/
├── db/ # Virtuoso database files
│ └── data/
│ ├── load.sh # Your customized loader script
│ └── YourData.ttl # Your RDF data file(s)
├── scripts/
│ ├── load.sh.template # Template (don't modify)
│ └── your-loader.sh # Optional: automated data fetching
├── docker-compose.yml # Your configuration
├── assets/ # Snorql UI assets
├── index.html # Snorql UI entry point
└── ...
- Copy the example configuration files:
cp docker-compose.example.yml docker-compose.yml
cp .env.example .env- Create data directory and loader script:
mkdir -p db/data
cp scripts/load.sh.template db/data/load.sh
chmod +x db/data/load.sh-
Customize the loader script (
db/data/load.sh):- Set
GRAPH_URIto your named graph (e.g.,http://yourdomain.org/data/) - Set
DATA_FILEto your RDF file name - Add your domain-specific namespace prefixes
- Set
-
Place your RDF data files in
db/data/:- Supported formats: Turtle (
.ttl), RDF/XML (.rdf), N-Triples (.nt)
- Supported formats: Turtle (
-
Configure
.envwith your settings:SNORQL_ENDPOINT- Your SPARQL endpoint URLSNORQL_EXAMPLES_REPO- Your GitHub queries repositorySNORQL_TITLE- Browser tab titleVIRTUOSO_PASSWORD- Secure password for production
-
Start the services:
docker compose up -d
Check if your docker
docker ps -a | grep plantmetwiki -
Load your data into Virtuoso:
docker exec -it my-virtuoso /bin/bash cd /database/data ./load.sh load.log dba123 exit
-
Access the UI at http://localhost:8090
- Graph URI in
db/data/load.sh- Your named graph identifier - Namespace prefixes in
db/data/load.sh- Add your domain-specific prefixes - SNORQL_ENDPOINT in
.env- Your SPARQL endpoint URL - SNORQL_EXAMPLES_REPO in
.env- Your GitHub queries repository - SNORQL_TITLE in
.env- Browser tab title - VIRTUOSO_PASSWORD in
.env- Secure password for production - Optional:
assets/js/namespaces.js- For UI prefix expansion in results
# 1. Clone repository
git clone https://github.com/wikipathways/Snorql-UI.git my-sparql-ui
cd my-sparql-ui
# 2. Set up configuration
cp docker-compose.example.yml docker-compose.yml
cp .env.example .env
mkdir -p db/data
cp scripts/load.sh.template db/data/load.sh
# 3. Edit db/data/load.sh
# Change: GRAPH_URI="http://myproject.org/data/"
# Change: DATA_FILE="mydata.ttl"
# Add your namespace prefixes
# 4. Copy your data file
cp /path/to/mydata.ttl db/data/
# 5. Edit .env
# Change: SNORQL_ENDPOINT=http://localhost:8890/sparql
# Change: SNORQL_EXAMPLES_REPO=https://github.com/myorg/sparql-queries
# Change: SNORQL_TITLE=My SPARQL Explorer
# 6. Start and load
docker compose up -d
docker exec -it plantmetwiki-virtuoso /bin/bash -c "cd /db/scripts && ./load.sh load.log plantmetwikipw"
# For stopping the services
docker compose down
# You need to enable CORS ones you have built
./scripts/enable-cors.sh
# 7. Access at http://localhost:8011For automated/scheduled data updates, use scripts/data-loader.sh as a template. This script includes:
- Download verification - Checks each file download succeeds
- Turtle validation - Uses
rapperto validate RDF syntax before loading - Load verification - Confirms all files reached
ll_state = 2(success) - Dry-run mode - Validate without loading (
--dry-run)
# Configure for your data source
export DATA_SOURCE="http://your-data-server.org/rdf"
export DATA_FILES="mydata.ttl vocabulary.ttl"
export VIRTUOSO_CONTAINER="my-virtuoso"
export VIRTUOSO_PASSWORD="dba123"
export GRAPH_URI="http://example.org/graph/"
# Run the loader
./scripts/data-loader.sh
# Or validate only (dry run)
./scripts/data-loader.sh --dry-runEdit the script's CONFIGURATION section to set defaults for your deployment, then schedule with cron for automatic updates.
- Multiple data files: Add multiple
ld_dir()commands inload.shor use wildcards - Turtle validation: Install
raptor2-utils(sudo apt-get install raptor2-utils) for syntax validation - Federated queries: The template includes grants for SPARQL federation (SERVICE keyword)
- Namespace prefixes: Also update
assets/js/namespaces.jsso URIs display as compact QNames in the UI
A complete local stack — Snorql-UI served from your machine, with a local Virtuoso loaded with the latest PlantMetWiki RDF — is provided through three scripts in scripts/:
scripts/download-plantmetwiki-data.py # fetch latest TTLs from Zenodo
scripts/load-plantmetwiki-data.sh # bulk-load TTLs into local Virtuoso
scripts/local-dev.sh # serve the UI without Docker
Copy .env.example to .env and verify the variables match your local setup. The defaults work out of the box:
cp .env.example .envKey values for local development:
SNORQL_ENDPOINT=http://localhost:8890/sparql # local Virtuoso
SNORQL_EXAMPLES_REPO=https://github.com/pathway-lod/SPARQLQueries
VIRTUOSO_HTTP_PORT=8890
SNORQL_PORT=8088
docker compose up -d virtuosoThis pulls openlink/virtuoso-opensource-7:7.2.11 and mounts ./db as /database inside the container (so the database persists across restarts).
python scripts/download-plantmetwiki-data.pyThe script resolves two Zenodo concept DOIs and downloads to db/data/:
| Source | Concept DOI | Files |
|---|---|---|
Pathway RDF (gpml-to-rdf) |
10.5281/zenodo.17967619 |
all-*.ttl.gz, all_gpml_taxonomy_extra-*.ttl.gz, all_gpml_properties_extra-*.ttl.gz, void-*.ttl |
BGC crosslink RDF (map-to-rdf) |
GitHub release bgc-v1.0 |
plantismash.ttl, mibig.ttl, void-bgc.ttl |
.gz files are decompressed automatically; existing files in db/data/ are skipped.
bash scripts/load-plantmetwiki-data.shThe script copies each TTL to /tmp inside the container (always allowed by Virtuoso's DirsAllowed), runs ld_dir() + rdf_loader_run(), then prints a graph summary. Loading order goes small-to-large so the 300 MB core bundle is loaded last.
Named graphs created:
| TTL file | Named graph |
|---|---|
all-*.ttl |
http://rdf-plantmetwiki.bioinformatics.nl/graph/pathways |
all_gpml_taxonomy_extra-*.ttl |
…/graph/gpml-taxonomy-extra |
all_gpml_properties_extra-*.ttl |
…/graph/gpml-properties-extra |
ncbi_iri_mappings-*.ttl |
…/graph/ncbi-iri-mappings |
plantismash.ttl |
…/graph/bgc-plantismash |
mibig.ttl |
…/graph/bgc-mibig |
void-*.ttl (both) |
…/void |
Flags:
--clear— drop all graphs before loading (use when re-loading a fresh build)--check— just print current graph triple counts
set -a; source .env; set +a
bash scripts/enable-cors.shThis is mandatory: without CORS, the browser blocks SPARQL requests from localhost:8088 to localhost:8890. The default config (CORS_ORIGINS=*) accepts requests from any origin — fine for local dev, restrict in production.
bash scripts/local-dev.sh
# or with a custom port:
bash scripts/local-dev.sh 3000The script:
- Reads
.envand applies the samesedsubstitutions thatscript.shdoes inside the Docker image (no Docker rebuild needed) - Creates a temp working copy with the injected configuration
- Serves the static files via
python3 -m http.server
Then open http://localhost:8088/ — the UI is pointing to your local Virtuoso. The first time you query you'll see the loaded graphs in the namespaces drop-down.
The .env file documents two options. To test against the production endpoint without local data, comment out the local URL and uncomment the production one:
- SNORQL_ENDPOINT=http://localhost:8890/sparql
+ SNORQL_ENDPOINT=https://sparql-plantmetwiki.bioinformatics.nl/sparqlRestart local-dev.sh to pick up the change.
When gpml-to-rdf or map-to-rdf publishes a new Zenodo version:
rm db/data/*.ttl # clear old files
python scripts/download-plantmetwiki-data.py # fetch latest
bash scripts/load-plantmetwiki-data.sh --clear # rebuild graphs in VirtuosoTo resolve NCBI Taxonomy URIs (NCBITaxon_<id>) locally — for label lookups and reasoning without a federated query to BioPortal — load the OBO Foundry release of NCBITaxon into a dedicated graph.
We use OBO Foundry rather than BioPortal because the OBO version is CC0 (public domain), while BioPortal mirrors are not freely redistributable.
This option extracts only the taxa actually present in the PlantMetWiki taxonomy-extra graph plus their complete ancestor lineages using ROBOT's MIREOT method. The result is ~1.4 MB / 17,707 triples instead of the 1.8 GB full release.
Prerequisite: download robot.jar from the ROBOT releases page and place it at db/robot.jar (gitignored). Java 11+ is required (the conda plantmetwiki-rdf environment provides this).
# Download robot.jar (one-time setup):
curl -L -o db/robot.jar https://github.com/ontodev/robot/releases/download/v1.9.6/robot.jar
# Extract subset and load into Virtuoso:
bash scripts/load-graphs/load-ncbitaxon.sh --subset plantmetwikiThe script automatically uses db/robot.jar if present, falling back to the obolibrary/robot Docker image only if the JAR is not found. Override with ROBOT_JAR=/path/to/robot.jar or ROBOT_HEAP=4g if needed.
Note: The Docker fallback can fail with out-of-memory errors when Virtuoso is also running, because Docker's memory cap may be insufficient for the ROBOT JVM. The local JAR approach uses system RAM and is more reliable.
# Full release (~1.8 GB, 21.7 M triples — full label and hierarchy coverage):
bash scripts/load-graphs/load-ncbitaxon.sh
# OBO slim subset (~38 MB — labels for major taxa only):
bash scripts/load-graphs/load-ncbitaxon.sh --subset taxslim
bash scripts/load-graphs/load-ncbitaxon.sh --subset taxslim-disjoint
# Check what's currently loaded:
bash scripts/load-graphs/load-ncbitaxon.sh --checkOr load NCBITaxon together with the rest of the data:
LOAD_NCBITAXON=true bash scripts/load-plantmetwiki-data.sh
LOAD_NCBITAXON=true NCBITAXON_SUBSET=plantmetwiki bash scripts/load-plantmetwiki-data.shThe ontology is loaded into:
http://rdf-plantmetwiki.bioinformatics.nl/graph/ncbitaxon
After loading, generate machine-readable provenance (VoID + PROV-O) that records the triple count, ontology version, subset method, and ROBOT tooling:
bash scripts/load-graphs/create-ncbitaxon-void.shThis writes db/data/void-ncbitaxon.ttl and loads it into the graph/void named graph. Re-run whenever the NCBITaxon graph is reloaded. The TTL records:
dcterms:source/dcterms:references→ OBO Foundryncbitaxon.owlvoid:vocabulary→ NCBITaxon IRI namespace (purl.obolibrary.org/obo/NCBITaxon_)owl:versionIRI→ the loaded release date (e.g.2026-05-13)void:triples→ live count queried from Virtuosoprov:wasGeneratedBy→ ROBOT MIREOT activity withprov:usedsource ontology
The vocabularies graph gets the same treatment, so every named graph on the endpoint has a machine-readable provenance record:
bash scripts/load-graphs/create-vocabularies-void.shThis writes db/data/void-vocabularies.ttl and then runs scripts/reload-void.sh, which clears and
reloads the graph/void named graph from every db/data/void-*.ttl and republishes /.well-known/void.
Run it after load-vocabularies.sh (it reads the live triple count and pmw: version), and re-run
whenever load-vocabularies.sh is re-run. The TTL records:
dcterms:source→ the four inputs:wp.owl,gpml.owl, the VoID vocabulary, andvocab/pmw.ttlvoid:vocabulary→ thewp:,gpml:,void:andpmw:namespacesowl:versionInfo→ thepmw:vocabulary version, queried live from the graphvoid:triples→ live count queried from Virtuosodcat:byteSize→ size ofvocab/pmw.ttlprov:wasGeneratedBy→load-vocabularies.shactivity withprov:usedon all four inputs
Label lookup:
PREFIX ncbi: <http://purl.obolibrary.org/obo/NCBITaxon_>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?label WHERE {
GRAPH <http://rdf-plantmetwiki.bioinformatics.nl/graph/ncbitaxon> {
ncbi:33090 rdfs:label ?label .
}
}Cross-graph join (pathway taxa → NCBI labels):
PREFIX wp: <http://vocabularies.wikipathways.org/wp#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?taxon ?label (COUNT(DISTINCT ?pwy) AS ?n)
WHERE {
GRAPH <http://rdf-plantmetwiki.bioinformatics.nl/graph/gpml-taxonomy-extra> {
?pwy wp:organism ?taxon .
}
GRAPH <http://rdf-plantmetwiki.bioinformatics.nl/graph/ncbitaxon> {
?taxon rdfs:label ?label .
}
}
GROUP BY ?taxon ?label
ORDER BY DESC(?n)| Variant | Triples | Size | Recommended for |
|---|---|---|---|
plantmetwiki ⭐ |
~17,700 | ~1.4 MB | PlantMetWiki — only taxa in the dataset + ancestors |
taxslim |
~500 K | ~38 MB | Local dev — labels for major taxa |
taxslim-disjoint |
~500 K + axioms | ~38 MB | Reasoning experiments |
full |
~21.7 M | ~1.8 GB | Full label and hierarchy coverage |
The older container-rebuild flow is still present:
./plantmetwiki-rebuild.sh # rebuilds the Snorql Docker image
./plantmetwiki-upload-data.sh # loads data using the old loaderThe script-based workflow above is recommended for development because it avoids rebuilding the container on every change.
Public UI:
https://plantmetwiki.bioinformatics.nl → container port 8088
Public SPARQL endpoint:
https://plantmetwiki.bioinformatics.nl/sparql → container port 8890
Port summary: change them in the .env file
8890 → VIRTUOSO_HTTP_PORT : Virtuoso UI + SPARQL (http://localhost:8890/sparql)
8088 → SNORQL_PORT : SNORQL user interface (http://localhost:8088/)