A set of SPARQL examples that are used in different SIB resources
Some cell lines with a gene knockout
PREFIX cello: <https://purl.expasy.org/cellosaurus/rdf/ontology/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
select ?cl ?method ?gene_name ?gene_ac ?comment where {
?cl cello:hasGeneKnockout ?annot.
?annot cello:hasGenomeModificationMethod ?method .
?annot cello:ofGene ?gene .
?gene cello:isIdentifiedByXref / cello:accession ?gene_ac .
?gene cello:name ?gene_name .
optional {?annot rdfs:comment ?comment . }
#filter (bound(?comment)) # uncomment to get only ko annotations with a comment
}
limit 100
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?annot")
v1("?cl"):::projected
v7("?comment"):::projected
v4("?gene")
v5("?gene_ac"):::projected
v6("?gene_name"):::projected
v3("?method"):::projected
a1((" "))
v1 --"cello:hasGeneKnockout"--> v2
v2 --"cello:hasGenomeModificationMethod"--> v3
v2 --"cello:ofGene"--> v4
v4 --"cello:isIdentifiedByXref"--> a1
a1 --"cello:accession"--> v5
v4 --"cello:name"--> v6
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."rdfs:comment".-> v7
end