Code examples: curl
PREFIX gpml: <http://vocabularies.wikipathways.org/gpml#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
select (count(distinct ?wikidata) as ?count) (str(?label) as ?species) where {
?metabolite a wp:Metabolite ;
wp:bdbWikidata ?wikidata ;
dcterms:isPartOf ?pw .
?pw wp:organismName ?label .
} GROUP BY ?label ORDER BY DESC(?count)
count | species |
2893 | Homo sapiens |
843 | Bos taurus |
840 | Mus musculus |
489 | Rattus norvegicus |
439 | Arabidopsis thaliana |
338 | Saccharomyces cerevisiae |
169 | Danio rerio |
125 | Canis familiaris |
104 | Pan troglodytes |
97 | Mycobacterium tuberculosis |
81 | Caenorhabditis elegans |
75 | Gallus gallus |
69 | Oryza sativa |
65 | Escherichia coli |
63 | Drosophila melanogaster |
58 | Zea mays |
49 | Anopheles gambiae |
39 | Solanum lycopersicum |
31 | Populus trichocarpa |
20 | Equus caballus |
13 | Plasmodium falciparum |
11 | Gibberella zeae |
8 | Bacillus subtilis |
curl -o metaboliteCountBySpecies.rq https://raw.githubusercontent.com/wikipathways/WikiPathways-SPARQL-book/master/sparql/metaboliteCountBySpecies.rq
curl -H "Accept: text/tab-separated-values" -G http://sparql.wikipathways.org/ --data-urlencode [email protected]