wikipathways / SPARQLQueries

Queries for the WikiPathways SPARQL endpoint.
https://sparql.wikipathways.org/
GNU General Public License v3.0
2 stars 2 forks source link

How can I get all metabolite/compound IDs in all WikiPathways pathways? #19

Open kozo2 opened 1 year ago

kozo2 commented 1 year ago

If anyone knows the SPARQL for the title, please let me know! Also, I'd like to add that SPARQL to this repository!

egonw commented 9 months ago

hi @kozo2, sorry, I seem to have missed this one

egonw commented 9 months ago

Something like this?

select distinct ?wpid ?wikidata (str(?label) as ?Metabolite) where {
  ?Metabolite a wp:Metabolite ; 
    rdfs:label ?label ;
    wp:bdbWikidata ?wikidata ;
    dcterms:isPartOf ?pathway .
  ?pathway a wp:Pathway ; dcterms:identifier ?wpid .
}