query-7ef4b659fafa88735093928dd5e04af7

rq turtle/ttl

title: Which organisms contain at least 100 indolic scaffolds? Results ordered by parent taxon. PREFIX sachem: http://bioinfo.uochb.cas.cz/rdf/v1.0/sachem# # prefixes needed for structural similarity search PREFIX idsm: https://idsm.elixir-czech.cz/sparql/endpoint/ SELECT ?parent_taxon ?parent_taxon_name (COUNT(DISTINCT ?compound) AS ?count) WHERE { SERVICE idsm:wikidata { VALUES ?SUBSTRUCTURE { "C12=C(C=CC=C2)C=CN1" # indolic scaffold } ?compound sachem:substructureSearch [ sachem:query ?SUBSTRUCTURE ]. } hint:Prior hint:runFirst "true"^^xsd:boolean. ?compound p:P703 ?statement. ?statement ps:P703/wdt:P171 ?parent_taxon. ?parent_taxon wdt:P225 ?parent_taxon_name. } GROUP BY ?parent_taxon ?parent_taxon_name HAVING (?count > 100) ORDER BY DESC (?count) title: Which organisms contain at least 100 indolic scaffolds? Results ordered by parent taxon. PREFIX sachem: http://bioinfo.uochb.cas.cz/rdf/v1.0/sachem# # prefixes needed for structural similarity search PREFIX idsm: https://idsm.elixir-czech.cz/sparql/endpoint/ SELECT ?parent_taxon ?parent_taxon_name (COUNT(DISTINCT ?compound) AS ?count) WHERE { SERVICE idsm:wikidata { VALUES ?SUBSTRUCTURE { "C12=C(C=CC=C2)C=CN1" # indolic scaffold } ?compound sachem:substructureSearch [ sachem:query ?SUBSTRUCTURE ]. } hint:Prior hint:runFirst "true"^^xsd:boolean. ?compound p:P703 ?statement. ?statement ps:P703/wdt:P171 ?parent_taxon. ?parent_taxon wdt:P225 ?parent_taxon_name. } GROUP BY ?parent_taxon ?parent_taxon_name HAVING (?count > 100) ORDER BY DESC (?count) title: Which organisms contain at least 100 indolic scaffolds? Results ordered by parent taxon. PREFIX sachem: http://bioinfo.uochb.cas.cz/rdf/v1.0/sachem# # prefixes needed for structural similarity search PREFIX idsm: https://idsm.elixir-czech.cz/sparql/endpoint/ SELECT ?parent_taxon ?parent_taxon_name (COUNT(DISTINCT ?compound) AS ?count) WHERE { SERVICE idsm:wikidata { VALUES ?SUBSTRUCTURE { "C12=C(C=CC=C2)C=CN1" # indolic scaffold } ?compound sachem:substructureSearch [ sachem:query ?SUBSTRUCTURE ]. } hint:Prior hint:runFirst "true"^^xsd:boolean. ?compound p:P703 ?statement. ?statement ps:P703/wdt:P171 ?parent_taxon. ?parent_taxon wdt:P225 ?parent_taxon_name. } GROUP BY ?parent_taxon ?parent_taxon_name HAVING (?count > 100) ORDER BY DESC (?count) title: Which organisms contain at least 100 indolic scaffolds? Results ordered by parent taxon. PREFIX sachem: http://bioinfo.uochb.cas.cz/rdf/v1.0/sachem# # prefixes needed for structural similarity search PREFIX idsm: https://idsm.elixir-czech.cz/sparql/endpoint/ SELECT ?parent_taxon ?parent_taxon_name (COUNT(DISTINCT ?compound) AS ?count) WHERE { SERVICE idsm:wikidata { VALUES ?SUBSTRUCTURE { "C12=C(C=CC=C2)C=CN1" # indolic scaffold } ?compound sachem:substructureSearch [ sachem:query ?SUBSTRUCTURE ]. } hint:Prior hint:runFirst "true"^^xsd:boolean. ?compound p:P703 ?statement. ?statement ps:P703/wdt:P171 ?parent_taxon. ?parent_taxon wdt:P225 ?parent_taxon_name. } GROUP BY ?parent_taxon ?parent_taxon_name HAVING (?count > 100) ORDER BY DESC (?count) title: Which organisms contain at least 100 indolic scaffolds? Results ordered by parent taxon. PREFIX sachem: http://bioinfo.uochb.cas.cz/rdf/v1.0/sachem# # prefixes needed for structural similarity search PREFIX idsm: https://idsm.elixir-czech.cz/sparql/endpoint/ SELECT ?parent_taxon ?parent_taxon_name (COUNT(DISTINCT ?compound) AS ?count) WHERE { SERVICE idsm:wikidata { VALUES ?SUBSTRUCTURE { "C12=C(C=CC=C2)C=CN1" # indolic scaffold } ?compound sachem:substructureSearch [ sachem:query ?SUBSTRUCTURE ]. } hint:Prior hint:runFirst "true"^^xsd:boolean. ?compound p:P703 ?statement. ?statement ps:P703/wdt:P171 ?parent_taxon. ?parent_taxon wdt:P225 ?parent_taxon_name. } GROUP BY ?parent_taxon ?parent_taxon_name HAVING (?count > 100) ORDER BY DESC (?count) title: Which organisms contain at least 100 indolic scaffolds? Results ordered by parent taxon. PREFIX sachem: http://bioinfo.uochb.cas.cz/rdf/v1.0/sachem# # prefixes needed for structural similarity search PREFIX idsm: https://idsm.elixir-czech.cz/sparql/endpoint/ SELECT ?parent_taxon ?parent_taxon_name (COUNT(DISTINCT ?compound) AS ?count) WHERE { SERVICE idsm:wikidata { VALUES ?SUBSTRUCTURE { "C12=C(C=CC=C2)C=CN1" # indolic scaffold } ?compound sachem:substructureSearch [ sachem:query ?SUBSTRUCTURE ]. } hint:Prior hint:runFirst "true"^^xsd:boolean. ?compound p:P703 ?statement. ?statement ps:P703/wdt:P171 ?parent_taxon. ?parent_taxon wdt:P225 ?parent_taxon_name. } GROUP BY ?parent_taxon ?parent_taxon_name HAVING (?count > 100) ORDER BY DESC (?count)

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
#title: Which organisms contain at least 100 indolic scaffolds? Results ordered by parent taxon.
PREFIX sachem: <http://bioinfo.uochb.cas.cz/rdf/v1.0/sachem#> # prefixes needed for structural similarity search
PREFIX idsm: <https://idsm.elixir-czech.cz/sparql/endpoint/>
SELECT ?parent_taxon ?parent_taxon_name (COUNT(DISTINCT ?compound) AS ?count) WHERE {
  SERVICE idsm:wikidata {
    VALUES ?SUBSTRUCTURE {
      "C12=C(C=CC=C2)C=CN1" # indolic scaffold
    }
    ?compound sachem:substructureSearch [
      sachem:query ?SUBSTRUCTURE
    ].
  } 
  ?compound p:P703 ?statement.
  ?statement ps:P703/wdt:P171 ?parent_taxon.
  ?parent_taxon wdt:P225 ?parent_taxon_name.
}
GROUP BY ?parent_taxon ?parent_taxon_name
HAVING (?count > 100)
ORDER BY DESC (?count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?SUBSTRUCTURE") v3("?compound"):::projected v7("?count") v5("?parent_taxon"):::projected v6("?parent_taxon_name"):::projected v4("?statement") a1((" ")) a2((" ")) f0[["?count > '100^^xsd:integer'"]] f0 --> v7 subgraph s1["https://idsm.elixir-czech.cz/sparql/endpoint/wikidata"] style s1 stroke-width:4px; bind1[/VALUES ?SUBSTRUCTURE/] bind1-->v2 bind10(["C12=C(C=CC=C2)C=CN1"]) bind10 --> bind1 a1 --http://bioinfo.uochb.cas.cz/rdf/v1.0/sachem#query--> v2 v3 --http://bioinfo.uochb.cas.cz/rdf/v1.0/sachem#substructureSearch--> a1 end v3 --"p:P703"--> v4 v4 --"p:statement/P703"--> a2 a2 --"p:direct/P171"--> v5 v5 --"p:direct/P225"--> v6 bind3[/"count(?compound)"/] v3 --o bind3 bind3 --as--o v7