sparql-examples

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

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

Query_123

rq turtle/ttl

Statistics of methods used for gene knockout and gene integration

Use at


PREFIX cello: <https://purl.expasy.org/cellosaurus/rdf/ontology/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX OBI: <http://purl.obolibrary.org/obo/OBI_>
select  ?modification_class ?method_class  ?method_name (count(*) as ?cnt) where {
  ?proc_inst cello:hasGenomeModificationMethod ?gem_inst .
  ?proc_inst a ?modification_class .
  ?proc_class rdfs:subClassOf OBI:0001364 . # parent cello:GeneIntegration and cello:GeneKnockdown
  ?gem_inst a ?method_class .
  #?gem_class rdfs:subClassOf OBI:0600043 . # genome modification method
  ?method_class rdfs:label ?method_name .
}
group by  ?modification_class ?method_class ?method_name
order by  ?modification_class desc(count(*)) ?method_class ?method_name
    
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v7("?_anon_39b94405334d4c98a94d4349b2e25270409")
  v8("?cnt")
  v5("?gem_inst")
  v2("?method_class"):::projected 
  v3("?method_name"):::projected 
  v1("?modification_class"):::projected 
  v6("?proc_class")
  v4("?proc_inst")
  a1((" "))
  c4([http://purl.obolibrary.org/obo/OBI_0001364]):::iri 
  v4 --"cello:hasGenomeModificationMethod"-->  v5
  v4 --"a"-->  v1
  v6 --"rdfs:subClassOf"-->  c4
  v5 --"a"-->  v2
  v2 --"rdfs:label"-->  v3
  bind2[/"count(*)"/]
  bind2 --as--o v7
  bind3[/"count(*)"/]
  bind3 --as--o v8