A set of SPARQL examples that are used in different SIB resources
Find A.thaliana genes with their properties by a list of their gene symbols/names
PREFIX up: <http://purl.uniprot.org/core/>
PREFIX : <http://purl.orthodb.org/>
SELECT *
WHERE {
?gene a :Gene;
up:organism [up:scientificName ?sciname] .
FILTER(strstarts (?sciname, "Arabidopsis thaliana" ))
?gene :name ?gene_name; :description ?description; :geneTranslatedLength ?aa_seq_length.
OPTIONAL {?gene :geneNbExons ?geneNbExons}.
?gene :aaSequence ?sequence
FILTER(?gene_name in(
"CHX10"
,"GPX1"
,"MAG"
,"MSRB6"
,"MYH"
,"POLH"
,"RPA3A"
,"UVR3"
,"XRCC1"
))
} ORDER BY ?aa_seq_length
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?aa_seq_length"):::projected
v5("?description"):::projected
v4("?gene"):::projected
v6("?geneNbExons"):::projected
v2("?gene_name"):::projected
v3("?sciname"):::projected
v7("?sequence"):::projected
a1((" "))
c12([":Gene"]):::iri
list0c1(["CHX10"]):::literal
list0c3(["MAG"]):::literal
list0c2(["GPX1"]):::literal
list0c4(["MSRB6"]):::literal
list0c8(["UVR3"]):::literal
list0c7(["RPA3A"]):::literal
list0c9(["XRCC1"]):::literal
list0c5(["MYH"]):::literal
list0c6(["POLH"]):::literal
list0c1 --o f0
list0c2 --o f0
list0c3 --o f0
list0c4 --o f0
list0c5 --o f0
list0c6 --o f0
list0c7 --o f0
list0c8 --o f0
list0c9 --o f0
f0[[" in "]]
f0 --> v2
f1[["starts-with(?sciname,'Arabidopsis thaliana')"]]
f1 --> v3
v4 --"a"--> c12
a1 --"up:scientificName"--> v3
v4 --"up:organism"--> a1
v4 --":name"--> v2
v4 --":description"--> v5
v4 --":geneTranslatedLength"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -.":geneNbExons".-> v6
end
v4 --":aaSequence"--> v7