A set of SPARQL examples that are used in different TGX resources
License: https://www.gnu.org/licenses/gpl-3.0
Uses method in: https://github.com/WDscholia/scholia/tree/master/scholia/app/templates/chemical_biological-processes.sparql
Chemical aspect: biological processes
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://wikidata.org/entity/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX target: <http://www.wikidata.org/entity/Q2270>
SELECT DISTINCT
?pathway ?pathwayLabel
(CONCAT("/pathway/", SUBSTR(STR(?pathway), 32)) AS ?pathwayUrl)
?pathwayDescription
WHERE {
?pathway wdt:P527 target: ;
wdt:P31 wd:Q2996394 .
target: wdt:P361 ?pathway .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
}
ORDER BY ASC(?pathwayLabel)
LIMIT 250
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?pathway"):::projected
v1("?pathwayLabel"):::projected
v3("?pathwayUrl")
c7([http://www.bigdata.com/rdf#serviceParam]):::iri
c2(["wd:Q2270"]):::iri
c4([http://wikidata.org/entity/Q2996394]):::iri
c9(["#91;AUTO_LANGUAGE#93;,mul,en"]):::literal
v2 --"p:direct/P527"--> c2
v2 --"p:direct/P31"--> c4
c2 --"p:direct/P361"--> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end
bind0[/"concat('/pathway/',substring(str(?pathway),'32^^xsd:integer'))"/]
v2 --o bind0
bind0 --as--o v3