A set of SPARQL examples that are used in different SIB resources
Some cell lines with an hemizygous mutation
PREFIX cello: <https://purl.expasy.org/cellosaurus/rdf/ontology/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
select ?cl ?cl_name ?status ?seqvar_class ?seqvar_label ?zygozity ?gene_ac ?gene_name where {
# possible values for zygozity are Hemizygous Hemizygous or homozygous Heteroplasmic
# Heterozygous Heterozygous or homozygous Homoplasmic Homozygous Mosaic Unspecified
values ( ?zygozity ) { ( "Hemizygous") }
?cl cello:recommendedName ?cl_name_xsd .
?cl cello:hasSequenceVariationInfo ?annot .
?annot cello:variationStatus ?status_xsd .
?annot cello:hasTarget ?seqvar .
?seqvar cello:zygosity ?zygozity .
?seqvar a ?seqvar_class .
?seqvar rdfs:label ?seqvar_label_xsd .
?seqvar cello:ofGene ?gene .
?gene cello:isIdentifiedByXref ?xref .
?xref cello:accession ?gene_ac_xsd .
?xref rdfs:label ?gene_name_xsd .
bind(str(?cl_name_xsd) as ?cl_name)
bind(str(?status_xsd) as ?status)
bind(str(?seqvar_label_xsd) as ?seqvar_label)
bind(str(?gene_ac_xsd) as ?gene_ac)
bind(str(?gene_name_xsd) as ?gene_name)
}
order by ?cl_name
limit 1000
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?annot")
v3("?cl"):::projected
v14("?cl_name"):::projected
v4("?cl_name_xsd")
v10("?gene")
v16("?gene_ac"):::projected
v12("?gene_ac_xsd")
v17("?gene_name"):::projected
v13("?gene_name_xsd")
v7("?seqvar")
v8("?seqvar_class"):::projected
v15("?seqvar_label"):::projected
v9("?seqvar_label_xsd")
v14("?status"):::projected
v6("?status_xsd")
v11("?xref")
v2("?zygozity"):::projected
bind0[/VALUES ?zygozity/]
bind0-->v2
bind00(["Hemizygous"])
bind00 --> bind0
v3 --"cello:recommendedName"--> v4
v3 --"cello:hasSequenceVariationInfo"--> v5
v5 --"cello:variationStatus"--> v6
v5 --"cello:hasTarget"--> v7
v7 --"cello:zygosity"--> v2
v7 --"a"--> v8
v7 --"rdfs:label"--> v9
v7 --"cello:ofGene"--> v10
v10 --"cello:isIdentifiedByXref"--> v11
v11 --"cello:accession"--> v12
v11 --"rdfs:label"--> v13
bind1[/"str(?cl_name_xsd)"/]
v4 --o bind1
bind1 --as--o v14
bind2[/"str(?status_xsd)"/]
v6 --o bind2
bind2 --as--o v14
bind3[/"str(?seqvar_label_xsd)"/]
v9 --o bind3
bind3 --as--o v15
bind4[/"str(?gene_ac_xsd)"/]
v12 --o bind4
bind4 --as--o v16
bind5[/"str(?gene_name_xsd)"/]
v13 --o bind5
bind5 --as--o v17