sparql-examples

A set of SPARQL examples that are used in different SIB resources

View the Project on GitHub sib-swiss/sparql-examples

Query_108

rq turtle/ttl

Cell lines with a South Asian genome ancestry greater than 30%

Use at


PREFIX cello: <https://purl.expasy.org/cellosaurus/rdf/ontology/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
select ?cl ?cl_name ?population_name ?percentage ?pmid where {
        ?cl cello:hasGenomeAncestry ?annot .
  	?cl cello:recommendedName ?cl_name .
  	?annot cello:hasComponent ?pp .
    ?pp cello:hasPopulation / cello:name ?population_name .
  	?pp cello:percentage ?percentage .
    ?annot cello:hasSource / cello:originatesFrom / cello:pmid ?pmid .
  	filter (?population_name = "South Asian" && ?percentage > "30"^^xsd:float)
}
order by ?percent
    
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v5("?annot")
  v4("?cl"):::projected 
  v6("?cl_name"):::projected 
  v1("?percent")
  v3("?percentage"):::projected 
  v8("?pmid"):::projected 
  v2("?population_name"):::projected 
  v7("?pp")
  a1((" "))
  a2((" "))
  a3((" "))
  f0[["?population_name = 'South Asian'?percentage > '30^^xsd:float'"]]
  f0 --> v2
  f0 --> v3
  v4 --"cello:hasGenomeAncestry"-->  v5
  v4 --"cello:recommendedName"-->  v6
  v5 --"cello:hasComponent"-->  v7
  v7 --"cello:hasPopulation"-->  a1
  a1 --"cello:name"-->  v2
  v7 --"cello:percentage"-->  v3
  v5 --"cello:hasSource"-->  a2
  a2 --"cello:originatesFrom"-->  a3
  a3 --"cello:pmid"-->  v8