A set of SPARQL examples that are used in different SIB resources
Proteins entries from a list of gene names
PREFIX : <http://nextprot.org/rdf/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT DISTINCT ?entry WHERE {
values ?gene
{"UBA6" "PXDNL" "CNOT1" "TCAF2" "ARHGAP32" "HACD1" "AKR1B15" "SGK1" "MYO1C" "LGALS9"
"PIK3CD" "PDE2A" "DNM1L"} # space or nl-separated
bind (STRDT (?gene,xsd:string) as ?genename ) . # converts raw string to ^^xsd:string
?entry :gene / :recommendedName / rdfs:label ?genename .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?entry"):::projected
v1("?gene")
v2("?genename")
a1((" "))
a2((" "))
bind0[/VALUES ?gene/]
bind0-->v1
bind00(["UBA6"])
bind00 --> bind0
bind01(["PXDNL"])
bind01 --> bind0
bind02(["CNOT1"])
bind02 --> bind0
bind03(["TCAF2"])
bind03 --> bind0
bind04(["ARHGAP32"])
bind04 --> bind0
bind05(["HACD1"])
bind05 --> bind0
bind06(["AKR1B15"])
bind06 --> bind0
bind07(["SGK1"])
bind07 --> bind0
bind08(["MYO1C"])
bind08 --> bind0
bind09(["LGALS9"])
bind09 --> bind0
bind010(["PIK3CD"])
bind010 --> bind0
bind011(["PDE2A"])
bind011 --> bind0
bind012(["DNM1L"])
bind012 --> bind0
bind1[/"STRDT(?gene,'xsd:string')"/]
v1 --o bind1
bind1 --as--o v2
v3 --":gene"--> a1
a1 --":recommendedName"--> a2
a2 --"rdfs:label"--> v2