A set of SPARQL examples that are used in different SIB resources
Check there are no entries in the Cancer variants portal that do not have a variant phenotype annotation
PREFIX : <http://nextprot.org/rdf/>
PREFIX cv: <http://nextprot.org/rdf/terminology/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
select distinct ?entry where {
values ?gene
{"APC" "ASXL1" "ATR" "BARD1" "BCOR" "BLM" "BMPR1A" "BRCA1" "BRCA2" "BRIP1"
"CDH1" "CDKN1B" "DNMT3A" "EPCAM" "EZH2" "FLT3" "GATA1" "IDH1" "IDH2" "KIT"
"KRAS" "MEN1" "MLH1" "MLH3" "MSH2" "MSH6" "MUTYH" "NF1" "NF2" "PALB2"
"PIK3CA" "PMS2" "PRKAR1A" "RAD51C" "RAD51D" "RB1" "RUNX1" "SDHAF2" "SDHC" "SDHD"
"SMAD4" "SMARCB1" "XRCC2"} # space-separated
?entry :gene / :name / rdfs:label ?genename .
bind (str(?genename) as ?gn) # here we convert "xxx"^^xsd:string to "xxx" to match the values
filter(?gn = ?gene)
filter not exists {?entry :isoform /:proteoform /:phenotypicVariation ?phenotype} # No phenotype annotation
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?entry"):::projected
v5("?gene")
v5("?genename")
v6("?gn")
v2("?phenotype")
a3((" "))
a4((" "))
a1((" "))
a2((" "))
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --":isoform"--> e0a1
e0a1 --":proteoform"--> e0a2
e0a2 --":phenotypicVariation"--> e0v2
e0v1("?entry"):::projected
e0v2("?phenotype"):::projected
e0a1((" ")):::projected
e0a2((" ")):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> a1
f0 --> c2
f0 --> a2
f0 --> c3
f0 --> v2
v1 --":isoform"--> a1
a1 --":proteoform"--> a2
a2 --":phenotypicVariation"--> v2
f1[["?gn = ?gene"]]
f1 --> v6
f1 --> v5
bind2[/VALUES ?gene/]
bind2-->v5
bind20(["APC"])
bind20 --> bind2
bind21(["ASXL1"])
bind21 --> bind2
bind22(["ATR"])
bind22 --> bind2
bind23(["BARD1"])
bind23 --> bind2
bind24(["BCOR"])
bind24 --> bind2
bind25(["BLM"])
bind25 --> bind2
bind26(["BMPR1A"])
bind26 --> bind2
bind27(["BRCA1"])
bind27 --> bind2
bind28(["BRCA2"])
bind28 --> bind2
bind29(["BRIP1"])
bind29 --> bind2
bind210(["CDH1"])
bind210 --> bind2
bind211(["CDKN1B"])
bind211 --> bind2
bind212(["DNMT3A"])
bind212 --> bind2
bind213(["EPCAM"])
bind213 --> bind2
bind214(["EZH2"])
bind214 --> bind2
bind215(["FLT3"])
bind215 --> bind2
bind216(["GATA1"])
bind216 --> bind2
bind217(["IDH1"])
bind217 --> bind2
bind218(["IDH2"])
bind218 --> bind2
bind219(["KIT"])
bind219 --> bind2
bind220(["KRAS"])
bind220 --> bind2
bind221(["MEN1"])
bind221 --> bind2
bind222(["MLH1"])
bind222 --> bind2
bind223(["MLH3"])
bind223 --> bind2
bind224(["MSH2"])
bind224 --> bind2
bind225(["MSH6"])
bind225 --> bind2
bind226(["MUTYH"])
bind226 --> bind2
bind227(["NF1"])
bind227 --> bind2
bind228(["NF2"])
bind228 --> bind2
bind229(["PALB2"])
bind229 --> bind2
bind230(["PIK3CA"])
bind230 --> bind2
bind231(["PMS2"])
bind231 --> bind2
bind232(["PRKAR1A"])
bind232 --> bind2
bind233(["RAD51C"])
bind233 --> bind2
bind234(["RAD51D"])
bind234 --> bind2
bind235(["RB1"])
bind235 --> bind2
bind236(["RUNX1"])
bind236 --> bind2
bind237(["SDHAF2"])
bind237 --> bind2
bind238(["SDHC"])
bind238 --> bind2
bind239(["SDHD"])
bind239 --> bind2
bind240(["SMAD4"])
bind240 --> bind2
bind241(["SMARCB1"])
bind241 --> bind2
bind242(["XRCC2"])
bind242 --> bind2
v1 --":gene"--> a3
a3 --":name"--> a4
a4 --"rdfs:label"--> v5
bind3[/"str(?genename)"/]
v5 --o bind3
bind3 --as--o v6