A set of SPARQL examples that are used in different SIB resources
Mouse cell lines with a sequence variation
PREFIX cello: <https://purl.expasy.org/cellosaurus/rdf/ontology/>
PREFIX db: <https://purl.expasy.org/cellosaurus/rdf/db/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
select distinct ?cl ?cl_name ?species_ac ?species_label ?seqvar_class ?gene_ac ?gene_name where {
values ( ?generic_species_notation ) { ( "10090") } # NCBI_TaxID accession of Mouse
?cl cello:recommendedName ?cl_name .
?cl cello:derivedFromIndividualBelongingToSpecies ?species .
?species cello:isIdentifiedByXref ?species_xref .
?species cello:name ?species_label .
?species_xref cello:accession ?species_ac .
?species_xref cello:more_specific_than* ?generic_concept .
?generic_concept skos:notation ?generic_species_notation ; skos:inScheme db:NCBI_TaxID . # Mouse = 10090
?cl cello:hasSequenceVariationInfo ?annot .
?annot cello:hasTarget ?seqvar .
?seqvar a ?seqvar_class .
?seqvar cello:ofGene ?gene .
?gene cello:isIdentifiedByXref ?gene_xref .
?gene_xref cello:accession ?gene_ac .
?gene_xref rdfs:label ?gene_name .
}
order by ?cl_name
limit 1000
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v9("?annot")
v3("?cl"):::projected
v1("?cl_name"):::projected
v12("?gene")
v14("?gene_ac"):::projected
v15("?gene_name"):::projected
v13("?gene_xref")
v8("?generic_concept")
v2("?generic_species_notation")
v10("?seqvar")
v11("?seqvar_class"):::projected
v4("?species")
v7("?species_ac"):::projected
v6("?species_label"):::projected
v5("?species_xref")
c9([https://purl.expasy.org/cellosaurus/rdf/db/NCBI_TaxID]):::iri
bind0[/VALUES ?generic_species_notation/]
bind0-->v2
bind00(["10090"])
bind00 --> bind0
v3 --"cello:recommendedName"--> v1
v3 --"cello:derivedFromIndividualBelongingToSpecies"--> v4
v4 --"cello:isIdentifiedByXref"--> v5
v4 --"cello:name"--> v6
v5 --"cello:accession"--> v7
v5 --"cello:more_specific_than"--> v8
v8 --"skos:notation"--> v2
v8 --"skos:inScheme"--> c9
v3 --"cello:hasSequenceVariationInfo"--> v9
v9 --"cello:hasTarget"--> v10
v10 --"a"--> v11
v10 --"cello:ofGene"--> v12
v12 --"cello:isIdentifiedByXref"--> v13
v13 --"cello:accession"--> v14
v13 --"rdfs:label"--> v15