Help:WikiPathways SPARQL queries
From WikiPathways
Line 63: | Line 63: | ||
} | } | ||
</pre> | </pre> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=select+distinct+%3Fdataset+str%28%3FtitleLit%29+as+%3Ftitle+%3Fdate+%3Flicense+where+{%0D%0A++%3Fdataset+a+void%3ADataset+%3B%0D%0A++++dcterms%3Atitle+%3FtitleLit+%3B%0D%0A++++dcterms%3Alicense+%3Flicense+%3B%0D%0A++++pav%3AcreatedOn+%3Fdate+.%0D%0A}&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=select+distinct+%3Fdataset+str%28%3FtitleLit%29+as+%3Ftitle+%3Fdate+%3Flicense+where+{%0D%0A++%3Fdataset+a+void%3ADataset+%3B%0D%0A++++dcterms%3Atitle+%3FtitleLit+%3B%0D%0A++++dcterms%3Alicense+%3Flicense+%3B%0D%0A++++pav%3AcreatedOn+%3Fdate+.%0D%0A}&format=text%2Fhtml&timeout=0&debug=on Execute] |
== Pathway oriented queries == | == Pathway oriented queries == | ||
Line 79: | Line 79: | ||
} | } | ||
</pre> | </pre> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=PREFIX+rdfs%3A++++%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0APREFIX+wp%3A+%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0A%0D%0ASELECT+DISTINCT+%3Forganism+str%28%3Flabel%29+as+%3Fname%0D%0AWHERE+%7B%0D%0A++++%3Fconcept+wp%3Aorganism+%3Forganism+%3B%0D%0A++++++wp%3AorganismName+%3Flabel+.%0D%0A%7D%0D%0A&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=PREFIX+rdfs%3A++++%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0APREFIX+wp%3A+%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0A%0D%0ASELECT+DISTINCT+%3Forganism+str%28%3Flabel%29+as+%3Fname%0D%0AWHERE+%7B%0D%0A++++%3Fconcept+wp%3Aorganism+%3Forganism+%3B%0D%0A++++++wp%3AorganismName+%3Flabel+.%0D%0A%7D%0D%0A&format=text%2Fhtml&timeout=0&debug=on Execute] |
===List pathways and their species === | ===List pathways and their species === | ||
Line 93: | Line 93: | ||
} | } | ||
</pre> | </pre> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=PREFIX+dc%3A++++++%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E+%0D%0APREFIX+wp%3A+++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0A%0D%0ASELECT+DISTINCT+str%28%3Ftitle%29+as+%3Fpathway+str%28%3Flabel%29+as+%3Forganism+%0D%0AWHERE+%7B%0D%0A++++%3Fpw+dc%3Atitle+%3Ftitle+%3B%0D%0A++++++wp%3Aorganism+%3Forganism+%3B%0D%0A++++++wp%3AorganismName+%3Flabel+.%0D%0A%7D+%0D%0A&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=PREFIX+dc%3A++++++%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E+%0D%0APREFIX+wp%3A+++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0A%0D%0ASELECT+DISTINCT+str%28%3Ftitle%29+as+%3Fpathway+str%28%3Flabel%29+as+%3Forganism+%0D%0AWHERE+%7B%0D%0A++++%3Fpw+dc%3Atitle+%3Ftitle+%3B%0D%0A++++++wp%3Aorganism+%3Forganism+%3B%0D%0A++++++wp%3AorganismName+%3Flabel+.%0D%0A%7D+%0D%0A&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== List the species captured in WikiPathways and the number of pathways per species=== | === List the species captured in WikiPathways and the number of pathways per species=== | ||
Line 108: | Line 108: | ||
ORDER BY DESC(?pathwayCount) | ORDER BY DESC(?pathwayCount) | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=PREFIX+dc%3A++++++%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E+%0D%0APREFIX+wp%3A+%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0A%0D%0ASELECT+DISTINCT+%3Forganism+str%28%3Flabel%29+as+%3Fname+count%28%3Fpw%29+as+%3FpathwayCount%0D%0AWHERE+%7B%0D%0A++++%3Fpw+dc%3Atitle+%3Ftitle+%3B%0D%0A++++++wp%3Aorganism+%3Forganism+%3B%0D%0A++++++wp%3AorganismName+%3Flabel+.%0D%0A%7D%0D%0AORDER+BY+DESC%28%3FpathwayCount%29%0D%0A&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=PREFIX+dc%3A++++++%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E+%0D%0APREFIX+wp%3A+%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0A%0D%0ASELECT+DISTINCT+%3Forganism+str%28%3Flabel%29+as+%3Fname+count%28%3Fpw%29+as+%3FpathwayCount%0D%0AWHERE+%7B%0D%0A++++%3Fpw+dc%3Atitle+%3Ftitle+%3B%0D%0A++++++wp%3Aorganism+%3Forganism+%3B%0D%0A++++++wp%3AorganismName+%3Flabel+.%0D%0A%7D%0D%0AORDER+BY+DESC%28%3FpathwayCount%29%0D%0A&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== List all pathways for species "Mus musculus" === | === List all pathways for species "Mus musculus" === | ||
Line 131: | Line 131: | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=PREFIX+rdfs%3A++++%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0APREFIX+dc%3A++++++%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E+%0D%0APREFIX+foaf%3A++++%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E+%0D%0APREFIX+wp%3A+%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0APREFIX+xsd%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%0D%0A%0D%0ASELECT+DISTINCT+%3FwpIdentifier+%3Fpathway+%3Fpage%0D%0AWHERE+%7B%0D%0A++++%3Fpathway+dc%3Atitle+%3Ftitle+.%0D%0A++++%3Fpathway+foaf%3Apage+%3Fpage+.%0D%0A++++%3Fpathway+dc%3Aidentifier+%3FwpIdentifier+.%0D%0A++++%3Fpathway+wp%3AorganismName+%22Mus+musculus%22%5E%5Exsd%3Astring+.%0D%0A+%7D%0D%0AORDER+BY+%3FwpIdentifier%0D%0A&format=text%2Fhtml&timeout=0&debug=on Execute] [https://gist.github.com/andrawaag/5974484 Perl] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=PREFIX+rdfs%3A++++%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0APREFIX+dc%3A++++++%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E+%0D%0APREFIX+foaf%3A++++%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E+%0D%0APREFIX+wp%3A+%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0APREFIX+xsd%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%0D%0A%0D%0ASELECT+DISTINCT+%3FwpIdentifier+%3Fpathway+%3Fpage%0D%0AWHERE+%7B%0D%0A++++%3Fpathway+dc%3Atitle+%3Ftitle+.%0D%0A++++%3Fpathway+foaf%3Apage+%3Fpage+.%0D%0A++++%3Fpathway+dc%3Aidentifier+%3FwpIdentifier+.%0D%0A++++%3Fpathway+wp%3AorganismName+%22Mus+musculus%22%5E%5Exsd%3Astring+.%0D%0A+%7D%0D%0AORDER+BY+%3FwpIdentifier%0D%0A&format=text%2Fhtml&timeout=0&debug=on Execute] [https://gist.github.com/andrawaag/5974484 Perl] |
Line 156: | Line 156: | ||
} | } | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=PREFIX+wp%3A++++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0APREFIX+rdfs%3A++++%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0APREFIX+dcterms%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0D%0A%0D%0ASELECT+DISTINCT+%3Fpathway+str%28%3Flabel%29+as+%3FgeneProduct%0D%0AWHERE+%7B%0D%0A++++%3FgeneProduct+a+wp%3AGeneProduct+.+%0D%0A++++%3FgeneProduct+rdfs%3Alabel+%3Flabel+.%0D%0A++++%3FgeneProduct+dcterms%3AisPartOf+%3Fpathway+.%0D%0A++++%3Fpathway+a+wp%3APathway+.%0D%0A++++%0D%0A++++FILTER+regex%28str%28%3Flabel%29%2C+%22CYP%22%29.+%0D%0A%7D%0D%0A&format=text%2Fhtml&timeout=0&debug=on execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=PREFIX+wp%3A++++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0APREFIX+rdfs%3A++++%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0APREFIX+dcterms%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0D%0A%0D%0ASELECT+DISTINCT+%3Fpathway+str%28%3Flabel%29+as+%3FgeneProduct%0D%0AWHERE+%7B%0D%0A++++%3FgeneProduct+a+wp%3AGeneProduct+.+%0D%0A++++%3FgeneProduct+rdfs%3Alabel+%3Flabel+.%0D%0A++++%3FgeneProduct+dcterms%3AisPartOf+%3Fpathway+.%0D%0A++++%3Fpathway+a+wp%3APathway+.%0D%0A++++%0D%0A++++FILTER+regex%28str%28%3Flabel%29%2C+%22CYP%22%29.+%0D%0A%7D%0D%0A&format=text%2Fhtml&timeout=0&debug=on execute] |
=== Get all groups and complexes containing a particular gene === | === Get all groups and complexes containing a particular gene === | ||
Line 178: | Line 178: | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=PREFIX+wp%3A++++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0APREFIX+rdfs%3A++++%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0APREFIX+dcterms%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0D%0A%0D%0ASELECT+DISTINCT+%3Fpathway+str%28%3Flabel%29+as+%3FgeneProduct%0D%0AWHERE+%7B%0D%0A++++%3FgeneProduct+a+wp%3AGeneProduct+.+%0D%0A++++%3FgeneProduct+rdfs%3Alabel+%3Flabel+.%0D%0A++++%3FgeneProduct+dcterms%3AisPartOf+%3Fpathway+.%0D%0A%0D%0A++++FILTER+NOT+EXISTS+%7B+%3Fpathway+a+wp%3AInteraction+%7D+.%0D%0A++++FILTER+NOT+EXISTS+%7B+%3Fpathway+a+wp%3APathway+%7D+.%0D%0A++++FILTER+regex%28str%28%3Flabel%29%2C+%22CYP%22%29.+%0D%0A%7D%0D%0A&format=text%2Fhtml&timeout=0&debug=on execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=PREFIX+wp%3A++++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0APREFIX+rdfs%3A++++%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0APREFIX+dcterms%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0D%0A%0D%0ASELECT+DISTINCT+%3Fpathway+str%28%3Flabel%29+as+%3FgeneProduct%0D%0AWHERE+%7B%0D%0A++++%3FgeneProduct+a+wp%3AGeneProduct+.+%0D%0A++++%3FgeneProduct+rdfs%3Alabel+%3Flabel+.%0D%0A++++%3FgeneProduct+dcterms%3AisPartOf+%3Fpathway+.%0D%0A%0D%0A++++FILTER+NOT+EXISTS+%7B+%3Fpathway+a+wp%3AInteraction+%7D+.%0D%0A++++FILTER+NOT+EXISTS+%7B+%3Fpathway+a+wp%3APathway+%7D+.%0D%0A++++FILTER+regex%28str%28%3Flabel%29%2C+%22CYP%22%29.+%0D%0A%7D%0D%0A&format=text%2Fhtml&timeout=0&debug=on execute] |
===Get all the genes on a particular pathway=== | ===Get all the genes on a particular pathway=== | ||
Line 196: | Line 196: | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=PREFIX+wp%3A++++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0APREFIX+rdfs%3A++++%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0APREFIX+dcterms%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0D%0A%0D%0Aselect+distinct+%3Fpathway+str%28%3Flabel%29+as+%3FgeneProduct+where+%7B%0D%0A++++%3FgeneProduct+a+wp%3AGeneProduct+.+%0D%0A++++%3FgeneProduct+rdfs%3Alabel+%3Flabel+.%0D%0A++++%3FgeneProduct+dcterms%3AisPartOf+%3Fpathway+.%0D%0A++++%3Fpathway+a+wp%3APathway+.%0D%0A++++%3Fpathway+dcterms%3Aidentifier+%22WP1560%22%5E%5Exsd%3Astring+.+%0D%0A%7D%0D%0A&format=text%2Fhtml&timeout=0&debug=on excute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=PREFIX+wp%3A++++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0APREFIX+rdfs%3A++++%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0APREFIX+dcterms%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0D%0A%0D%0Aselect+distinct+%3Fpathway+str%28%3Flabel%29+as+%3FgeneProduct+where+%7B%0D%0A++++%3FgeneProduct+a+wp%3AGeneProduct+.+%0D%0A++++%3FgeneProduct+rdfs%3Alabel+%3Flabel+.%0D%0A++++%3FgeneProduct+dcterms%3AisPartOf+%3Fpathway+.%0D%0A++++%3Fpathway+a+wp%3APathway+.%0D%0A++++%3Fpathway+dcterms%3Aidentifier+%22WP1560%22%5E%5Exsd%3Astring+.+%0D%0A%7D%0D%0A&format=text%2Fhtml&timeout=0&debug=on excute] |
=== Count the number of pathways per ontology term === | === Count the number of pathways per ontology term === | ||
Line 208: | Line 208: | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=SELECT+DISTINCT+%3FpwOntologyTerm+count%28%3FpwOntologyTerm%29+as+%3FpathwayCount%0D%0A+WHERE+{%0D%0A%09%3FpathwayRDF+wp%3AontologyTag+%3FpwOntologyTerm+.%0D%0A+}%0D%0A+ORDER+BY+DESC%28%3FpathwayCount%29&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=SELECT+DISTINCT+%3FpwOntologyTerm+count%28%3FpwOntologyTerm%29+as+%3FpathwayCount%0D%0A+WHERE+{%0D%0A%09%3FpathwayRDF+wp%3AontologyTag+%3FpwOntologyTerm+.%0D%0A+}%0D%0A+ORDER+BY+DESC%28%3FpathwayCount%29&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== Get all pathways with a particular ontology term === | === Get all pathways with a particular ontology term === | ||
Line 223: | Line 223: | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=PREFIX+obo%3A+%3Chttp%3A%2F%2Fpurl.obolibrary.org%2Fobo%2F%3E%0D%0A%0D%0ASELECT+%3Fpathway+%28str%28%3FtitleLit%29+AS+%3Ftitle%29%0D%0AWHERE+%7B%0D%0A++%3FpathwayRDF+wp%3AontologyTag+obo%3APW_0000296+%3B%0D%0A++++++++++++++foaf%3Apage+%3Fpathway+%3B%0D%0A++++++++++++++dc%3Atitle+%3FtitleLit+.%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=PREFIX+obo%3A+%3Chttp%3A%2F%2Fpurl.obolibrary.org%2Fobo%2F%3E%0D%0A%0D%0ASELECT+%3Fpathway+%28str%28%3FtitleLit%29+AS+%3Ftitle%29%0D%0AWHERE+%7B%0D%0A++%3FpathwayRDF+wp%3AontologyTag+obo%3APW_0000296+%3B%0D%0A++++++++++++++foaf%3Apage+%3Fpathway+%3B%0D%0A++++++++++++++dc%3Atitle+%3FtitleLit+.%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on execute] |
=== Get all ontology terms for a particular pathway === | === Get all ontology terms for a particular pathway === | ||
Line 238: | Line 238: | ||
} | } | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=SELECT+%3Fo+as+%3FpwOntologyTerm+str%28%3FtitleLit%29+as+%3Ftitle+%3Fpathway+%0D%0AWHERE+{%0D%0A++%3FpathwayRDF+wp%3AontologyTag+%3Fo+%3B%0D%0A++++foaf%3Apage+%3Fpathway+%3B%0D%0A++++dc%3Atitle+%3FtitleLit+%3B%0D%0A++++dcterms%3Aidentifier+%22WP1560%22^^xsd%3Astring+.+%0D%0A%0D%0A++FILTER+%28!+regex%28str%28%3Fpathway%29%2C+%22group%22%29%29%0D%0A}%0D%0A&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=SELECT+%3Fo+as+%3FpwOntologyTerm+str%28%3FtitleLit%29+as+%3Ftitle+%3Fpathway+%0D%0AWHERE+{%0D%0A++%3FpathwayRDF+wp%3AontologyTag+%3Fo+%3B%0D%0A++++foaf%3Apage+%3Fpathway+%3B%0D%0A++++dc%3Atitle+%3FtitleLit+%3B%0D%0A++++dcterms%3Aidentifier+%22WP1560%22^^xsd%3Astring+.+%0D%0A%0D%0A++FILTER+%28!+regex%28str%28%3Fpathway%29%2C+%22group%22%29%29%0D%0A}%0D%0A&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== Get all Reactome pathways === | === Get all Reactome pathways === | ||
Line 251: | Line 251: | ||
} | } | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=PREFIX+cur%3A+%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23Curation%3A%3E%0D%0A%0D%0ASELECT+DISTINCT+%3Fpathway+%28str%28%3FtitleLit%29+as+%3Ftitle%29%0D%0AWHERE+%7B%0D%0A++%3Fpathway+wp%3AontologyTag+cur%3AReactome_Approved+%3B%0D%0A+++++++++++dc%3Atitle+%3FtitleLit+.%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=PREFIX+cur%3A+%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23Curation%3A%3E%0D%0A%0D%0ASELECT+DISTINCT+%3Fpathway+%28str%28%3FtitleLit%29+as+%3Ftitle%29%0D%0AWHERE+%7B%0D%0A++%3Fpathway+wp%3AontologyTag+cur%3AReactome_Approved+%3B%0D%0A+++++++++++dc%3Atitle+%3FtitleLit+.%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== Get all pathways with Pubmed references === | === Get all pathways with Pubmed references === | ||
Line 261: | Line 261: | ||
ORDER BY ?pathway | ORDER BY ?pathway | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=SELECT+DISTINCT+%3Fpathway+%3Fpubmed+%0D%0AWHERE+%0D%0A+++++%7B%3Fpubmed+a+++++++wp%3APublicationReference+.+%0D%0A++++++%3Fpubmed+dcterms%3AisPartOf+%3Fpathway+%7D%0D%0AORDER+BY+%3Fpathway&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=SELECT+DISTINCT+%3Fpathway+%3Fpubmed+%0D%0AWHERE+%0D%0A+++++%7B%3Fpubmed+a+++++++wp%3APublicationReference+.+%0D%0A++++++%3Fpubmed+dcterms%3AisPartOf+%3Fpathway+%7D%0D%0AORDER+BY+%3Fpathway&format=text%2Fhtml&timeout=0&debug=on Execute] |
Line 277: | Line 277: | ||
The $ at the end of the PubMed identifier ensures that, for example, 147694831 does not match too; the regex instruction '$' means "end of the string". | The $ at the end of the PubMed identifier ensures that, for example, 147694831 does not match too; the regex instruction '$' means "end of the string". | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=SELECT+DISTINCT+%3Fpathway+%3Fpubmed+%0D%0AWHERE+{%0D%0A++++++%3Fpubmed+a+++++++wp%3APublicationReference+.+%0D%0A++++++%3Fpubmed+dcterms%3AisPartOf+%3Fpathway+.%0D%0A%0D%0A++++++FILTER+regex%28str%28%3Fpubmed%29%2C+%2214769483%24%22%29+%0D%0A}%0D%0AORDER+BY+%3Fpathway&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=SELECT+DISTINCT+%3Fpathway+%3Fpubmed+%0D%0AWHERE+{%0D%0A++++++%3Fpubmed+a+++++++wp%3APublicationReference+.+%0D%0A++++++%3Fpubmed+dcterms%3AisPartOf+%3Fpathway+.%0D%0A%0D%0A++++++FILTER+regex%28str%28%3Fpubmed%29%2C+%2214769483%24%22%29+%0D%0A}%0D%0AORDER+BY+%3Fpathway&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== Get all pathways and the number of refences per pathway === | === Get all pathways and the number of refences per pathway === | ||
Line 287: | Line 287: | ||
ORDER BY DESC(?numberOfReferences) | ORDER BY DESC(?numberOfReferences) | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=SELECT+DISTINCT+%3Fpathway+COUNT%28%3Fpubmed%29+AS+%3FnumberOfReferences%0D%0AWHERE+%0D%0A+++++%7B%3Fpubmed+a+++++++wp%3APublicationReference+.+%0D%0A++++++%3Fpubmed+dcterms%3AisPartOf+%3Fpathway+%7D%0D%0AORDER+BY+DESC%28%3FnumberOfReferences%29+&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=SELECT+DISTINCT+%3Fpathway+COUNT%28%3Fpubmed%29+AS+%3FnumberOfReferences%0D%0AWHERE+%0D%0A+++++%7B%3Fpubmed+a+++++++wp%3APublicationReference+.+%0D%0A++++++%3Fpubmed+dcterms%3AisPartOf+%3Fpathway+%7D%0D%0AORDER+BY+DESC%28%3FnumberOfReferences%29+&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== Get a full dump of all pathways and their pathway ontological terms === | === Get a full dump of all pathways and their pathway ontological terms === | ||
Line 310: | Line 310: | ||
} | } | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=PREFIX+rdf%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0D%0APREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0APREFIX+dc%3A++%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E%0D%0APREFIX+foaf%3A+%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0D%0APREFIX+schema%3A+%3Chttp%3A%2F%2Fschema.org%2F%3E%0D%0APREFIX+wp%3A++++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0APREFIX+dcterms%3A++%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0D%0A%0D%0ASELECT+DISTINCT+%3Fdepicts+str%28%3FtitleLit%29+as+%3Ftitle+str%28%3FspeciesLabelLit%29+as+%3FspeciesLabel+%3Fidentifier+%3Fontology%0D%0AWHERE+{%0D%0A%09%3Fpathway+foaf%3Apage+%3Fdepicts+.%0D%0A++++++++%3Fpathway+dc%3Atitle+%3FtitleLit+.%0D%0A++++++++%3Fpathway+wp%3Aorganism+%3Fspecies+.%0D%0A++++++++%3Fpathway+wp%3AorganismName+%3FspeciesLabelLit+.%0D%0A++++++++%3Fpathway+dc%3Aidentifier+%3Fidentifier+.%0D%0A%0D%0A++++++++OPTIONAL+{%3Fpathway+wp%3AontologyTag+%3Fontology+.}%0D%0A}+%0D%0A&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=PREFIX+rdf%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0D%0APREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0APREFIX+dc%3A++%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E%0D%0APREFIX+foaf%3A+%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0D%0APREFIX+schema%3A+%3Chttp%3A%2F%2Fschema.org%2F%3E%0D%0APREFIX+wp%3A++++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0APREFIX+dcterms%3A++%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0D%0A%0D%0ASELECT+DISTINCT+%3Fdepicts+str%28%3FtitleLit%29+as+%3Ftitle+str%28%3FspeciesLabelLit%29+as+%3FspeciesLabel+%3Fidentifier+%3Fontology%0D%0AWHERE+{%0D%0A%09%3Fpathway+foaf%3Apage+%3Fdepicts+.%0D%0A++++++++%3Fpathway+dc%3Atitle+%3FtitleLit+.%0D%0A++++++++%3Fpathway+wp%3Aorganism+%3Fspecies+.%0D%0A++++++++%3Fpathway+wp%3AorganismName+%3FspeciesLabelLit+.%0D%0A++++++++%3Fpathway+dc%3Aidentifier+%3Fidentifier+.%0D%0A%0D%0A++++++++OPTIONAL+{%3Fpathway+wp%3AontologyTag+%3Fontology+.}%0D%0A}+%0D%0A&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== Count how many genes from a list occur in one or more pathways === | === Count how many genes from a list occur in one or more pathways === | ||
Line 335: | Line 335: | ||
ORDER BY DESC(?GenesInPWs) | ORDER BY DESC(?GenesInPWs) | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=prefix+hgnc%3A++++++%3Chttp%3A%2F%2Fidentifiers.org%2Fhgnc.symbol%2F%3E%0D%0Aselect+distinct+%3FpathwayRes+%28str%28%3Fwpid%29+as+%3Fpathway%29+%28str%28%3Ftitle%29+as+%3FpathwayTitle%29+%28count%28distinct+%3FhgncId%29+AS+%3FGenesInPWs%29%0D%0Awhere+%7B%0D%0AVALUES+%3FhgncId+%7Bhgnc%3AGPD1L+hgnc%3ASCN3B+hgnc%3ABAD%7D%0D%0A++%3Fgene+a+wp%3AGeneProduct+%3B%0D%0A++++dcterms%3Aidentifier+%3Fid+%3B%0D%0A++++dcterms%3AisPartOf+%3FpathwayRes+%3B%0D%0A++++wp%3AbdbHgncSymbol+%3FhgncId+.%0D%0A++%3FpathwayRes+a+wp%3APathway+%3B%0D%0A++++++++++++++wp%3AorganismName+%22Homo+sapiens%22%5E%5Exsd%3Astring+%3B+%0D%0A++++dcterms%3Aidentifier+%3Fwpid+%3B%0D%0A++++dc%3Atitle+%3Ftitle+.%0D%0A%7D%0D%0A%0D%0AORDER+BY+DESC%28%3FGenesInPWs%29&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=prefix+hgnc%3A++++++%3Chttp%3A%2F%2Fidentifiers.org%2Fhgnc.symbol%2F%3E%0D%0Aselect+distinct+%3FpathwayRes+%28str%28%3Fwpid%29+as+%3Fpathway%29+%28str%28%3Ftitle%29+as+%3FpathwayTitle%29+%28count%28distinct+%3FhgncId%29+AS+%3FGenesInPWs%29%0D%0Awhere+%7B%0D%0AVALUES+%3FhgncId+%7Bhgnc%3AGPD1L+hgnc%3ASCN3B+hgnc%3ABAD%7D%0D%0A++%3Fgene+a+wp%3AGeneProduct+%3B%0D%0A++++dcterms%3Aidentifier+%3Fid+%3B%0D%0A++++dcterms%3AisPartOf+%3FpathwayRes+%3B%0D%0A++++wp%3AbdbHgncSymbol+%3FhgncId+.%0D%0A++%3FpathwayRes+a+wp%3APathway+%3B%0D%0A++++++++++++++wp%3AorganismName+%22Homo+sapiens%22%5E%5Exsd%3Astring+%3B+%0D%0A++++dcterms%3Aidentifier+%3Fwpid+%3B%0D%0A++++dc%3Atitle+%3Ftitle+.%0D%0A%7D%0D%0A%0D%0AORDER+BY+DESC%28%3FGenesInPWs%29&format=text%2Fhtml&timeout=0&debug=on Execute] |
== Data statistics oriented queries == | == Data statistics oriented queries == | ||
Line 358: | Line 358: | ||
} GROUP BY ?label ORDER BY DESC(?count) | } GROUP BY ?label ORDER BY DESC(?count) | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=select+%28count%28distinct+%3Fmetabolite%29+as+%3Fcount%29+%28str%28%3Flabel%29+as+%3Fspecies%29+where+%7B%0D%0A++%3Fmetabolite+a+wp%3AMetabolite+%3B%0D%0A++++dcterms%3AisPartOf+%3Fpw+.%0D%0A++%3Fpw+dc%3Atitle+%3Ftitle+%3B%0D%0A++++wp%3Aorganism+%3Forganism+%3B%0D%0A++++wp%3AorganismName+%3Flabel+.%0D%0A%7D+GROUP+BY+%3Flabel+ORDER+BY+DESC%28%3Fcount%29&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=select+%28count%28distinct+%3Fmetabolite%29+as+%3Fcount%29+%28str%28%3Flabel%29+as+%3Fspecies%29+where+%7B%0D%0A++%3Fmetabolite+a+wp%3AMetabolite+%3B%0D%0A++++dcterms%3AisPartOf+%3Fpw+.%0D%0A++%3Fpw+dc%3Atitle+%3Ftitle+%3B%0D%0A++++wp%3Aorganism+%3Forganism+%3B%0D%0A++++wp%3AorganismName+%3Flabel+.%0D%0A%7D+GROUP+BY+%3Flabel+ORDER+BY+DESC%28%3Fcount%29&format=text%2Fhtml&timeout=0&debug=on Execute] |
== Interaction oriented queries == | == Interaction oriented queries == | ||
Line 380: | Line 380: | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=SELECT+DISTINCT+%3Finteraction+%3Fpathway++WHERE+%7B%0D%0A%0D%0A+++%3Fpathway+a+wp%3APathway+.%0D%0A+++%3Finteraction+dcterms%3AisPartOf+%3Fpathway+.+%0D%0A+++%3Finteraction+a+wp%3AInteraction+.+%0D%0A+++%3Finteraction+wp%3Aparticipants+%3Chttp%3A%2F%2Fidentifiers.org%2Fensembl%2FENSG00000125845%3E+.+++%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=SELECT+DISTINCT+%3Finteraction+%3Fpathway++WHERE+%7B%0D%0A%0D%0A+++%3Fpathway+a+wp%3APathway+.%0D%0A+++%3Finteraction+dcterms%3AisPartOf+%3Fpathway+.+%0D%0A+++%3Finteraction+a+wp%3AInteraction+.+%0D%0A+++%3Finteraction+wp%3Aparticipants+%3Chttp%3A%2F%2Fidentifiers.org%2Fensembl%2FENSG00000125845%3E+.+++%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== Find all datanodes (GeneProducts, Metabolites, Pathways) that are connected to a particular datanode via any type of interaction (wp:Interaction). === | === Find all datanodes (GeneProducts, Metabolites, Pathways) that are connected to a particular datanode via any type of interaction (wp:Interaction). === | ||
Line 394: | Line 394: | ||
</pre> | </pre> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=SELECT+DISTINCT+%3Fparticipants+%3FDataNodeLabel+%3Finteraction+WHERE+%7B%0D%0A+++%3Finteraction+a+wp%3AInteraction+.%0D%0A+++%0D%0A+++%3Finteraction+wp%3Aparticipants+%3Chttp%3A%2F%2Fidentifiers.org%2Fensembl%2FENSG00000125845%3E+.+++%0D%0A+++%3Finteraction+wp%3Aparticipants+%3Fparticipants+.%0D%0A+++%3Fparticipants+a+wp%3ADataNode+.%0D%0A+++%3Fparticipants+rdfs%3Alabel+%3FDataNodeLabel+.+++%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=SELECT+DISTINCT+%3Fparticipants+%3FDataNodeLabel+%3Finteraction+WHERE+%7B%0D%0A+++%3Finteraction+a+wp%3AInteraction+.%0D%0A+++%0D%0A+++%3Finteraction+wp%3Aparticipants+%3Chttp%3A%2F%2Fidentifiers.org%2Fensembl%2FENSG00000125845%3E+.+++%0D%0A+++%3Finteraction+wp%3Aparticipants+%3Fparticipants+.%0D%0A+++%3Fparticipants+a+wp%3ADataNode+.%0D%0A+++%3Fparticipants+rdfs%3Alabel+%3FDataNodeLabel+.+++%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== Get all interactions for a particular pathway. === | === Get all interactions for a particular pathway. === | ||
Line 411: | Line 411: | ||
</pre> | </pre> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=PREFIX+wp%3A++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0A%0D%0ASELECT+DISTINCT+%3Fpathway+%3Finteraction+++%0D%0AWHERE+%7B%0D%0A%0D%0A+++%3Fpathway+a+wp%3APathway+.%0D%0A+++%3Fpathway+dc%3Aidentifier+%3Chttp%3A%2F%2Fidentifiers.org%2Fwikipathways%2FWP1425%3E+.%0D%0A+++%3Finteraction+dcterms%3AisPartOf+%3Fpathway+.+%0D%0A+++%3Finteraction+a+wp%3AInteraction+.++%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=PREFIX+wp%3A++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0A%0D%0ASELECT+DISTINCT+%3Fpathway+%3Finteraction+++%0D%0AWHERE+%7B%0D%0A%0D%0A+++%3Fpathway+a+wp%3APathway+.%0D%0A+++%3Fpathway+dc%3Aidentifier+%3Chttp%3A%2F%2Fidentifiers.org%2Fwikipathways%2FWP1425%3E+.%0D%0A+++%3Finteraction+dcterms%3AisPartOf+%3Fpathway+.+%0D%0A+++%3Finteraction+a+wp%3AInteraction+.++%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== Get all interactions for a particular pathway and their participants. === | === Get all interactions for a particular pathway and their participants. === | ||
Line 431: | Line 431: | ||
</pre> | </pre> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=SELECT+DISTINCT+%3Fpathway+%3Finteraction+%3Fparticipants+%3FDataNodeLabel%0D%0AWHERE+%7B%0D%0A%0D%0A+++%3Fpathway+a+wp%3APathway+.%0D%0A+++%3Fpathway+dc%3Aidentifier+%3Chttp%3A%2F%2Fidentifiers.org%2Fwikipathways%2FWP1425%3E+.%0D%0A+++%3Finteraction+dcterms%3AisPartOf+%3Fpathway+.+%0D%0A+++%3Finteraction+a+wp%3AInteraction+.%0D%0A+++%3Finteraction+wp%3Aparticipants+%3Fparticipants+.%0D%0A+++%3Fparticipants+a+wp%3ADataNode+.%0D%0A+++%3Fparticipants+rdfs%3Alabel+%3FDataNodeLabel+.++%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=SELECT+DISTINCT+%3Fpathway+%3Finteraction+%3Fparticipants+%3FDataNodeLabel%0D%0AWHERE+%7B%0D%0A%0D%0A+++%3Fpathway+a+wp%3APathway+.%0D%0A+++%3Fpathway+dc%3Aidentifier+%3Chttp%3A%2F%2Fidentifiers.org%2Fwikipathways%2FWP1425%3E+.%0D%0A+++%3Finteraction+dcterms%3AisPartOf+%3Fpathway+.+%0D%0A+++%3Finteraction+a+wp%3AInteraction+.%0D%0A+++%3Finteraction+wp%3Aparticipants+%3Fparticipants+.%0D%0A+++%3Fparticipants+a+wp%3ADataNode+.%0D%0A+++%3Fparticipants+rdfs%3Alabel+%3FDataNodeLabel+.++%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== Get all Interactions. === | === Get all Interactions. === | ||
Line 453: | Line 453: | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=PREFIX+wp%3A++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0A%0D%0ASELECT+DISTINCT+%3Fpathway+%3Finteraction+%3Fparticipant%0D%0AWHERE+%7B%0D%0A%0D%0A+++%3Fpathway+a+wp%3APathway+.+%0D%0A+++%3Finteraction+dcterms%3AisPartOf+%3Fpathway+.%0D%0A+++%3Finteraction+a+wp%3AInteraction+.%0D%0A+++%3Finteraction+wp%3Aparticipants+%3Fparticipant+.+%0D%0A%7D%0D%0A%0D%0ALIMIT+1000&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=PREFIX+wp%3A++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0A%0D%0ASELECT+DISTINCT+%3Fpathway+%3Finteraction+%3Fparticipant%0D%0AWHERE+%7B%0D%0A%0D%0A+++%3Fpathway+a+wp%3APathway+.+%0D%0A+++%3Finteraction+dcterms%3AisPartOf+%3Fpathway+.%0D%0A+++%3Finteraction+a+wp%3AInteraction+.%0D%0A+++%3Finteraction+wp%3Aparticipants+%3Fparticipant+.+%0D%0A%7D%0D%0A%0D%0ALIMIT+1000&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== Get all Interactions for a species (Homo sapiens). === | === Get all Interactions for a species (Homo sapiens). === | ||
Line 471: | Line 471: | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=SELECT+DISTINCT+%3Fpathway+%3Finteraction+++%0D%0AWHERE+%7B%0D%0A%0D%0A+++%3Fpathway+a+wp%3APathway+.%0D%0A+++%3Fpathway+wp%3AorganismName+%22Homo+sapiens%22%5E%5Exsd%3Astring+.+%0D%0A+++%3Finteraction+dcterms%3AisPartOf+%3Fpathway+.+%0D%0A+++%3Finteraction+a+wp%3AInteraction+.++%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=SELECT+DISTINCT+%3Fpathway+%3Finteraction+++%0D%0AWHERE+%7B%0D%0A%0D%0A+++%3Fpathway+a+wp%3APathway+.%0D%0A+++%3Fpathway+wp%3AorganismName+%22Homo+sapiens%22%5E%5Exsd%3Astring+.+%0D%0A+++%3Finteraction+dcterms%3AisPartOf+%3Fpathway+.+%0D%0A+++%3Finteraction+a+wp%3AInteraction+.++%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] |
Line 497: | Line 497: | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=SELECT+DISTINCT+%3Fsource+%3Flabel+%3Ftarget+%3Flabel1+%3Fpathway+%3Finteraction%0D%0AWHERE+%7B%0D%0A++++%3Fsource+dc%3Aidentifier+%3Chttp%3A%2F%2Fidentifiers.org%2Fensembl%2FENSG00000125845%3E+.%0D%0A++++%3Fsource+dcterms%3AisPartOf+%3Fpathway+.%0D%0A++++%3Fpathway+a+wp%3APathway+.%0D%0A++++%3Finteraction+dcterms%3AisPartOf+%3Fpathway+.%0D%0A++++%3Finteraction+a+wp%3AInteraction+.%0D%0A++++%3Finteraction+wp%3Asource+%3Fsource+.%0D%0A%0D%0A++++%3Finteraction+wp%3Atarget+%3Ftarget+.%0D%0A++++%3Fsource+rdfs%3Alabel+%3Flabel+.%0D%0A++++%3Ftarget+rdfs%3Alabel+%3Flabel1+.%0D%0A+%7D&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=SELECT+DISTINCT+%3Fsource+%3Flabel+%3Ftarget+%3Flabel1+%3Fpathway+%3Finteraction%0D%0AWHERE+%7B%0D%0A++++%3Fsource+dc%3Aidentifier+%3Chttp%3A%2F%2Fidentifiers.org%2Fensembl%2FENSG00000125845%3E+.%0D%0A++++%3Fsource+dcterms%3AisPartOf+%3Fpathway+.%0D%0A++++%3Fpathway+a+wp%3APathway+.%0D%0A++++%3Finteraction+dcterms%3AisPartOf+%3Fpathway+.%0D%0A++++%3Finteraction+a+wp%3AInteraction+.%0D%0A++++%3Finteraction+wp%3Asource+%3Fsource+.%0D%0A%0D%0A++++%3Finteraction+wp%3Atarget+%3Ftarget+.%0D%0A++++%3Fsource+rdfs%3Alabel+%3Flabel+.%0D%0A++++%3Ftarget+rdfs%3Alabel+%3Flabel1+.%0D%0A+%7D&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== Get upstream adjacent nodes from a target. === | === Get upstream adjacent nodes from a target. === | ||
Line 522: | Line 522: | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=PREFIX+wp%3A++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0A%0D%0ASELECT+DISTINCT+%3Ftarget+%3Flabel1+%3Fsource+%3Flabel+%3Fpathway+%3Finteraction%0D%0AWHERE+%7B%0D%0A++++%3Ftarget+dc%3Aidentifier+%3Chttp%3A%2F%2Fidentifiers.org%2Fncbigene%2F659%3E+.%0D%0A++++%3Ftarget+dcterms%3AisPartOf+%3Fpathway+.%0D%0A++++%3Fpathway+a+wp%3APathway+.%0D%0A++++%3Finteraction+dcterms%3AisPartOf+%3Fpathway+.%0D%0A++++%3Finteraction+a+wp%3AInteraction+.%0D%0A++++%3Finteraction+wp%3Atarget+%3Ftarget+.%0D%0A%0D%0A++++%3Finteraction+wp%3Asource+%3Fsource+.%0D%0A++++%3Ftarget+rdfs%3Alabel+%3Flabel1+.%0D%0A++++%3Fsource+rdfs%3Alabel+%3Flabel+.%0D%0A++++%0D%0A+%7D&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=PREFIX+wp%3A++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0A%0D%0ASELECT+DISTINCT+%3Ftarget+%3Flabel1+%3Fsource+%3Flabel+%3Fpathway+%3Finteraction%0D%0AWHERE+%7B%0D%0A++++%3Ftarget+dc%3Aidentifier+%3Chttp%3A%2F%2Fidentifiers.org%2Fncbigene%2F659%3E+.%0D%0A++++%3Ftarget+dcterms%3AisPartOf+%3Fpathway+.%0D%0A++++%3Fpathway+a+wp%3APathway+.%0D%0A++++%3Finteraction+dcterms%3AisPartOf+%3Fpathway+.%0D%0A++++%3Finteraction+a+wp%3AInteraction+.%0D%0A++++%3Finteraction+wp%3Atarget+%3Ftarget+.%0D%0A%0D%0A++++%3Finteraction+wp%3Asource+%3Fsource+.%0D%0A++++%3Ftarget+rdfs%3Alabel+%3Flabel1+.%0D%0A++++%3Fsource+rdfs%3Alabel+%3Flabel+.%0D%0A++++%0D%0A+%7D&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== Get the number of interactions with some data source === | === Get the number of interactions with some data source === | ||
Line 565: | Line 565: | ||
?concept dc:source ?datasourceLit | ?concept dc:source ?datasourceLit | ||
} </pre> | } </pre> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=SELECT+DISTINCT+str%28%3FdatasourceLit%29+as+%3Fdatasource++%0D%0AWHERE+%7B%0D%0A+++++++++%3Fconcept+dc%3Asource+%3FdatasourceLit%0D%0A%7D+&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=SELECT+DISTINCT+str%28%3FdatasourceLit%29+as+%3Fdatasource++%0D%0AWHERE+%7B%0D%0A+++++++++%3Fconcept+dc%3Asource+%3FdatasourceLit%0D%0A%7D+&format=text%2Fhtml&timeout=0&debug=on Execute] |
===Get the number of entries per datasource in WikiPathways=== | ===Get the number of entries per datasource in WikiPathways=== | ||
Line 574: | Line 574: | ||
} | } | ||
ORDER BY DESC(?numberEntries)</pre> | ORDER BY DESC(?numberEntries)</pre> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=SELECT+DISTINCT+str%28%3FdatasourceLit%29+as+%3Fdatasource+count%28%3FdataNode%29+as+%3FnumberEntries+%0D%0AWHERE+%7B%0D%0A++%3Fconcept+dc%3Asource+%3FdatasourceLit+%3B%0D%0A++++wp%3AisAbout+%3FdataNode+.%0D%0A%7D+%0D%0AORDER+BY+DESC%28%3FnumberEntries%29%0D%0A&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=SELECT+DISTINCT+str%28%3FdatasourceLit%29+as+%3Fdatasource+count%28%3FdataNode%29+as+%3FnumberEntries+%0D%0AWHERE+%7B%0D%0A++%3Fconcept+dc%3Asource+%3FdatasourceLit+%3B%0D%0A++++wp%3AisAbout+%3FdataNode+.%0D%0A%7D+%0D%0AORDER+BY+DESC%28%3FnumberEntries%29%0D%0A&format=text%2Fhtml&timeout=0&debug=on Execute] |
===Count the identifiers per data source=== | ===Count the identifiers per data source=== | ||
Line 583: | Line 583: | ||
?concept dc:identifier ?identifier | ?concept dc:identifier ?identifier | ||
} </pre> | } </pre> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=SELECT+str%28%3FdatasourceLit%29+as+%3Fdatasource+count%28distinct+%3Fidentifier%29+AS+%3FnumberEntries+%0D%0AWHERE+%7B%0D%0A++%3Fconcept+dc%3Asource+%3FdatasourceLit+.%0D%0A++%3Fconcept+dc%3Aidentifier+%3Fidentifier%0D%0A%7D+&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=SELECT+str%28%3FdatasourceLit%29+as+%3Fdatasource+count%28distinct+%3Fidentifier%29+AS+%3FnumberEntries+%0D%0AWHERE+%7B%0D%0A++%3Fconcept+dc%3Asource+%3FdatasourceLit+.%0D%0A++%3Fconcept+dc%3Aidentifier+%3Fidentifier%0D%0A%7D+&format=text%2Fhtml&timeout=0&debug=on Execute] |
===Count the identifiers per data source and order them from high to low=== | ===Count the identifiers per data source and order them from high to low=== | ||
Line 592: | Line 592: | ||
?concept dc:identifier ?identifier | ?concept dc:identifier ?identifier | ||
} ORDER BY DESC(?numberEntries)</pre> | } ORDER BY DESC(?numberEntries)</pre> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=SELECT+str%28%3FdatasourceLit%29+as+%3Fdatasource+count%28distinct+%3Fidentifier%29+AS+%3FnumberEntries+%0D%0AWHERE+%7B%0D%0A++%3Fconcept+dc%3Asource+%3FdatasourceLit+.%0D%0A++%3Fconcept+dc%3Aidentifier+%3Fidentifier%0D%0A%7D+ORDER+BY+DESC%28%3FnumberEntries%29&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=SELECT+str%28%3FdatasourceLit%29+as+%3Fdatasource+count%28distinct+%3Fidentifier%29+AS+%3FnumberEntries+%0D%0AWHERE+%7B%0D%0A++%3Fconcept+dc%3Asource+%3FdatasourceLit+.%0D%0A++%3Fconcept+dc%3Aidentifier+%3Fidentifier%0D%0A%7D+ORDER+BY+DESC%28%3FnumberEntries%29&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== Return all compounds annotated with the "ChEMBL compound" as data source and the pathways they are in === | === Return all compounds annotated with the "ChEMBL compound" as data source and the pathways they are in === | ||
Line 602: | Line 602: | ||
} </pre> | } </pre> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=SELECT+DISTINCT+%3Fidentifier+%3Fpathway%0D%0AWHERE+%7B%0D%0A++++++++%3Fconcept+dcterms%3AisPartOf+%3Fpathway+.%0D%0A++++++++%3Fconcept+dc%3Asource+%22ChEMBL+compound%22%5E%5Exsd%3Astring+.%0D%0A++++++++%3Fconcept+dc%3Aidentifier+%3Fidentifier+.%0D%0A++++++++%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=SELECT+DISTINCT+%3Fidentifier+%3Fpathway%0D%0AWHERE+%7B%0D%0A++++++++%3Fconcept+dcterms%3AisPartOf+%3Fpathway+.%0D%0A++++++++%3Fconcept+dc%3Asource+%22ChEMBL+compound%22%5E%5Exsd%3Astring+.%0D%0A++++++++%3Fconcept+dc%3Aidentifier+%3Fidentifier+.%0D%0A++++++++%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] |
== Curators oriented queries == | == Curators oriented queries == | ||
Line 614: | Line 614: | ||
?concept rdfs:label ?label | ?concept rdfs:label ?label | ||
} </pre> | } </pre> | ||
- | [http://sparqlbin.com/#c0b65b9658401dca047f9c7b482c670a sparqlbin] [http://sparql.wikipathways.org/?default-graph-uri=&query=PREFIX+rdf%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0D%0APREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0APREFIX+dc%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E%0D%0APREFIX+foaf%3A+%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0D%0APREFIX+schema%3A+%3Chttp%3A%2F%2Fschema.org%2F%3E%0D%0APREFIX+dcterms%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0D%0APREFIX+xsd%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%0D%0A%0D%0ASELECT+DISTINCT++%3Fidentifier+%3Fpathway+%3Flabel%0D%0AWHERE+%7B%0D%0A++++++++%3Fconcept+dc%3Asource+%22null%22%5E%5Exsd%3Astring+.%0D%0A++++++++%3Fconcept+dc%3Aidentifier+%3Fidentifier+.%0D%0A++++++++%3Fconcept+dcterms%3AisPartOf+%3Fpathway+.%0D%0A++++++++%3Fconcept+rdfs%3Alabel+%3Flabel%0D%0A%7D+%0D%0A%0D%0A++++&format=text%2Fhtml&timeout=30000 Execute] | + | [http://sparqlbin.com/#c0b65b9658401dca047f9c7b482c670a sparqlbin] [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=PREFIX+rdf%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0D%0APREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0APREFIX+dc%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E%0D%0APREFIX+foaf%3A+%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0D%0APREFIX+schema%3A+%3Chttp%3A%2F%2Fschema.org%2F%3E%0D%0APREFIX+dcterms%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0D%0APREFIX+xsd%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%0D%0A%0D%0ASELECT+DISTINCT++%3Fidentifier+%3Fpathway+%3Flabel%0D%0AWHERE+%7B%0D%0A++++++++%3Fconcept+dc%3Asource+%22null%22%5E%5Exsd%3Astring+.%0D%0A++++++++%3Fconcept+dc%3Aidentifier+%3Fidentifier+.%0D%0A++++++++%3Fconcept+dcterms%3AisPartOf+%3Fpathway+.%0D%0A++++++++%3Fconcept+rdfs%3Alabel+%3Flabel%0D%0A%7D+%0D%0A%0D%0A++++&format=text%2Fhtml&timeout=30000 Execute] |
=== Get all geneproducts that lack either a DataSource or an Identifier=== | === Get all geneproducts that lack either a DataSource or an Identifier=== | ||
Line 630: | Line 630: | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=prefix+wp%3A++++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0Aprefix+rdfs%3A++++%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0Aprefix+dcterms%3A++%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0D%0A%0D%0Aselect+distinct+%3Fpathway+%3Flabel+where+%7B%3FgeneProduct+a+wp%3AGeneProduct+.+%0D%0A++++++%3FgeneProduct+rdfs%3Alabel+%3Flabel+.%0D%0A++++++%3FgeneProduct+dcterms%3AisPartOf+%3Fpathway+.%0D%0A++++++%0D%0A++++++FILTER+regex%28str%28%3FgeneProduct%29%2C+%22%5Enode%22%29.+%0D%0A++++++FILTER+regex%28str%28%3Fpathway%29%2C+%22%5Ehttp%22%29.%0D%0A++++++%7D&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=prefix+wp%3A++++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0Aprefix+rdfs%3A++++%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0Aprefix+dcterms%3A++%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0D%0A%0D%0Aselect+distinct+%3Fpathway+%3Flabel+where+%7B%3FgeneProduct+a+wp%3AGeneProduct+.+%0D%0A++++++%3FgeneProduct+rdfs%3Alabel+%3Flabel+.%0D%0A++++++%3FgeneProduct+dcterms%3AisPartOf+%3Fpathway+.%0D%0A++++++%0D%0A++++++FILTER+regex%28str%28%3FgeneProduct%29%2C+%22%5Enode%22%29.+%0D%0A++++++FILTER+regex%28str%28%3Fpathway%29%2C+%22%5Ehttp%22%29.%0D%0A++++++%7D&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== Get entities with more than one identifier === | === Get entities with more than one identifier === | ||
Line 639: | Line 639: | ||
} order by desc(?count) | } order by desc(?count) | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=select+%3Fentity+count%28%3Fidentifier%29+as+%3Fcount+where+%7B%0D%0A++%3Fentity+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2Fidentifier%3E+%3Fidentifier+.%0D%0A%7D+order+by+desc%28%3Fcount%29+&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=select+%3Fentity+count%28%3Fidentifier%29+as+%3Fcount+where+%7B%0D%0A++%3Fentity+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2Fidentifier%3E+%3Fidentifier+.%0D%0A%7D+order+by+desc%28%3Fcount%29+&format=text%2Fhtml&timeout=0&debug=on Execute] |
Line 689: | Line 689: | ||
</pre> | </pre> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=prefix+wp%3A++++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0Aprefix+rdfs%3A++++%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0Aprefix+dcterms%3A++%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0D%0A%0D%0Aselect+distinct+str%28%3FidentifierStr%29+as+%3Fidentifier%0D%0Awhere+%7B%0D%0A++%3Fmb+a+wp%3AMetabolite+%3B%0D%0A++++dc%3Asource+%22HMDB%22%5E%5Exsd%3Astring+%3B%0D%0A++++dcterms%3Aidentifier+%3FidentifierStr+.%0D%0A++OPTIONAL+%7B+%3Fmb++wp%3AbdbHmdb+%3Fbridgedb+.+%7D%0D%0A++FILTER+%28%21BOUND%28%3Fbridgedb%29%29%0D%0A%7D+order+by+%3FidentifierStr&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=prefix+wp%3A++++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0Aprefix+rdfs%3A++++%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0Aprefix+dcterms%3A++%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0D%0A%0D%0Aselect+distinct+str%28%3FidentifierStr%29+as+%3Fidentifier%0D%0Awhere+%7B%0D%0A++%3Fmb+a+wp%3AMetabolite+%3B%0D%0A++++dc%3Asource+%22HMDB%22%5E%5Exsd%3Astring+%3B%0D%0A++++dcterms%3Aidentifier+%3FidentifierStr+.%0D%0A++OPTIONAL+%7B+%3Fmb++wp%3AbdbHmdb+%3Fbridgedb+.+%7D%0D%0A++FILTER+%28%21BOUND%28%3Fbridgedb%29%29%0D%0A%7D+order+by+%3FidentifierStr&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== Metabolites not classified as such === | === Metabolites not classified as such === | ||
Line 707: | Line 707: | ||
</pre> | </pre> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=prefix+wp%3A++++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0Aprefix+rdfs%3A++++%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0Aprefix+dcterms%3A++%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0D%0A%0D%0Aselect+str%28%3FdatasourceLit%29+as+%3Fdatasource+count%28%3Fidentifier%29+as+%3Fcount%0D%0Awhere+%7B%0D%0A++%3Fmb+dc%3Asource+%3FdatasourceLit+%3B%0D%0A++++dcterms%3Aidentifier+%3Fidentifier+.%0D%0A++FILTER+NOT+EXISTS+%7B+%3Fmb+a+wp%3AMetabolite+%7D%0D%0A%7D+order+by+desc%28%3Fcount%29&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=prefix+wp%3A++++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0Aprefix+rdfs%3A++++%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0Aprefix+dcterms%3A++%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0D%0A%0D%0Aselect+str%28%3FdatasourceLit%29+as+%3Fdatasource+count%28%3Fidentifier%29+as+%3Fcount%0D%0Awhere+%7B%0D%0A++%3Fmb+dc%3Asource+%3FdatasourceLit+%3B%0D%0A++++dcterms%3Aidentifier+%3Fidentifier+.%0D%0A++FILTER+NOT+EXISTS+%7B+%3Fmb+a+wp%3AMetabolite+%7D%0D%0A%7D+order+by+desc%28%3Fcount%29&format=text%2Fhtml&timeout=0&debug=on Execute] |
That mostly lists gene identifier sources, etc, but watch out for the metabolite identifier data sources. For example, metabolites not marked as such but with a metabolite identifier can be found this way. Down the list is CAS (but genes are chemicals too...), and a few minor more: | That mostly lists gene identifier sources, etc, but watch out for the metabolite identifier data sources. For example, metabolites not marked as such but with a metabolite identifier can be found this way. Down the list is CAS (but genes are chemicals too...), and a few minor more: | ||
Line 746: | Line 746: | ||
</pre> | </pre> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=prefix+wp%3A++++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0Aprefix+rdfs%3A++++%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0Aprefix+dcterms%3A++%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0D%0Aprefix+xsd%3A+++++%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%0D%0A%0D%0Aselect+%3Fpathway+%3Fnonmb+%3Fmb+str%28%3FlabelLit%29+as+%3Flabel%0D%0Awhere+{%0D%0A++%3Fnonmb+rdfs%3Alabel+%3FlabelLit+.%0D%0A++%3Fmb+rdfs%3Alabel+%3FlabelLit+.%0D%0A++%3Fnonmb+dcterms%3AisPartOf+%3Fpathway+.%0D%0A++FILTER+%28+%3Fnonmb+!%3D+%3Fmb+%29%0D%0A++FILTER+NOT+EXISTS+{+%3Fnonmb+a+wp%3AMetabolite+}%0D%0A++FILTER+EXISTS+{+%3Fpathway+a+wp%3APathway+}%0D%0A++FILTER+EXISTS+{+%3Fmb+a+wp%3AMetabolite+}%0D%0A++FILTER+%28!regex%28str%28%3Fnonmb%29%2C++%22noIdentifier%22%2C+%22i%22%29%29%0D%0A++FILTER+%28!regex%28str%28%3Fmb%29%2C++%22noIdentifier%22%2C+%22i%22%29%29%0D%0A}&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=prefix+wp%3A++++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0Aprefix+rdfs%3A++++%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0Aprefix+dcterms%3A++%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0D%0Aprefix+xsd%3A+++++%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%0D%0A%0D%0Aselect+%3Fpathway+%3Fnonmb+%3Fmb+str%28%3FlabelLit%29+as+%3Flabel%0D%0Awhere+{%0D%0A++%3Fnonmb+rdfs%3Alabel+%3FlabelLit+.%0D%0A++%3Fmb+rdfs%3Alabel+%3FlabelLit+.%0D%0A++%3Fnonmb+dcterms%3AisPartOf+%3Fpathway+.%0D%0A++FILTER+%28+%3Fnonmb+!%3D+%3Fmb+%29%0D%0A++FILTER+NOT+EXISTS+{+%3Fnonmb+a+wp%3AMetabolite+}%0D%0A++FILTER+EXISTS+{+%3Fpathway+a+wp%3APathway+}%0D%0A++FILTER+EXISTS+{+%3Fmb+a+wp%3AMetabolite+}%0D%0A++FILTER+%28!regex%28str%28%3Fnonmb%29%2C++%22noIdentifier%22%2C+%22i%22%29%29%0D%0A++FILTER+%28!regex%28str%28%3Fmb%29%2C++%22noIdentifier%22%2C+%22i%22%29%29%0D%0A}&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== Metabolites with too many labels === | === Metabolites with too many labels === | ||
Line 766: | Line 766: | ||
</pre> | </pre> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=prefix+wp%3A++++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0Aprefix+rdfs%3A++++%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0Aprefix+dcterms%3A++%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0D%0A%0D%0Aselect+distinct+%3Fmb+count%28distinct+%3FlabelLit%29+as+%3FlabelCount%0D%0Awhere+{%0D%0A++%3Fmb+a+wp%3AMetabolite+%3B%0D%0A++++rdfs%3Alabel+%3FlabelLit+%3B%0D%0A++++dcterms%3AisPartOf+%3Fpathway+.%0D%0A++%3Fpathway+a+wp%3APathway+.%0D%0A}+order+by+desc%28%3FlabelCount%29+%3Fmb+&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=prefix+wp%3A++++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0Aprefix+rdfs%3A++++%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0Aprefix+dcterms%3A++%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0D%0A%0D%0Aselect+distinct+%3Fmb+count%28distinct+%3FlabelLit%29+as+%3FlabelCount%0D%0Awhere+{%0D%0A++%3Fmb+a+wp%3AMetabolite+%3B%0D%0A++++rdfs%3Alabel+%3FlabelLit+%3B%0D%0A++++dcterms%3AisPartOf+%3Fpathway+.%0D%0A++%3Fpathway+a+wp%3APathway+.%0D%0A}+order+by+desc%28%3FlabelCount%29+%3Fmb+&format=text%2Fhtml&timeout=0&debug=on Execute] |
And get the actual labels (and more) with: | And get the actual labels (and more) with: | ||
Line 774: | Line 774: | ||
</pre> | </pre> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=describe+%3Chttp%3A%2F%2Fidentifiers.org%2Fhmdb%2FHMDB02174%3E&format=text%2Fx-html%2Bul&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=describe+%3Chttp%3A%2F%2Fidentifiers.org%2Fhmdb%2FHMDB02174%3E&format=text%2Fx-html%2Bul&timeout=0&debug=on Execute] |
Or use this one, but mind that pathway/label combinations are combinatorial, because they share the same node: | Or use this one, but mind that pathway/label combinations are combinatorial, because they share the same node: | ||
Line 788: | Line 788: | ||
</pre> | </pre> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=select+distinct+%3Fpathway+str%28%3FlabelLit%29+as+%3Flabel%0D%0Awhere+{%0D%0A++%3Chttp%3A%2F%2Fidentifiers.org%2Fhmdb%2FHMDB01401%3E+a+wp%3AMetabolite%3B%0D%0A++++rdfs%3Alabel+%3FlabelLit+%3B%0D%0A++++dcterms%3AisPartOf+%3Fpathway+.%0D%0A++%3Fpathway+a+wp%3APathway+.%0D%0A}+order+by+%3Fpathway&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=select+distinct+%3Fpathway+str%28%3FlabelLit%29+as+%3Flabel%0D%0Awhere+{%0D%0A++%3Chttp%3A%2F%2Fidentifiers.org%2Fhmdb%2FHMDB01401%3E+a+wp%3AMetabolite%3B%0D%0A++++rdfs%3Alabel+%3FlabelLit+%3B%0D%0A++++dcterms%3AisPartOf+%3Fpathway+.%0D%0A++%3Fpathway+a+wp%3APathway+.%0D%0A}+order+by+%3Fpathway&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== Metabolites with an Entrez Gene identifier === | === Metabolites with an Entrez Gene identifier === | ||
Line 809: | Line 809: | ||
</pre> | </pre> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=prefix+wp%3A++++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0Aprefix+rdfs%3A++++%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0Aprefix+dcterms%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0D%0Aprefix+xsd%3A+++++%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%0D%0A%0D%0Aselect+distinct+%3Fpathway+%3Fmb+str%28%3FlabelLit%29+as+%3Flabel+str%28%3FidentifierLit%29+as+%3Fidentifier+%0D%0Awhere+%7B%0D%0A++%3Fmb+a+wp%3AMetabolite+%3B%0D%0A++++rdfs%3Alabel+%3FlabelLit+%3B%0D%0A++++dc%3Asource+%22LIPID+MAPS%22%5E%5Exsd%3Astring+%3B%0D%0A++++dcterms%3Aidentifier+%3FidentifierLit+%3B%0D%0A++++dcterms%3AisPartOf+%3Fpathway+.%0D%0A++%3Fpathway+a+wp%3APathway+.%0D%0A%7D+order+by+%3Fpathway%0D%0A&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=prefix+wp%3A++++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0Aprefix+rdfs%3A++++%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0Aprefix+dcterms%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0D%0Aprefix+xsd%3A+++++%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%0D%0A%0D%0Aselect+distinct+%3Fpathway+%3Fmb+str%28%3FlabelLit%29+as+%3Flabel+str%28%3FidentifierLit%29+as+%3Fidentifier+%0D%0Awhere+%7B%0D%0A++%3Fmb+a+wp%3AMetabolite+%3B%0D%0A++++rdfs%3Alabel+%3FlabelLit+%3B%0D%0A++++dc%3Asource+%22LIPID+MAPS%22%5E%5Exsd%3Astring+%3B%0D%0A++++dcterms%3Aidentifier+%3FidentifierLit+%3B%0D%0A++++dcterms%3AisPartOf+%3Fpathway+.%0D%0A++%3Fpathway+a+wp%3APathway+.%0D%0A%7D+order+by+%3Fpathway%0D%0A&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== Metabolites without a link to Wikidata === | === Metabolites without a link to Wikidata === | ||
Line 823: | Line 823: | ||
</pre> | </pre> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=PREFIX+wdt%3A+%3Chttp%3A%2F%2Fwww.wikidata.org%2Fprop%2Fdirect%2F%3E%0D%0A%0D%0ASELECT+DISTINCT+%3Fmetabolite+WHERE+%7B%0D%0A++%3Fmetabolite+a+wp%3AMetabolite+.%0D%0A++OPTIONAL+%7B+%3Fmetabolite+wp%3AbdbWikidata+%3Fwikidata+.+%7D%0D%0A++FILTER+%28%21BOUND%28%3Fwikidata%29%29%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=PREFIX+wdt%3A+%3Chttp%3A%2F%2Fwww.wikidata.org%2Fprop%2Fdirect%2F%3E%0D%0A%0D%0ASELECT+DISTINCT+%3Fmetabolite+WHERE+%7B%0D%0A++%3Fmetabolite+a+wp%3AMetabolite+.%0D%0A++OPTIONAL+%7B+%3Fmetabolite+wp%3AbdbWikidata+%3Fwikidata+.+%7D%0D%0A++FILTER+%28%21BOUND%28%3Fwikidata%29%29%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] |
A variant sorting the metabolites by the number of pathways they occur in: | A variant sorting the metabolites by the number of pathways they occur in: | ||
Line 840: | Line 840: | ||
</pre> | </pre> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=PREFIX+wdt%3A+%3Chttp%3A%2F%2Fwww.wikidata.org%2Fprop%2Fdirect%2F%3E%0D%0A%0D%0ASELECT+%3Fmetabolite+%28count%28DISTINCT+%3FpathwayRes%29+as+%3Fpathways%29+WHERE+%7B%0D%0A++%3Fmetabolite+a+wp%3AMetabolite+%3B%0D%0A++++dcterms%3Aidentifier+%3Fid+%3B%0D%0A++++dcterms%3AisPartOf+%3FpathwayRes+.%0D%0A++%3FpathwayRes+a+wp%3APathway+.%0D%0A++OPTIONAL+%7B+%3Fmetabolite+wp%3AbdbWikidata+%3Fwikidata+.+%7D%0D%0A++FILTER+%28%21BOUND%28%3Fwikidata%29%29%0D%0A%7D+GROUP+BY+%3Fmetabolite+ORDER+BY+DESC%28%3Fpathways%29%0D%0A&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=PREFIX+wdt%3A+%3Chttp%3A%2F%2Fwww.wikidata.org%2Fprop%2Fdirect%2F%3E%0D%0A%0D%0ASELECT+%3Fmetabolite+%28count%28DISTINCT+%3FpathwayRes%29+as+%3Fpathways%29+WHERE+%7B%0D%0A++%3Fmetabolite+a+wp%3AMetabolite+%3B%0D%0A++++dcterms%3Aidentifier+%3Fid+%3B%0D%0A++++dcterms%3AisPartOf+%3FpathwayRes+.%0D%0A++%3FpathwayRes+a+wp%3APathway+.%0D%0A++OPTIONAL+%7B+%3Fmetabolite+wp%3AbdbWikidata+%3Fwikidata+.+%7D%0D%0A++FILTER+%28%21BOUND%28%3Fwikidata%29%29%0D%0A%7D+GROUP+BY+%3Fmetabolite+ORDER+BY+DESC%28%3Fpathways%29%0D%0A&format=text%2Fhtml&timeout=0&debug=on Execute] |
And finally, finding double mappings to Wikidata: | And finally, finding double mappings to Wikidata: | ||
Line 856: | Line 856: | ||
</pre> | </pre> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=PREFIX+wdt%3A+%3Chttp%3A%2F%2Fwww.wikidata.org%2Fprop%2Fdirect%2F%3E%0D%0A%0D%0ASELECT+DISTINCT+%3FmetaboliteID+%28GROUP_CONCAT%28DISTINCT+%3Fwikidata%3Bseparator%3D%22%2C+%22%29+AS+%3Fresults%29+WHERE+%7B%0D%0A++%3FmetaboliteID+a+wp%3AMetabolite+.%0D%0A++%3FmetaboliteID+wp%3AbdbWikidata+%3Fwikidata+.%0D%0A++%3FmetaboliteID+wp%3AbdbWikidata+%3Fwikidata2+.%0D%0A++FILTER%28%3Fwikidata+%21%3D+%3Fwikidata2%29%0D%0A%7D+GROUP+BY+%3FmetaboliteID&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=PREFIX+wdt%3A+%3Chttp%3A%2F%2Fwww.wikidata.org%2Fprop%2Fdirect%2F%3E%0D%0A%0D%0ASELECT+DISTINCT+%3FmetaboliteID+%28GROUP_CONCAT%28DISTINCT+%3Fwikidata%3Bseparator%3D%22%2C+%22%29+AS+%3Fresults%29+WHERE+%7B%0D%0A++%3FmetaboliteID+a+wp%3AMetabolite+.%0D%0A++%3FmetaboliteID+wp%3AbdbWikidata+%3Fwikidata+.%0D%0A++%3FmetaboliteID+wp%3AbdbWikidata+%3Fwikidata2+.%0D%0A++FILTER%28%3Fwikidata+%21%3D+%3Fwikidata2%29%0D%0A%7D+GROUP+BY+%3FmetaboliteID&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== Pathways without (annotated) datanodes === | === Pathways without (annotated) datanodes === | ||
Line 873: | Line 873: | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=prefix+wp%3A++++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0Aprefix+rdfs%3A++++%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0Aprefix+dcterms%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0D%0Aprefix+xsd%3A+++++%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%0D%0A%0D%0ASELECT+DISTINCT+%3Fpathway%0D%0AWHERE%7B%0D%0A%3Fpathway+a+wp%3APathway.%0D%0AFILTER+NOT+EXISTS+%7B%3Fnode+dcterms%3AisPartOf+%3Fpathway.%0D%0A%3Fnode+a+wp%3ADataNode%7D%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=prefix+wp%3A++++++%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23%3E%0D%0Aprefix+rdfs%3A++++%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0Aprefix+dcterms%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0D%0Aprefix+xsd%3A+++++%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%0D%0A%0D%0ASELECT+DISTINCT+%3Fpathway%0D%0AWHERE%7B%0D%0A%3Fpathway+a+wp%3APathway.%0D%0AFILTER+NOT+EXISTS+%7B%3Fnode+dcterms%3AisPartOf+%3Fpathway.%0D%0A%3Fnode+a+wp%3ADataNode%7D%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== Pathways without literature references === | === Pathways without literature references === | ||
Line 885: | Line 885: | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=SELECT+%28STR%28%3FspeciesLabelLit%29+AS+%3Fspecies%29+%28STR%28%3FtitleLit%29+AS+%3Ftitle%29+%3Fpathway+WHERE+%7B%0D%0A++%3Fpathway+a+wp%3APathway+%3B+dc%3Atitle+%3FtitleLit+%3B+wp%3AorganismName+%3FspeciesLabelLit+.%0D%0A++MINUS+%7B+%3Fpubmed+a+++++++wp%3APublicationReference+.%0D%0A++++++++++%3Fpubmed+dcterms%3AisPartOf+%3Fpathway+%7D%0D%0A%7D+ORDER+BY+ASC%28%3Fspecies%29+ASC%28%3Ftitle%29&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=SELECT+%28STR%28%3FspeciesLabelLit%29+AS+%3Fspecies%29+%28STR%28%3FtitleLit%29+AS+%3Ftitle%29+%3Fpathway+WHERE+%7B%0D%0A++%3Fpathway+a+wp%3APathway+%3B+dc%3Atitle+%3FtitleLit+%3B+wp%3AorganismName+%3FspeciesLabelLit+.%0D%0A++MINUS+%7B+%3Fpubmed+a+++++++wp%3APublicationReference+.%0D%0A++++++++++%3Fpubmed+dcterms%3AisPartOf+%3Fpathway+%7D%0D%0A%7D+ORDER+BY+ASC%28%3Fspecies%29+ASC%28%3Ftitle%29&format=text%2Fhtml&timeout=0&debug=on Execute] |
Or if you just want to know how many these are: | Or if you just want to know how many these are: | ||
Line 896: | Line 896: | ||
}</PRE> | }</PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=SELECT+count%28DISTINCT+%3Fpathway%29+WHERE+%7B%0D%0A++%3Fpathway+a+wp%3APathway+%3B+dc%3Atitle+%3FtitleLit+%3B+wp%3AorganismName+%3FspeciesLabelLit+.%0D%0A++MINUS+%7B+%3Fpubmed+a+++++++wp%3APublicationReference+.%0D%0A++++++++++%3Fpubmed+dcterms%3AisPartOf+%3Fpathway+%7D%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=SELECT+count%28DISTINCT+%3Fpathway%29+WHERE+%7B%0D%0A++%3Fpathway+a+wp%3APathway+%3B+dc%3Atitle+%3FtitleLit+%3B+wp%3AorganismName+%3FspeciesLabelLit+.%0D%0A++MINUS+%7B+%3Fpubmed+a+++++++wp%3APublicationReference+.%0D%0A++++++++++%3Fpubmed+dcterms%3AisPartOf+%3Fpathway+%7D%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] |
== Literature queries == | == Literature queries == | ||
Line 912: | Line 912: | ||
} | } | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=PREFIX+cur%3A+%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23Curation%3A%3E%0D%0A%0D%0ASELECT+%28COUNT%28DISTINCT+%3Fpubmed%29+AS+%3Fcount%29%0D%0AWHERE+%7B%0D%0A++%3Fpubmed+a+++++++wp%3APublicationReference+.%0D%0A++MINUS+%7B+%3Fpubmed+dcterms%3AisPartOf%2Fwp%3AontologyTag+cur%3AAnalysisCollection+%7D%0D%0A++%7B+%3Fpubmed+dcterms%3AisPartOf%2Fwp%3AontologyTag+cur%3AReactome_Approved+%7D%0D%0A%7D%0D%0A&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=PREFIX+cur%3A+%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23Curation%3A%3E%0D%0A%0D%0ASELECT+%28COUNT%28DISTINCT+%3Fpubmed%29+AS+%3Fcount%29%0D%0AWHERE+%7B%0D%0A++%3Fpubmed+a+++++++wp%3APublicationReference+.%0D%0A++MINUS+%7B+%3Fpubmed+dcterms%3AisPartOf%2Fwp%3AontologyTag+cur%3AAnalysisCollection+%7D%0D%0A++%7B+%3Fpubmed+dcterms%3AisPartOf%2Fwp%3AontologyTag+cur%3AReactome_Approved+%7D%0D%0A%7D%0D%0A&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== Articles cited by WikiPathways but not by Reactome === | === Articles cited by WikiPathways but not by Reactome === | ||
Line 926: | Line 926: | ||
} | } | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=PREFIX+cur%3A+%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23Curation%3A%3E%0D%0A%0D%0ASELECT+%28COUNT%28DISTINCT+%3Fpubmed%29+AS+%3Fcount%29%0D%0AWHERE+%7B%0D%0A++%3Fpubmed+a+++++++wp%3APublicationReference+.%0D%0A++%7B+%3Fpubmed+dcterms%3AisPartOf%2Fwp%3AontologyTag+cur%3AAnalysisCollection+%7D%0D%0A++MINUS+%7B+%3Fpubmed+dcterms%3AisPartOf%2Fwp%3AontologyTag+cur%3AReactome_Approved+%7D%0D%0A%7D%0D%0A&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=PREFIX+cur%3A+%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23Curation%3A%3E%0D%0A%0D%0ASELECT+%28COUNT%28DISTINCT+%3Fpubmed%29+AS+%3Fcount%29%0D%0AWHERE+%7B%0D%0A++%3Fpubmed+a+++++++wp%3APublicationReference+.%0D%0A++%7B+%3Fpubmed+dcterms%3AisPartOf%2Fwp%3AontologyTag+cur%3AAnalysisCollection+%7D%0D%0A++MINUS+%7B+%3Fpubmed+dcterms%3AisPartOf%2Fwp%3AontologyTag+cur%3AReactome_Approved+%7D%0D%0A%7D%0D%0A&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== Articles cited by both Reactome and WikiPathways === | === Articles cited by both Reactome and WikiPathways === | ||
Line 940: | Line 940: | ||
} | } | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=PREFIX+cur%3A+%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23Curation%3A%3E%0D%0A%0D%0ASELECT+%28COUNT%28DISTINCT+%3Fpubmed%29+AS+%3Fcount%29%0D%0AWHERE+%7B%0D%0A++%3Fpubmed+a+++++++wp%3APublicationReference+.%0D%0A++%7B+%3Fpubmed+dcterms%3AisPartOf%2Fwp%3AontologyTag+cur%3AAnalysisCollection+%7D%0D%0A++%7B+%3Fpubmed+dcterms%3AisPartOf%2Fwp%3AontologyTag+cur%3AReactome_Approved+%7D%0D%0A%7D%0D%0A&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=PREFIX+cur%3A+%3Chttp%3A%2F%2Fvocabularies.wikipathways.org%2Fwp%23Curation%3A%3E%0D%0A%0D%0ASELECT+%28COUNT%28DISTINCT+%3Fpubmed%29+AS+%3Fcount%29%0D%0AWHERE+%7B%0D%0A++%3Fpubmed+a+++++++wp%3APublicationReference+.%0D%0A++%7B+%3Fpubmed+dcterms%3AisPartOf%2Fwp%3AontologyTag+cur%3AAnalysisCollection+%7D%0D%0A++%7B+%3Fpubmed+dcterms%3AisPartOf%2Fwp%3AontologyTag+cur%3AReactome_Approved+%7D%0D%0A%7D%0D%0A&format=text%2Fhtml&timeout=0&debug=on Execute] |
== Federated queries - !Under Construction!== | == Federated queries - !Under Construction!== | ||
Line 978: | Line 978: | ||
} | } | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=PREFIX+chembl%3A+%3Chttp%3A%2F%2Frdf.ebi.ac.uk%2Fterms%2Fchembl%23%3E%0D%0A%0D%0ASELECT+%3Fpathway+%3Fchembluniprot+%3Fassay+WHERE+%7B%0D%0A++%7B%0D%0A++++SELECT+DISTINCT%0D%0A++++++%3Fpathway%0D%0A++++++iri%28%0D%0A++++++++bif%3Aconcat%28%22http%3A%2F%2Fpurl.uniprot.org%2Funiprot%2F%22%2C%0D%0A++++++++bif%3Aregexp_substr%28%27http%3A%2F%2Fidentifiers.org%2Funiprot%2F%28.*%29%27%2C%3Funiprot%2C+1%29%29%0D%0A++++++%29+as+%3Fchembluniprot%0D%0A++++WHERE+%7B%0D%0A++++++VALUES+%3Ftype+%7B+wp%3AProtein+wp%3AGeneProduct+%7D%0D%0A++++++%3Fs+a+%3Ftype+%3B%0D%0A+++++++++wp%3AbdbUniprot+%3Funiprot+%3B%0D%0A+++++++++dcterms%3AisPartOf+%3Fpathway+.%0D%0A++++++%3Fpathway+a+wp%3APathway+.%0D%0A++++%7D+LIMIT+50%0D%0A++%7D%0D%0A++SERVICE+%3Chttp%3A%2F%2Fwww.ebi.ac.uk%2Frdf%2Fservices%2Fchembl%2Fsparql%3E++%7B%0D%0A++++%3Fassay+a+chembl%3AAssay+%3B+chembl%3AhasTarget%2Fchembl%3AhasTargetComponent%2Fchembl%3AtargetCmptXref+%3Fchembluniprot+.%0D%0A++%7D%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=PREFIX+chembl%3A+%3Chttp%3A%2F%2Frdf.ebi.ac.uk%2Fterms%2Fchembl%23%3E%0D%0A%0D%0ASELECT+%3Fpathway+%3Fchembluniprot+%3Fassay+WHERE+%7B%0D%0A++%7B%0D%0A++++SELECT+DISTINCT%0D%0A++++++%3Fpathway%0D%0A++++++iri%28%0D%0A++++++++bif%3Aconcat%28%22http%3A%2F%2Fpurl.uniprot.org%2Funiprot%2F%22%2C%0D%0A++++++++bif%3Aregexp_substr%28%27http%3A%2F%2Fidentifiers.org%2Funiprot%2F%28.*%29%27%2C%3Funiprot%2C+1%29%29%0D%0A++++++%29+as+%3Fchembluniprot%0D%0A++++WHERE+%7B%0D%0A++++++VALUES+%3Ftype+%7B+wp%3AProtein+wp%3AGeneProduct+%7D%0D%0A++++++%3Fs+a+%3Ftype+%3B%0D%0A+++++++++wp%3AbdbUniprot+%3Funiprot+%3B%0D%0A+++++++++dcterms%3AisPartOf+%3Fpathway+.%0D%0A++++++%3Fpathway+a+wp%3APathway+.%0D%0A++++%7D+LIMIT+50%0D%0A++%7D%0D%0A++SERVICE+%3Chttp%3A%2F%2Fwww.ebi.ac.uk%2Frdf%2Fservices%2Fchembl%2Fsparql%3E++%7B%0D%0A++++%3Fassay+a+chembl%3AAssay+%3B+chembl%3AhasTarget%2Fchembl%3AhasTargetComponent%2Fchembl%3AtargetCmptXref+%3Fchembluniprot+.%0D%0A++%7D%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== WikiPathways with ChEMBL: all molecules targeting pathways === | === WikiPathways with ChEMBL: all molecules targeting pathways === | ||
Line 1,010: | Line 1,010: | ||
} | } | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=PREFIX+chembl%3A+%3Chttp%3A%2F%2Frdf.ebi.ac.uk%2Fterms%2Fchembl%23%3E%0D%0APREFIX+sio%3A++++%3Chttp%3A%2F%2Fsemanticscience.org%2Fresource%2F%3E%0D%0A%0D%0ASELECT+DISTINCT+%3Fpathway+%3Fchembluniprot+%3Fmolecule+%3Fsmiles+WHERE+%7B%0D%0A++%7B%0D%0A++++SELECT+DISTINCT%0D%0A++++++%3Fpathway%0D%0A++++++iri%28%0D%0A++++++++bif%3Aconcat%28%22http%3A%2F%2Fpurl.uniprot.org%2Funiprot%2F%22%2C%0D%0A++++++++bif%3Aregexp_substr%28%27http%3A%2F%2Fidentifiers.org%2Funiprot%2F%28.*%29%27%2C%3Funiprot%2C+1%29%29%0D%0A++++++%29+as+%3Fchembluniprot%0D%0A++++WHERE+%7B%0D%0A++++++%3Fs+%3Fp+%3Funiprot+.%0D%0A++++++%3Fs+dcterms%3AisPartOf+%3Fpathway+.%0D%0A++++++FILTER+regex%28%3Funiprot%2C+%22uniprot%22%29%0D%0A++++%7D+LIMIT+50%0D%0A++%7D%0D%0A++SERVICE+%3Chttp%3A%2F%2Fwww.ebi.ac.uk%2Frdf%2Fservices%2Fchembl%2Fsparql%3E+%7B%0D%0A++++%3Fassay+a+chembl%3AAssay+%3B+chembl%3AhasTarget%2Fchembl%3AhasTargetComponent%2Fchembl%3AtargetCmptXref+%3Fchembluniprot+.%0D%0A++++%3Factivity+chembl%3AhasAssay+%3Fassay+%3B%0D%0A++++++++++++++chembl%3AhasMolecule+%3Fmolecule+.%0D%0A++++OPTIONAL+%7B+%3Fmolecule+sio%3ASIO_000008+%3Fattrib+.+%3Fattrib+a+sio%3ACHEMINF_000018+%3B+sio%3ASIO_000300+%3Fsmiles+.+%7D%0D%0A++%7D%0D%0A%7D%0D%0A&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=PREFIX+chembl%3A+%3Chttp%3A%2F%2Frdf.ebi.ac.uk%2Fterms%2Fchembl%23%3E%0D%0APREFIX+sio%3A++++%3Chttp%3A%2F%2Fsemanticscience.org%2Fresource%2F%3E%0D%0A%0D%0ASELECT+DISTINCT+%3Fpathway+%3Fchembluniprot+%3Fmolecule+%3Fsmiles+WHERE+%7B%0D%0A++%7B%0D%0A++++SELECT+DISTINCT%0D%0A++++++%3Fpathway%0D%0A++++++iri%28%0D%0A++++++++bif%3Aconcat%28%22http%3A%2F%2Fpurl.uniprot.org%2Funiprot%2F%22%2C%0D%0A++++++++bif%3Aregexp_substr%28%27http%3A%2F%2Fidentifiers.org%2Funiprot%2F%28.*%29%27%2C%3Funiprot%2C+1%29%29%0D%0A++++++%29+as+%3Fchembluniprot%0D%0A++++WHERE+%7B%0D%0A++++++%3Fs+%3Fp+%3Funiprot+.%0D%0A++++++%3Fs+dcterms%3AisPartOf+%3Fpathway+.%0D%0A++++++FILTER+regex%28%3Funiprot%2C+%22uniprot%22%29%0D%0A++++%7D+LIMIT+50%0D%0A++%7D%0D%0A++SERVICE+%3Chttp%3A%2F%2Fwww.ebi.ac.uk%2Frdf%2Fservices%2Fchembl%2Fsparql%3E+%7B%0D%0A++++%3Fassay+a+chembl%3AAssay+%3B+chembl%3AhasTarget%2Fchembl%3AhasTargetComponent%2Fchembl%3AtargetCmptXref+%3Fchembluniprot+.%0D%0A++++%3Factivity+chembl%3AhasAssay+%3Fassay+%3B%0D%0A++++++++++++++chembl%3AhasMolecule+%3Fmolecule+.%0D%0A++++OPTIONAL+%7B+%3Fmolecule+sio%3ASIO_000008+%3Fattrib+.+%3Fattrib+a+sio%3ACHEMINF_000018+%3B+sio%3ASIO_000300+%3Fsmiles+.+%7D%0D%0A++%7D%0D%0A%7D%0D%0A&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== WikiPathways with EBI Atlas RDF - !Under Construction! === | === WikiPathways with EBI Atlas RDF - !Under Construction! === | ||
Line 1,039: | Line 1,039: | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=PREFIX+identifiers%3A%3Chttp%3A%2F%2Fidentifiers.org%2Fensembl%2F%3E%0D%0APREFIX+atlas%3A+%3Chttp%3A%2F%2Frdf.ebi.ac.uk%2Fresource%2Fatlas%2F%3E%0D%0APREFIX+atlasterms%3A+%3Chttp%3A%2F%2Frdf.ebi.ac.uk%2Fterms%2Fatlas%2F%3E%0D%0APREFIX+efo%3A+%3Chttp%3A%2F%2Fwww.ebi.ac.uk%2Fefo%2F%3E%0D%0A%0D%0Aselect+distinct+%3FwpURL+%3FpwTitle+%3FexpressionValue+%3Fpvalue+where+%7B%0D%0A%0D%0ASERVICE+%3Chttps%3A%2F%2Fwww.ebi.ac.uk%2Frdf%2Fservices%2Fatlas%2Fsparql%3E+%7B%0D%0A+++++%3Ffactor+rdf%3Atype+efo%3AEFO_0000270+.+%0D%0A+++++%3Fvalue+atlasterms%3AhasFactorValue+%3Ffactor+.+%0D%0A+++++%3Fvalue+atlasterms%3AisMeasurementOf+%3Fprobe+.+%0D%0A+++++%3Fvalue+atlasterms%3ApValue+%3Fpvalue+.+%0D%0A+++++%3Fvalue+rdfs%3Alabel+%3FexpressionValue+.+%0D%0A+++++%3Fprobe+atlasterms%3AdbXref+%3FdbXref+.%0D%0A%7D%0D%0A+++++%3FpwElement+dcterms%3AisPartOf+%3Fpathway+.%0D%0A+++++%3Fpathway+dc%3Atitle+%3FpwTitle+.%0D%0A+++++%3Fpathway+dc%3Aidentifier+%3FwpURL+.%0D%0A+++++%3FpwElement+wp%3AbdbEnsembl+%3FdbXref+.%0D%0A%7D%0D%0AORDER+BY+ASC%28%3Fpvalue%29&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=PREFIX+identifiers%3A%3Chttp%3A%2F%2Fidentifiers.org%2Fensembl%2F%3E%0D%0APREFIX+atlas%3A+%3Chttp%3A%2F%2Frdf.ebi.ac.uk%2Fresource%2Fatlas%2F%3E%0D%0APREFIX+atlasterms%3A+%3Chttp%3A%2F%2Frdf.ebi.ac.uk%2Fterms%2Fatlas%2F%3E%0D%0APREFIX+efo%3A+%3Chttp%3A%2F%2Fwww.ebi.ac.uk%2Fefo%2F%3E%0D%0A%0D%0Aselect+distinct+%3FwpURL+%3FpwTitle+%3FexpressionValue+%3Fpvalue+where+%7B%0D%0A%0D%0ASERVICE+%3Chttps%3A%2F%2Fwww.ebi.ac.uk%2Frdf%2Fservices%2Fatlas%2Fsparql%3E+%7B%0D%0A+++++%3Ffactor+rdf%3Atype+efo%3AEFO_0000270+.+%0D%0A+++++%3Fvalue+atlasterms%3AhasFactorValue+%3Ffactor+.+%0D%0A+++++%3Fvalue+atlasterms%3AisMeasurementOf+%3Fprobe+.+%0D%0A+++++%3Fvalue+atlasterms%3ApValue+%3Fpvalue+.+%0D%0A+++++%3Fvalue+rdfs%3Alabel+%3FexpressionValue+.+%0D%0A+++++%3Fprobe+atlasterms%3AdbXref+%3FdbXref+.%0D%0A%7D%0D%0A+++++%3FpwElement+dcterms%3AisPartOf+%3Fpathway+.%0D%0A+++++%3Fpathway+dc%3Atitle+%3FpwTitle+.%0D%0A+++++%3Fpathway+dc%3Aidentifier+%3FwpURL+.%0D%0A+++++%3FpwElement+wp%3AbdbEnsembl+%3FdbXref+.%0D%0A%7D%0D%0AORDER+BY+ASC%28%3Fpvalue%29&format=text%2Fhtml&timeout=0&debug=on Execute] |
==== Genes differentially expressed in [http://www.ebi.ac.uk/efo/EFO_0001360 type II diabetes mellitus] and Pathways ==== | ==== Genes differentially expressed in [http://www.ebi.ac.uk/efo/EFO_0001360 type II diabetes mellitus] and Pathways ==== | ||
Line 1,067: | Line 1,067: | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=PREFIX+identifiers%3A%3Chttp%3A%2F%2Fidentifiers.org%2Fensembl%2F%3E%0D%0APREFIX+atlas%3A+%3Chttp%3A%2F%2Frdf.ebi.ac.uk%2Fresource%2Fatlas%2F%3E%0D%0APREFIX+atlasterms%3A+%3Chttps%3A%2F%2Frdf.ebi.ac.uk%2Fterms%2Fatlas%2F%3E%0D%0APREFIX+efo%3A+%3Chttps%3A%2F%2Fwww.ebi.ac.uk%2Fefo%2F%3E%0D%0A%0D%0Aselect+distinct+%3FwpURL+%3FpwTitle+%3FexpressionValue+%3Fpvalue+where+%7B%0D%0A%0D%0ASERVICE+%3Chttp%3A%2F%2Fwww.ebi.ac.uk%2Frdf%2Fservices%2Fatlas%2Fsparql%3E+%7B%0D%0A+++++%3Ffactor+rdf%3Atype+efo%3AEFO_0000270+.+%0D%0A+++++%3Fvalue+atlasterms%3AhasFactorValue+%3Ffactor+.+%0D%0A+++++%3Fvalue+atlasterms%3AisMeasurementOf+%3Fprobe+.+%0D%0A+++++%3Fvalue+atlasterms%3ApValue+%3Fpvalue+.+%0D%0A+++++%3Fvalue+rdfs%3Alabel+%3FexpressionValue+.+%0D%0A+++++%3Fprobe+atlasterms%3AdbXref+%3FdbXref+.%0D%0A%7D%0D%0A+++++%3FpwElement+dcterms%3AisPartOf+%3Fpathway+.%0D%0A+++++%3Fpathway+dc%3Atitle+%3FpwTitle+.%0D%0A+++++%3Fpathway+dc%3Aidentifier+%3FwpURL+.%0D%0A+++++%3FpwElement+wp%3AbdbEnsembl+%3FdbXref+.%0D%0A%7D%0D%0AORDER+BY+ASC%28%3Fpvalue%29&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=PREFIX+identifiers%3A%3Chttp%3A%2F%2Fidentifiers.org%2Fensembl%2F%3E%0D%0APREFIX+atlas%3A+%3Chttp%3A%2F%2Frdf.ebi.ac.uk%2Fresource%2Fatlas%2F%3E%0D%0APREFIX+atlasterms%3A+%3Chttps%3A%2F%2Frdf.ebi.ac.uk%2Fterms%2Fatlas%2F%3E%0D%0APREFIX+efo%3A+%3Chttps%3A%2F%2Fwww.ebi.ac.uk%2Fefo%2F%3E%0D%0A%0D%0Aselect+distinct+%3FwpURL+%3FpwTitle+%3FexpressionValue+%3Fpvalue+where+%7B%0D%0A%0D%0ASERVICE+%3Chttp%3A%2F%2Fwww.ebi.ac.uk%2Frdf%2Fservices%2Fatlas%2Fsparql%3E+%7B%0D%0A+++++%3Ffactor+rdf%3Atype+efo%3AEFO_0000270+.+%0D%0A+++++%3Fvalue+atlasterms%3AhasFactorValue+%3Ffactor+.+%0D%0A+++++%3Fvalue+atlasterms%3AisMeasurementOf+%3Fprobe+.+%0D%0A+++++%3Fvalue+atlasterms%3ApValue+%3Fpvalue+.+%0D%0A+++++%3Fvalue+rdfs%3Alabel+%3FexpressionValue+.+%0D%0A+++++%3Fprobe+atlasterms%3AdbXref+%3FdbXref+.%0D%0A%7D%0D%0A+++++%3FpwElement+dcterms%3AisPartOf+%3Fpathway+.%0D%0A+++++%3Fpathway+dc%3Atitle+%3FpwTitle+.%0D%0A+++++%3Fpathway+dc%3Aidentifier+%3FwpURL+.%0D%0A+++++%3FpwElement+wp%3AbdbEnsembl+%3FdbXref+.%0D%0A%7D%0D%0AORDER+BY+ASC%28%3Fpvalue%29&format=text%2Fhtml&timeout=0&debug=on Execute] |
==== Genes differentially expressed in [http://www.ebi.ac.uk/efo/EFO_0001073 obesity] and Pathways ==== | ==== Genes differentially expressed in [http://www.ebi.ac.uk/efo/EFO_0001073 obesity] and Pathways ==== | ||
Line 1,092: | Line 1,092: | ||
ORDER BY ASC(?pvalue) | ORDER BY ASC(?pvalue) | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=PREFIX+identifiers%3A%3Chttp%3A%2F%2Fidentifiers.org%2Fensembl%2F%3E%0D%0APREFIX+atlas%3A+%3Chttp%3A%2F%2Frdf.ebi.ac.uk%2Fresource%2Fatlas%2F%3E%0D%0APREFIX+atlasterms%3A+%3Chttps%3A%2F%2Frdf.ebi.ac.uk%2Fterms%2Fatlas%2F%3E%0D%0APREFIX+efo%3A+%3Chttp%3A%2F%2Fwww.ebi.ac.uk%2Fefo%2F%3E%0D%0A%0D%0ASELECT+DISTINCT+%3FwpURL+%3FpwTitle+%3FexpressionValue+%3Fpvalue+where+%7B%0D%0A%0D%0ASERVICE+%3Chttp%3A%2F%2Fwww.ebi.ac.uk%2Frdf%2Fservices%2Fatlas%2Fsparql%3E+%7B%0D%0A+++++%3Ffactor+rdf%3Atype+efo%3AEFO_0001073+.+%0D%0A+++++%3Fvalue+atlasterms%3AhasFactorValue+%3Ffactor+.+%0D%0A+++++%3Fvalue+atlasterms%3AisMeasurementOf+%3Fprobe+.+%0D%0A+++++%3Fvalue+atlasterms%3ApValue+%3Fpvalue+.+%0D%0A+++++%3Fvalue+rdfs%3Alabel+%3FexpressionValue+.+%0D%0A+++++%3Fprobe+atlasterms%3AdbXref+%3FdbXref+.%0D%0A%7D%0D%0A+++++%3FpwElement+dcterms%3AisPartOf+%3Fpathway+.%0D%0A+++++%3Fpathway+dc%3Atitle+%3FpwTitle+.%0D%0A+++++%3Fpathway+dc%3Aidentifier+%3FwpURL+.%0D%0A+++++%3FpwElement+wp%3AbdbEnsembl+%3FdbXref+.%0D%0A%7D%0D%0AORDER+BY+ASC%28%3Fpvalue%29&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=PREFIX+identifiers%3A%3Chttp%3A%2F%2Fidentifiers.org%2Fensembl%2F%3E%0D%0APREFIX+atlas%3A+%3Chttp%3A%2F%2Frdf.ebi.ac.uk%2Fresource%2Fatlas%2F%3E%0D%0APREFIX+atlasterms%3A+%3Chttps%3A%2F%2Frdf.ebi.ac.uk%2Fterms%2Fatlas%2F%3E%0D%0APREFIX+efo%3A+%3Chttp%3A%2F%2Fwww.ebi.ac.uk%2Fefo%2F%3E%0D%0A%0D%0ASELECT+DISTINCT+%3FwpURL+%3FpwTitle+%3FexpressionValue+%3Fpvalue+where+%7B%0D%0A%0D%0ASERVICE+%3Chttp%3A%2F%2Fwww.ebi.ac.uk%2Frdf%2Fservices%2Fatlas%2Fsparql%3E+%7B%0D%0A+++++%3Ffactor+rdf%3Atype+efo%3AEFO_0001073+.+%0D%0A+++++%3Fvalue+atlasterms%3AhasFactorValue+%3Ffactor+.+%0D%0A+++++%3Fvalue+atlasterms%3AisMeasurementOf+%3Fprobe+.+%0D%0A+++++%3Fvalue+atlasterms%3ApValue+%3Fpvalue+.+%0D%0A+++++%3Fvalue+rdfs%3Alabel+%3FexpressionValue+.+%0D%0A+++++%3Fprobe+atlasterms%3AdbXref+%3FdbXref+.%0D%0A%7D%0D%0A+++++%3FpwElement+dcterms%3AisPartOf+%3Fpathway+.%0D%0A+++++%3Fpathway+dc%3Atitle+%3FpwTitle+.%0D%0A+++++%3Fpathway+dc%3Aidentifier+%3FwpURL+.%0D%0A+++++%3FpwElement+wp%3AbdbEnsembl+%3FdbXref+.%0D%0A%7D%0D%0AORDER+BY+ASC%28%3Fpvalue%29&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== WikiPathways with Wikidata - !Under Construction! === | === WikiPathways with Wikidata - !Under Construction! === | ||
Line 1,115: | Line 1,115: | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=PREFIX+wdt%3A+%3Chttp%3A%2F%2Fwww.wikidata.org%2Fprop%2Fdirect%2F%3E%0D%0A%0D%0ASELECT+%3Fmetabolite+%3Fwikidata+%3Finchikey+WHERE+%7B%0D%0A++%3Fmetabolite+a+wp%3AMetabolite+%3B%0D%0A++++wp%3AbdbWikidata+%3Fwikidata+.%0D%0A++SERVICE+%3Chttps%3A%2F%2Fquery.wikidata.org%2Fsparql%3E+%7B%0D%0A++++%3Fwikidata+wdt%3AP235+%3Finchikey+.%0D%0A++%7D%0D%0A%7D+LIMIT+10&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=PREFIX+wdt%3A+%3Chttp%3A%2F%2Fwww.wikidata.org%2Fprop%2Fdirect%2F%3E%0D%0A%0D%0ASELECT+%3Fmetabolite+%3Fwikidata+%3Finchikey+WHERE+%7B%0D%0A++%3Fmetabolite+a+wp%3AMetabolite+%3B%0D%0A++++wp%3AbdbWikidata+%3Fwikidata+.%0D%0A++SERVICE+%3Chttps%3A%2F%2Fquery.wikidata.org%2Fsparql%3E+%7B%0D%0A++++%3Fwikidata+wdt%3AP235+%3Finchikey+.%0D%0A++%7D%0D%0A%7D+LIMIT+10&format=text%2Fhtml&timeout=0&debug=on Execute] |
== Identifier to WikiPathways lists == | == Identifier to WikiPathways lists == | ||
Line 1,133: | Line 1,133: | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=&query=select+distinct+%3FpathwayRes+str%28%3Fwpid%29+as+%3Fpathway+str%28%3Ftitle%29+as+%3FpathwayTitle+fn%3Asubstring%28%3FensId%2C32%29+as+%3Fensembl+where+%7B%0D%0A++%3Fgene+a+wp%3AGeneProduct+%3B%0D%0A++++dcterms%3Aidentifier+%3Fid+%3B%0D%0A++++dcterms%3AisPartOf+%3FpathwayRes+%3B%0D%0A++++wp%3AbdbEnsembl+%3FensId+.%0D%0A++%3FpathwayRes+a+wp%3APathway+%3B%0D%0A++++dcterms%3Aidentifier+%3Fwpid+%3B%0D%0A++++dc%3Atitle+%3Ftitle+.%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=&query=select+distinct+%3FpathwayRes+str%28%3Fwpid%29+as+%3Fpathway+str%28%3Ftitle%29+as+%3FpathwayTitle+fn%3Asubstring%28%3FensId%2C32%29+as+%3Fensembl+where+%7B%0D%0A++%3Fgene+a+wp%3AGeneProduct+%3B%0D%0A++++dcterms%3Aidentifier+%3Fid+%3B%0D%0A++++dcterms%3AisPartOf+%3FpathwayRes+%3B%0D%0A++++wp%3AbdbEnsembl+%3FensId+.%0D%0A++%3FpathwayRes+a+wp%3APathway+%3B%0D%0A++++dcterms%3Aidentifier+%3Fwpid+%3B%0D%0A++++dc%3Atitle+%3Ftitle+.%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== List of WikiPathways for HGNC symbols === | === List of WikiPathways for HGNC symbols === | ||
Line 1,149: | Line 1,149: | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=select+distinct+%3FpathwayRes+str%28%3Fwpid%29+as+%3Fpathway+str%28%3Ftitle%29+as+%3FpathwayTitle+fn%3Asubstring%28%3FhgncId%2C36%29+as+%3FHGNC+where+%7B%0D%0A++%3Fgene+a+wp%3AGeneProduct+%3B%0D%0A++++dcterms%3Aidentifier+%3Fid+%3B%0D%0A++++dcterms%3AisPartOf+%3FpathwayRes+%3B%0D%0A++++wp%3AbdbHgncSymbol+%3FhgncId+.%0D%0A++%3FpathwayRes+a+wp%3APathway+%3B%0D%0A++++dcterms%3Aidentifier+%3Fwpid+%3B%0D%0A++++dc%3Atitle+%3Ftitle+.%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=select+distinct+%3FpathwayRes+str%28%3Fwpid%29+as+%3Fpathway+str%28%3Ftitle%29+as+%3FpathwayTitle+fn%3Asubstring%28%3FhgncId%2C36%29+as+%3FHGNC+where+%7B%0D%0A++%3Fgene+a+wp%3AGeneProduct+%3B%0D%0A++++dcterms%3Aidentifier+%3Fid+%3B%0D%0A++++dcterms%3AisPartOf+%3FpathwayRes+%3B%0D%0A++++wp%3AbdbHgncSymbol+%3FhgncId+.%0D%0A++%3FpathwayRes+a+wp%3APathway+%3B%0D%0A++++dcterms%3Aidentifier+%3Fwpid+%3B%0D%0A++++dc%3Atitle+%3Ftitle+.%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== List of WikiPathways for NCBI Gene identifiers === | === List of WikiPathways for NCBI Gene identifiers === | ||
Line 1,165: | Line 1,165: | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=select+distinct+%3FpathwayRes+str%28%3Fwpid%29+as+%3Fpathway+str%28%3Ftitle%29+as+%3FpathwayTitle+fn%3Asubstring%28%3FncbiGeneId%2C33%29+as+%3FNCBIGene+where+%7B%0D%0A++%3Fgene+a+wp%3AGeneProduct+%3B%0D%0A++++dcterms%3Aidentifier+%3Fid+%3B%0D%0A++++dcterms%3AisPartOf+%3FpathwayRes+%3B%0D%0A++++wp%3AbdbEntrezGene+%3FncbiGeneId+.%0D%0A++%3FpathwayRes+a+wp%3APathway+%3B%0D%0A++++dcterms%3Aidentifier+%3Fwpid+%3B%0D%0A++++dc%3Atitle+%3Ftitle+.%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=select+distinct+%3FpathwayRes+str%28%3Fwpid%29+as+%3Fpathway+str%28%3Ftitle%29+as+%3FpathwayTitle+fn%3Asubstring%28%3FncbiGeneId%2C33%29+as+%3FNCBIGene+where+%7B%0D%0A++%3Fgene+a+wp%3AGeneProduct+%3B%0D%0A++++dcterms%3Aidentifier+%3Fid+%3B%0D%0A++++dcterms%3AisPartOf+%3FpathwayRes+%3B%0D%0A++++wp%3AbdbEntrezGene+%3FncbiGeneId+.%0D%0A++%3FpathwayRes+a+wp%3APathway+%3B%0D%0A++++dcterms%3Aidentifier+%3Fwpid+%3B%0D%0A++++dc%3Atitle+%3Ftitle+.%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== List of WikiPathways for HMDB identifiers === | === List of WikiPathways for HMDB identifiers === | ||
Line 1,181: | Line 1,181: | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=select+distinct+%3FpathwayRes+str%28%3Fwpid%29+as+%3Fpathway+str%28%3Ftitle%29+as+%3FpathwayTitle+fn%3Asubstring%28%3FhmdbId%2C29%29+as+%3Fhmdb+where+%7B%0D%0A++%3Fgene+a+wp%3AMetabolite+%3B%0D%0A++++dcterms%3Aidentifier+%3Fid+%3B%0D%0A++++dcterms%3AisPartOf+%3FpathwayRes+%3B%0D%0A++++wp%3AbdbHmdb+%3FhmdbId+.%0D%0A++%3FpathwayRes+a+wp%3APathway+%3B%0D%0A++++dcterms%3Aidentifier+%3Fwpid+%3B%0D%0A++++dc%3Atitle+%3Ftitle+.%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=select+distinct+%3FpathwayRes+str%28%3Fwpid%29+as+%3Fpathway+str%28%3Ftitle%29+as+%3FpathwayTitle+fn%3Asubstring%28%3FhmdbId%2C29%29+as+%3Fhmdb+where+%7B%0D%0A++%3Fgene+a+wp%3AMetabolite+%3B%0D%0A++++dcterms%3Aidentifier+%3Fid+%3B%0D%0A++++dcterms%3AisPartOf+%3FpathwayRes+%3B%0D%0A++++wp%3AbdbHmdb+%3FhmdbId+.%0D%0A++%3FpathwayRes+a+wp%3APathway+%3B%0D%0A++++dcterms%3Aidentifier+%3Fwpid+%3B%0D%0A++++dc%3Atitle+%3Ftitle+.%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== List of WikiPathways for ChemSpider identifiers === | === List of WikiPathways for ChemSpider identifiers === | ||
Line 1,196: | Line 1,196: | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=select+distinct+%3FpathwayRes+str%28%3Fwpid%29+as+%3Fpathway+str%28%3Ftitle%29+as+%3FpathwayTitle+fn%3Asubstring%28%3FcsId%2C35%29+as+%3Fchemspider+where+%7B%0D%0A++%3Fgene+a+wp%3AMetabolite+%3B%0D%0A++++dcterms%3Aidentifier+%3Fid+%3B%0D%0A++++dcterms%3AisPartOf+%3FpathwayRes+%3B%0D%0A++++wp%3AbdbChemspider+%3FcsId+.%0D%0A++%3FpathwayRes+a+wp%3APathway+%3B%0D%0A++++dcterms%3Aidentifier+%3Fwpid+%3B%0D%0A++++dc%3Atitle+%3Ftitle+.%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=select+distinct+%3FpathwayRes+str%28%3Fwpid%29+as+%3Fpathway+str%28%3Ftitle%29+as+%3FpathwayTitle+fn%3Asubstring%28%3FcsId%2C35%29+as+%3Fchemspider+where+%7B%0D%0A++%3Fgene+a+wp%3AMetabolite+%3B%0D%0A++++dcterms%3Aidentifier+%3Fid+%3B%0D%0A++++dcterms%3AisPartOf+%3FpathwayRes+%3B%0D%0A++++wp%3AbdbChemspider+%3FcsId+.%0D%0A++%3FpathwayRes+a+wp%3APathway+%3B%0D%0A++++dcterms%3Aidentifier+%3Fwpid+%3B%0D%0A++++dc%3Atitle+%3Ftitle+.%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] |
=== List of WikiPathways for PubChem CID identifiers === | === List of WikiPathways for PubChem CID identifiers === | ||
Line 1,212: | Line 1,212: | ||
</PRE> | </PRE> | ||
- | [http://sparql.wikipathways.org/?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=select+distinct+%3FpathwayRes+str%28%3Fwpid%29+as+%3Fpathway+str%28%3Ftitle%29+as+%3FpathwayTitle+fn%3Asubstring%28%3Fcid%2C46%29+as+%3FPubChem+where+%7B%0D%0A++%3Fgene+a+wp%3AMetabolite+%3B%0D%0A++++dcterms%3Aidentifier+%3Fid+%3B%0D%0A++++dcterms%3AisPartOf+%3FpathwayRes+%3B%0D%0A++++wp%3AbdbPubChem+%3Fcid+.%0D%0A++%3FpathwayRes+a+wp%3APathway+%3B%0D%0A++++dcterms%3Aidentifier+%3Fwpid+%3B%0D%0A++++dc%3Atitle+%3Ftitle+.%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] | + | [http://sparql.wikipathways.org/sparql?default-graph-uri=http%3A%2F%2Frdf.wikipathways.org%2F&query=select+distinct+%3FpathwayRes+str%28%3Fwpid%29+as+%3Fpathway+str%28%3Ftitle%29+as+%3FpathwayTitle+fn%3Asubstring%28%3Fcid%2C46%29+as+%3FPubChem+where+%7B%0D%0A++%3Fgene+a+wp%3AMetabolite+%3B%0D%0A++++dcterms%3Aidentifier+%3Fid+%3B%0D%0A++++dcterms%3AisPartOf+%3FpathwayRes+%3B%0D%0A++++wp%3AbdbPubChem+%3Fcid+.%0D%0A++%3FpathwayRes+a+wp%3APathway+%3B%0D%0A++++dcterms%3Aidentifier+%3Fwpid+%3B%0D%0A++++dc%3Atitle+%3Ftitle+.%0D%0A%7D&format=text%2Fhtml&timeout=0&debug=on Execute] |
= Code examples = | = Code examples = | ||
Line 1,236: | Line 1,236: | ||
ORDER BY ?wpIdentifier"; | ORDER BY ?wpIdentifier"; | ||
- | my $url = 'http://sparql.wikipathways.org/?default-graph-uri=&query='.uri_escape($sparql).'&format=text%2Fcsv&timeout=0&debug=on'; | + | my $url = 'http://sparql.wikipathways.org/sparql?default-graph-uri=&query='.uri_escape($sparql).'&format=text%2Fcsv&timeout=0&debug=on'; |
my $content = get $url; | my $content = get $url; | ||
Line 1,297: | Line 1,297: | ||
<PRE> | <PRE> | ||
- | curl -F "query=SELECT * WHERE {?s ?p ?o} LIMIT 10" http://sparql.wikipathways.org | + | curl -F "query=SELECT * WHERE {?s ?p ?o} LIMIT 10" http://sparql.wikipathways.org/sparql |
</PRE> | </PRE> | ||
Revision as of 11:17, 8 January 2020
On http://sparql.wikipathways.org/ WikiPathways content is replicated in a SPARQL endpoint. Queries can be performed in three ways:
1. Either go to the endpoint directly and create your own SPARQL query
2. Copy and past one of the example queries listed below in the endpoint.
This project is written up in the "Using the Semantic Web for Rapid Integration of WikiPathways with Other Biological Online Data Resources" paper.
Resources
- WikiPathways internal vocabularies: http://vocabularies.wikipathways.org
- WikiPathways SPARQL endpoint http://sparql.wikipathways.org/sparql
- Identifiers.org: http://identifiers.org
- Sparqlbin http://sparqlbin.org
- Searches prefixes: http://prefix.cc
Submit ideas
Prefixes
Within the example queries, we have omitted the prefixes. These prefixes are automatically used in the SPARQL Endpoint. The following prefixes are used in the WikiPathways RDF:
PREFIX gpml: <http://vocabularies.wikipathways.org/gpml#> PREFIX wp: <http://vocabularies.wikipathways.org/wp#> PREFIX cur: <http://vocabularies.wikipathways.org/wp#Curation:> PREFIX wprdf: <http://rdf.wikipathways.org/> PREFIX biopax: <http://www.biopax.org/release/biopax-level3.owl#> PREFIX cas: <http://identifiers.org/cas/> PREFIX dc: <http://purl.org/dc/elements/1.1/> PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX ncbigene:<http://identifiers.org/ncbigene/> PREFIX pubmed: <http://www.ncbi.nlm.nih.gov/pubmed/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
Example queries
Queries with a * require a bit more time for results.
Metadata queries
List the information about the data sets in the SPARQL end point:
select distinct ?dataset (str(?titleLit) as ?title) ?date ?license where { ?dataset a void:Dataset ; dcterms:title ?titleLit ; dcterms:license ?license ; pav:createdOn ?date . }
Pathway oriented queries
Get the species currently in WikiPathways with their respective URI's
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX wp: <http://vocabularies.wikipathways.org/wp#> SELECT DISTINCT ?organism (str(?label) as ?name) WHERE { ?concept wp:organism ?organism ; wp:organismName ?label . }
List pathways and their species
PREFIX dc: <http://purl.org/dc/elements/1.1/> PREFIX wp: <http://vocabularies.wikipathways.org/wp#> SELECT DISTINCT (str(?title) as ?pathway) (str(?label) as ?organism) WHERE { ?pw dc:title ?title ; wp:organism ?organism ; wp:organismName ?label . }
List the species captured in WikiPathways and the number of pathways per species
PREFIX dc: <http://purl.org/dc/elements/1.1/> PREFIX wp: <http://vocabularies.wikipathways.org/wp#> SELECT DISTINCT ?organism (str(?label) as ?name) (count(?pw) as ?pathwayCount) WHERE { ?pw dc:title ?title ; wp:organism ?organism ; wp:organismName ?label . } ORDER BY DESC(?pathwayCount)
List all pathways for species "Mus musculus"
The following query list all mouse pathways. ?wpIdentifier is the link through identifiers.org, ?pathway points to the rdf version of wikipathways and ?page is the revision which is loaded in the sparql endpoint.
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX dc: <http://purl.org/dc/elements/1.1/> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX wp: <http://vocabularies.wikipathways.org/wp#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> SELECT DISTINCT ?wpIdentifier ?pathway ?page WHERE { ?pathway dc:title ?title . ?pathway foaf:page ?page . ?pathway dc:identifier ?wpIdentifier . ?pathway wp:organismName "Mus musculus"^^xsd:string . } ORDER BY ?wpIdentifier
Get all pathways with a particular gene
List all pathways per instance of a particular gene or protein (wp:GeneProduct)
PREFIX wp: <http://vocabularies.wikipathways.org/wp#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX dcterms: <http://purl.org/dc/terms/> SELECT DISTINCT ?pathway (str(?label) as ?geneProduct) WHERE { ?geneProduct a wp:GeneProduct . ?geneProduct rdfs:label ?label . ?geneProduct dcterms:isPartOf ?pathway . ?pathway a wp:Pathway . FILTER regex(str(?label), "CYP"). }
Get all groups and complexes containing a particular gene
List all groups and complexes per instance of a particular gene or protein (wp:GeneProduct)
PREFIX wp: <http://vocabularies.wikipathways.org/wp#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX dcterms: <http://purl.org/dc/terms/> SELECT DISTINCT ?pathway (str(?label) as ?geneProduct) WHERE { ?geneProduct a wp:GeneProduct . ?geneProduct rdfs:label ?label . ?geneProduct dcterms:isPartOf ?pathway . FILTER NOT EXISTS { ?pathway a wp:Interaction } . FILTER NOT EXISTS { ?pathway a wp:Pathway } . FILTER regex(str(?label), "CYP"). }
Get all the genes on a particular pathway
List all the genes and proteins (wp:GeneProduct) associated with a particular pathway WPID.
PREFIX wp: <http://vocabularies.wikipathways.org/wp#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX dcterms: <http://purl.org/dc/terms/> select distinct ?pathway (str(?label) as ?geneProduct) where { ?geneProduct a wp:GeneProduct . ?geneProduct rdfs:label ?label . ?geneProduct dcterms:isPartOf ?pathway . ?pathway a wp:Pathway . ?pathway dcterms:identifier "WP1560"^^xsd:string . }
Count the number of pathways per ontology term
In WikiPathways, pathways can be tagged with ontology terms from Pathway, Cell Line and Disease ontology. The following query returns a pathway count for each term from any of the available ontologies. These terms are collectively modeled as wp:pathwayOntology; but this includes all ontologies, not just the "Pathway" ontology.
SELECT DISTINCT ?pwOntologyTerm count(?pwOntologyTerm) as ?pathwayCount WHERE { ?pathwayRDF wp:ontologyTag ?pwOntologyTerm . } ORDER BY DESC(?pathwayCount)
Get all pathways with a particular ontology term
In WikiPathways, pathways can be tagged with ontology terms from Pathway, Cell Line and Disease ontology. The following query returns a list of pathways tagged with PW_0000296.
PREFIX obo: <http://purl.obolibrary.org/obo/> SELECT ?pathway (str(?titleLit) AS ?title) WHERE { ?pathwayRDF wp:ontologyTag obo:PW_0000296 ; foaf:page ?pathway ; dc:title ?titleLit . }
Get all ontology terms for a particular pathway
List all the ontology terms tagged on a particular pathway.
SELECT (?o as ?pwOntologyTerm) (str(?titleLit) as ?title) ?pathway WHERE { ?pathwayRDF wp:ontologyTag ?o ; foaf:page ?pathway ; dc:title ?titleLit ; dcterms:identifier "WP1560"^^xsd:string . FILTER (! regex(str(?pathway), "group")) }
Get all Reactome pathways
List all the ontology terms tagged on a particular pathway.
PREFIX cur: <http://vocabularies.wikipathways.org/wp#Curation:> SELECT DISTINCT ?pathway (str(?titleLit) as ?title) WHERE { ?pathway wp:ontologyTag cur:Reactome_Approved ; dc:title ?titleLit . }
Get all pathways with Pubmed references
SELECT DISTINCT ?pathway ?pubmed WHERE {?pubmed a wp:PublicationReference . ?pubmed dcterms:isPartOf ?pathway } ORDER BY ?pathway
Get all pathways with a particular Pubmed reference
SELECT DISTINCT ?pathway ?pubmed WHERE { ?pubmed a wp:PublicationReference . ?pubmed dcterms:isPartOf ?pathway . FILTER regex(str(?pubmed), "14769483$") } ORDER BY ?pathway
The $ at the end of the PubMed identifier ensures that, for example, 147694831 does not match too; the regex instruction '$' means "end of the string".
Get all pathways and the number of refences per pathway
SELECT DISTINCT ?pathway COUNT(?pubmed) AS ?numberOfReferences WHERE {?pubmed a wp:PublicationReference . ?pubmed dcterms:isPartOf ?pathway } ORDER BY DESC(?numberOfReferences)
Get a full dump of all pathways and their pathway ontological terms
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX dc: <http://purl.org/dc/elements/1.1/> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX schema: <http://schema.org/> PREFIX wp: <http://vocabularies.wikipathways.org/wp#> PREFIX dcterms: <http://purl.org/dc/terms/> SELECT DISTINCT ?depicts (str(?titleLit) as ?title) (str(?speciesLabelLit) as ?speciesLabel) ?identifier ?ontology WHERE { ?pathway foaf:page ?depicts . ?pathway dc:title ?titleLit . ?pathway wp:organism ?species . ?pathway wp:organismName ?speciesLabelLit . ?pathway dc:identifier ?identifier . OPTIONAL {?pathway wp:ontologyTag ?ontology .} }
Count how many genes from a list occur in one or more pathways
The gene list is given in the line starting with VALUES. For this example, we use the HGNC gene nomenclature. Other gene IDs can be used to fill the list; however keep in mind they use different URLs and therefor the prefix (first line of Query) should be adapted. A list of these URLs can be found on identifiers.org (or by looking at the "raw" RDF files).
prefix hgnc: <http://identifiers.org/hgnc.symbol/> select distinct ?pathwayRes (str(?wpid) as ?pathway) (str(?title) as ?pathwayTitle) (count(distinct ?hgncId) AS ?GenesInPWs) where { VALUES ?hgncId {hgnc:GPD1L hgnc:SCN3B hgnc:BAD} ?gene a wp:GeneProduct ; dcterms:identifier ?id ; dcterms:isPartOf ?pathwayRes ; wp:bdbHgncSymbol ?hgncId . ?pathwayRes a wp:Pathway ; wp:organismName "Homo sapiens"^^xsd:string ; dcterms:identifier ?wpid ; dc:title ?title . } ORDER BY DESC(?GenesInPWs)
Data statistics oriented queries
Count the number of metabolites per species
Though strictly speaking, it guesstimates it, because it counts the number of unique metabolite identifiers. Normalization in the RDF generation code ensures we do not double count metabolites with identifiers from different databases, but it still differentially counts metabolites with different charge states.
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 ?metabolite) as ?count) (str(?label) as ?species) where { ?metabolite a wp:Metabolite ; dcterms:isPartOf ?pw . ?pw dc:title ?title ; wp:organism ?organism ; wp:organismName ?label . } GROUP BY ?label ORDER BY DESC(?count)
Interaction oriented queries
Get all interactions for a particular datanode
Find all interactions that are connected to a particular datanode. (wp:Interaction).
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#> #Find all interactions that are connected to a particular datanode. SELECT DISTINCT ?interaction ?pathway WHERE { ?pathway a wp:Pathway . ?interaction dcterms:isPartOf ?pathway . ?interaction a wp:Interaction . ?interaction wp:participants <http://identifiers.org/ensembl/ENSG00000125845> . }
Find all datanodes (GeneProducts, Metabolites, Pathways) that are connected to a particular datanode via any type of interaction (wp:Interaction).
SELECT DISTINCT ?participants ?DataNodeLabel ?interaction WHERE { ?interaction a wp:Interaction . ?interaction wp:participants <http://identifiers.org/ensembl/ENSG00000125845> . ?interaction wp:participants ?participants . ?participants a wp:DataNode . ?participants rdfs:label ?DataNodeLabel . }
Get all interactions for a particular pathway.
PREFIX wp: <http://vocabularies.wikipathways.org/wp#> SELECT DISTINCT ?pathway ?interaction WHERE { ?pathway a wp:Pathway . ?pathway dc:identifier <http://identifiers.org/wikipathways/WP1425> . ?interaction dcterms:isPartOf ?pathway . ?interaction a wp:Interaction . }
Get all interactions for a particular pathway and their participants.
PREFIX wp: <http://vocabularies.wikipathways.org/wp#> SELECT DISTINCT ?pathway ?interaction ?participants ?DataNodeLabel WHERE { ?pathway a wp:Pathway . ?pathway dc:identifier <http://identifiers.org/wikipathways/WP1425> . ?interaction dcterms:isPartOf ?pathway . ?interaction a wp:Interaction . ?interaction wp:participants ?participants . ?participants a wp:DataNode . ?participants rdfs:label ?DataNodeLabel . }
Get all Interactions.
Limited to 1000 interactions.
PREFIX wp: <http://vocabularies.wikipathways.org/wp#> SELECT DISTINCT ?pathway ?interaction ?participant WHERE { ?pathway a wp:Pathway . ?interaction dcterms:isPartOf ?pathway . ?interaction a wp:Interaction . ?interaction wp:participants ?participant . } LIMIT 1000
Get all Interactions for a species (Homo sapiens).
PREFIX wp: <http://vocabularies.wikipathways.org/wp#> SELECT DISTINCT ?pathway ?interaction WHERE { ?pathway a wp:Pathway . ?pathway wp:organismName "Homo sapiens"^^xsd:string . ?interaction dcterms:isPartOf ?pathway . ?interaction a wp:Interaction . }
Get downstream adjacent nodes from a source.
A directed interaction always runs from source to target. (eg. s --> t)
PREFIX wp: <http://vocabularies.wikipathways.org/wp#> SELECT DISTINCT ?source ?label ?target ?label1 ?pathway ?interaction WHERE { ?source dc:identifier <http://identifiers.org/ensembl/ENSG00000125845> . ?source dcterms:isPartOf ?pathway . ?pathway a wp:Pathway . ?interaction dcterms:isPartOf ?pathway . ?interaction a wp:Interaction . ?interaction wp:source ?source . ?interaction wp:target ?target . ?source rdfs:label ?label . ?target rdfs:label ?label1 . }
Get upstream adjacent nodes from a target.
A directed interaction always runs from source to target. (eg. t <-- s)
PREFIX wp: <http://vocabularies.wikipathways.org/wp#> SELECT DISTINCT ?target ?label1 ?source ?label ?pathway ?interaction WHERE { ?target dc:identifier <http://identifiers.org/ncbigene/659> . ?target dcterms:isPartOf ?pathway . ?pathway a wp:Pathway . ?interaction dcterms:isPartOf ?pathway . ?interaction a wp:Interaction . ?interaction wp:target ?target . ?interaction wp:source ?source . ?target rdfs:label ?label1 . ?source rdfs:label ?label . }
Get the number of interactions with some data source
PREFIX wp: <http://vocabularies.wikipathways.org/wp#> PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX dc: <http://purl.org/dc/elements/1.1/> SELECT DISTINCT (STR(?sourceLit) AS ?source) (COUNT(DISTINCT ?identifier) AS ?count) WHERE { ?interaction a wp:Interaction ; dcterms:identifier ?identifier ; dc:source ?sourceLit . } GROUP BY ?sourceLit ORDER BY DESC(?count)
Get the number of normalized identifiers by data source
This query gives some idea of how the interaction identifier mapping database works in practice:
PREFIX wp: <http://vocabularies.wikipathways.org/wp#> PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX dc: <http://purl.org/dc/elements/1.1/> SELECT DISTINCT (STR(?sourceLit) AS ?source) ?normalizedIdentifier (COUNT(DISTINCT ?identifier) AS ?count) WHERE { VALUES ?normalizedIdentifier { wp:bdbRhea wp:bdbReactome } ?interaction ?normalizedIdentifier ?identifier ; dc:source ?sourceLit . } GROUP BY ?sourceLit ?normalizedIdentifier ORDER BY DESC(?count) ?source
Datasource oriented queries
Get all datasources currently captured in WikiPathways
SELECT DISTINCT (str(?datasourceLit) as ?datasource) WHERE { ?concept dc:source ?datasourceLit }
Get the number of entries per datasource in WikiPathways
SELECT DISTINCT (str(?datasourceLit) as ?datasource) (count(?dataNode) as ?numberEntries) WHERE { ?concept dc:source ?datasourceLit ; wp:isAbout ?dataNode . } ORDER BY DESC(?numberEntries)
Count the identifiers per data source
SELECT (str(?datasourceLit) as ?datasource) (count(distinct ?identifier) AS ?numberEntries) WHERE { ?concept dc:source ?datasourceLit . ?concept dc:identifier ?identifier }
Count the identifiers per data source and order them from high to low
SELECT (str(?datasourceLit) as ?datasource) (count(distinct ?identifier) AS ?numberEntries) WHERE { ?concept dc:source ?datasourceLit . ?concept dc:identifier ?identifier } ORDER BY DESC(?numberEntries)
Return all compounds annotated with the "ChEMBL compound" as data source and the pathways they are in
SELECT DISTINCT ?identifier ?pathway WHERE { ?concept dcterms:isPartOf ?pathway . ?concept dc:source "ChEMBL compound"^^xsd:string . ?concept dc:identifier ?identifier . }
Curators oriented queries
Get the pathway with the erroneous data source "null"
SELECT DISTINCT ?identifier ?pathway ?label WHERE { ?concept dc:source "null"^^xsd:string . ?concept dc:identifier ?identifier . ?concept dcterms:isPartOf ?pathway . ?concept rdfs:label ?label }
Get all geneproducts that lack either a DataSource or an Identifier
prefix wp: <http://vocabularies.wikipathways.org/wp#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix dcterms: <http://purl.org/dc/terms/> select distinct ?pathway ?label where {?geneProduct a wp:GeneProduct . ?geneProduct rdfs:label ?label . ?geneProduct dcterms:isPartOf ?pathway . FILTER regex(str(?geneProduct), "^node"). FILTER regex(str(?pathway), "^http"). }
Get entities with more than one identifier
select ?entity count(?identifier) as ?count where { ?entity <http://purl.org/dc/terms/identifier> ?identifier . } order by desc(?count)
PubChem-compound 1004
Warning: may time out, which indicates there is no current use of this identifier value.
Wrongly used for phosphate. It is the uncharged compound. Phosphate is, instead, and particularly thinkgs like "Pi", CID 1061 for ortho-phosphate, aka [PO4]2-.
prefix wp: <http://vocabularies.wikipathways.org/wp#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix dcterms: <http://purl.org/dc/terms/> prefix xsd: <http://www.w3.org/2001/XMLSchema#> select ?pathway ?source where { ?mb dc:source ?source ; dcterms:isPartOf ?pathway ; dcterms:identifier "1004"^^xsd:string . }
Outdated HMDB identifiers
These results show HMDB identifiers used in WikiPathways but that are revoked or have become secondary identifiers.
prefix wp: <http://vocabularies.wikipathways.org/wp#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix dcterms: <http://purl.org/dc/terms/> select distinct (str(?identifierStr) as ?identifier) where { ?mb a wp:Metabolite ; dc:source "HMDB"^^xsd:string ; dcterms:identifier ?identifierStr . OPTIONAL { ?mb wp:bdbHmdb ?bridgedb . } FILTER (!BOUND(?bridgedb)) } order by ?identifierStr
Metabolites not classified as such
One can list all data sources for non-metabolites with this query.
prefix wp: <http://vocabularies.wikipathways.org/wp#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix dcterms: <http://purl.org/dc/terms/> select (str(?datasourceLit) as ?datasource) (count(?identifier) as ?count) where { ?mb dc:source ?datasourceLit ; dcterms:identifier ?identifier . FILTER NOT EXISTS { ?mb a wp:Metabolite } } order by desc(?count)
That mostly lists gene identifier sources, etc, but watch out for the metabolite identifier data sources. For example, metabolites not marked as such but with a metabolite identifier can be found this way. Down the list is CAS (but genes are chemicals too...), and a few minor more:
HMDB 4 ChEBI 3 GLYCAN 3 COMPOUND 3 PubChem 2
I would expect GLYCAN and COMPOUND to be misnomers of the matching KEGG subsets.
Metabolites sometimes marked as DataNode@Type Metabolite
Based on label comparisons, we can find things that are labeled the same as a data node with the same label. Of course, this can give false positives, because genes can be incorrectly marked as metabolite in some pathway, but that is another SPARQL query. Another reasons is that sometimes genes and metabolites actually have the same name!
prefix wp: <http://vocabularies.wikipathways.org/wp#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix dcterms: <http://purl.org/dc/terms/> prefix xsd: <http://www.w3.org/2001/XMLSchema#> select ?pathway ?nonmb ?mb (str(?labelLit) as ?label) where { ?nonmb rdfs:label ?labelLit . ?mb rdfs:label ?labelLit . ?nonmb dcterms:isPartOf ?pathway . FILTER ( ?nonmb != ?mb ) FILTER NOT EXISTS { ?nonmb a wp:Metabolite } FILTER EXISTS { ?pathway a wp:Pathway } FILTER EXISTS { ?mb a wp:Metabolite } }
Metabolites with too many labels
This query can result in false positives too, particularly with the new RDF.
prefix wp: <http://vocabularies.wikipathways.org/wp#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix dcterms: <http://purl.org/dc/terms/> select distinct ?mb count(distinct ?labelLit) as ?labelCount where { ?mb a wp:Metabolite ; rdfs:label ?labelLit ; dcterms:isPartOf ?pathway . ?pathway a wp:Pathway . } order by desc(?labelCount) ?mb
And get the actual labels (and more) with:
describe <http://identifiers.org/hmdb/HMDB02174>
Or use this one, but mind that pathway/label combinations are combinatorial, because they share the same node:
select distinct ?pathway (str(?labelLit) as ?label) where { <http://identifiers.org/hmdb/HMDB01401> a wp:Metabolite; rdfs:label ?labelLit ; dcterms:isPartOf ?pathway . ?pathway a wp:Pathway . } order by ?pathway
Metabolites with an Entrez Gene identifier
prefix wp: <http://vocabularies.wikipathways.org/wp#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix dcterms: <http://purl.org/dc/terms/> prefix xsd: <http://www.w3.org/2001/XMLSchema#> select distinct ?pathway ?mb (str(?labelLit) as ?label) (str(?identifierLit) as ?identifier) where { ?mb a wp:Metabolite ; rdfs:label ?labelLit ; dc:source "Entrez Gene"^^xsd:string ; dcterms:identifier ?identifierLit ; dcterms:isPartOf ?pathway . ?pathway a wp:Pathway . } order by ?pathway
Metabolites without a link to Wikidata
PREFIX wdt: <http://www.wikidata.org/prop/direct/> SELECT DISTINCT ?metabolite WHERE { ?metabolite a wp:Metabolite . OPTIONAL { ?metabolite wp:bdbWikidata ?wikidata . } FILTER (!BOUND(?wikidata)) }
A variant sorting the metabolites by the number of pathways they occur in:
PREFIX wdt: <http://www.wikidata.org/prop/direct/> SELECT ?metabolite (count(DISTINCT ?pathwayRes) as ?pathways) WHERE { ?metabolite a wp:Metabolite ; dcterms:identifier ?id ; dcterms:isPartOf ?pathwayRes . ?pathwayRes a wp:Pathway . OPTIONAL { ?metabolite wp:bdbWikidata ?wikidata . } FILTER (!BOUND(?wikidata)) } GROUP BY ?metabolite ORDER BY DESC(?pathways)
And finally, finding double mappings to Wikidata:
PREFIX wdt: <http://www.wikidata.org/prop/direct/> SELECT DISTINCT ?metaboliteID (GROUP_CONCAT(DISTINCT ?wikidata;separator=", ") AS ?results) WHERE { ?metaboliteID a wp:Metabolite . ?metaboliteID wp:bdbWikidata ?wikidata . ?metaboliteID wp:bdbWikidata ?wikidata2 . FILTER(?wikidata != ?wikidata2) } GROUP BY ?metaboliteID
Pathways without (annotated) datanodes
prefix wp: <http://vocabularies.wikipathways.org/wp#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix dcterms: <http://purl.org/dc/terms/> prefix xsd: <http://www.w3.org/2001/XMLSchema#> SELECT DISTINCT ?pathway WHERE{ ?pathway a wp:Pathway. FILTER NOT EXISTS {?node dcterms:isPartOf ?pathway. ?node a wp:DataNode} }
Pathways without literature references
SELECT (STR(?speciesLabelLit) AS ?species) (STR(?titleLit) AS ?title) ?pathway WHERE { ?pathway a wp:Pathway ; dc:title ?titleLit ; wp:organismName ?speciesLabelLit . MINUS { ?pubmed a wp:PublicationReference . ?pubmed dcterms:isPartOf ?pathway } } ORDER BY ASC(?species) ASC(?title)
Or if you just want to know how many these are:
SELECT count(DISTINCT ?pathway) WHERE { ?pathway a wp:Pathway ; dc:title ?titleLit ; wp:organismName ?speciesLabelLit . MINUS { ?pubmed a wp:PublicationReference . ?pubmed dcterms:isPartOf ?pathway } }
Literature queries
Articles cited by Reactome but not by WikiPathways
PREFIX cur: <http://vocabularies.wikipathways.org/wp#Curation:> SELECT (COUNT(DISTINCT ?pubmed) AS ?count) WHERE { ?pubmed a wp:PublicationReference . MINUS { ?pubmed dcterms:isPartOf/wp:ontologyTag cur:AnalysisCollection } { ?pubmed dcterms:isPartOf/wp:ontologyTag cur:Reactome_Approved } }
Articles cited by WikiPathways but not by Reactome
PREFIX cur: <http://vocabularies.wikipathways.org/wp#Curation:> SELECT (COUNT(DISTINCT ?pubmed) AS ?count) WHERE { ?pubmed a wp:PublicationReference . { ?pubmed dcterms:isPartOf/wp:ontologyTag cur:AnalysisCollection } MINUS { ?pubmed dcterms:isPartOf/wp:ontologyTag cur:Reactome_Approved } }
Articles cited by both Reactome and WikiPathways
PREFIX cur: <http://vocabularies.wikipathways.org/wp#Curation:> SELECT (COUNT(DISTINCT ?pubmed) AS ?count) WHERE { ?pubmed a wp:PublicationReference . { ?pubmed dcterms:isPartOf/wp:ontologyTag cur:AnalysisCollection } { ?pubmed dcterms:isPartOf/wp:ontologyTag cur:Reactome_Approved } }
Federated queries - !Under Construction!
Other SPARQL endpoints used in the federated queries
- Arrayexpress Atlas: http://wwwdev.ebi.ac.uk/fgpt/gxa-sparql/index.jsp
- Gene Wiki: http://genewiki.semwebinsi.de
- ChEMBL: https://www.ebi.ac.uk/rdf/services/sparql (old: http://rdf.farmbio.uu.se/chembl/sparql/ ).
- Text mining from Fraunhofer Institutes at University of Bonn: http://ops-virtuoso.scai.fraunhofer.de:8893/sparql
WikiPathways with ChEMBL: all ChEMBL assays for pathways
Note the restriction to 50 UniProt IRIs from WikiPathways. Make it larger, and the query will take longer to complete.
PREFIX chembl: <http://rdf.ebi.ac.uk/terms/chembl#> SELECT ?pathway ?chembluniprot ?assay WHERE { { SELECT DISTINCT ?pathway iri( bif:concat("http://purl.uniprot.org/uniprot/", bif:regexp_substr('http://identifiers.org/uniprot/(.*)',?uniprot, 1)) ) as ?chembluniprot WHERE { VALUES ?type { wp:Protein wp:GeneProduct } ?s a ?type ; wp:bdbUniprot ?uniprot ; dcterms:isPartOf ?pathway . ?pathway a wp:Pathway . } LIMIT 50 } SERVICE <http://www.ebi.ac.uk/rdf/services/chembl/sparql> { ?assay a chembl:Assay ; chembl:hasTarget/chembl:hasTargetComponent/chembl:targetCmptXref ?chembluniprot . } }
WikiPathways with ChEMBL: all molecules targeting pathways
Here a limit is used too.
PREFIX chembl: <http://rdf.ebi.ac.uk/terms/chembl#> PREFIX sio: <http://semanticscience.org/resource/> SELECT DISTINCT ?pathway ?chembluniprot ?molecule ?smiles WHERE { { SELECT DISTINCT ?pathway iri( bif:concat("http://purl.uniprot.org/uniprot/", bif:regexp_substr('http://identifiers.org/uniprot/(.*)',?uniprot, 1)) ) as ?chembluniprot WHERE { ?s ?p ?uniprot . ?s dcterms:isPartOf ?pathway . FILTER regex(?uniprot, "uniprot") } LIMIT 50 } SERVICE <http://www.ebi.ac.uk/rdf/services/chembl/sparql> { ?assay a chembl:Assay ; chembl:hasTarget/chembl:hasTargetComponent/chembl:targetCmptXref ?chembluniprot . ?activity chembl:hasAssay ?assay ; chembl:hasMolecule ?molecule . OPTIONAL { ?molecule sio:SIO_000008 ?attrib . ?attrib a sio:CHEMINF_000018 ; sio:SIO_000300 ?smiles . } } }
WikiPathways with EBI Atlas RDF - !Under Construction!
Genes differentially expressed in asthma and Pathways
For the genes differentially expressed in asthma, get the gene products associated to a WikiPathways pathway. (Built upon example query 5 in: http://www.ebi.ac.uk/rdf/services/atlas/sparql ). You can substitute the EFO number for other disease codes.
PREFIX identifiers:<http://identifiers.org/ensembl/> PREFIX atlas: <http://rdf.ebi.ac.uk/resource/atlas/> PREFIX atlasterms: <http://rdf.ebi.ac.uk/terms/atlas/> PREFIX efo: <http://www.ebi.ac.uk/efo/> SELECT DISTINCT ?wpURL ?pwTitle ?expressionValue ?pvalue where { SERVICE <https://www.ebi.ac.uk/rdf/services/atlas/sparql> { ?factor rdf:type efo:EFO_0000270 . ?value atlasterms:hasFactorValue ?factor . ?value atlasterms:isMeasurementOf ?probe . ?value atlasterms:pValue ?pvalue . ?value rdfs:label ?expressionValue . ?probe atlasterms:dbXref ?dbXref . } ?pwElement dcterms:isPartOf ?pathway . ?pathway dc:title ?pwTitle . ?pathway dc:identifier ?wpURL . ?pwElement wp:bdbEnsembl ?dbXref . } ORDER BY ASC(?pvalue)
Genes differentially expressed in type II diabetes mellitus and Pathways
PREFIX identifiers:<http://identifiers.org/ensembl/> PREFIX atlas: <http://rdf.ebi.ac.uk/resource/atlas/> PREFIX atlasterms: <http://rdf.ebi.ac.uk/terms/atlas/> PREFIX efo: <http://www.ebi.ac.uk/efo/> SELECT DISTINCT ?wpURL ?pwTitle ?expressionValue ?pvalue where { SERVICE <https://www.ebi.ac.uk/rdf/services/atlas/sparql> { ?factor rdf:type efo:EFO_0001360 . ?value atlasterms:hasFactorValue ?factor . ?value atlasterms:isMeasurementOf ?probe . ?value atlasterms:pValue ?pvalue . ?value rdfs:label ?expressionValue . ?probe atlasterms:dbXref ?dbXref . } ?pwElement dcterms:isPartOf ?pathway . ?pathway dc:title ?pwTitle . ?pathway dc:identifier ?wpURL . ?pwElement wp:bdbEnsembl ?dbXref . } ORDER BY ASC(?pvalue)
Genes differentially expressed in obesity and Pathways
PREFIX identifiers:<http://identifiers.org/ensembl/> PREFIX atlas: <http://rdf.ebi.ac.uk/resource/atlas/> PREFIX atlasterms: <http://rdf.ebi.ac.uk/terms/atlas/> PREFIX efo: <http://www.ebi.ac.uk/efo/> SELECT DISTINCT ?wpURL ?pwTitle ?expressionValue ?pvalue where { SERVICE <https://www.ebi.ac.uk/rdf/services/atlas/sparql> { ?factor rdf:type efo:EFO_0001073 . ?value atlasterms:hasFactorValue ?factor . ?value atlasterms:isMeasurementOf ?probe . ?value atlasterms:pValue ?pvalue . ?value rdfs:label ?expressionValue . ?probe atlasterms:dbXref ?dbXref . } ?pwElement dcterms:isPartOf ?pathway . ?pathway dc:title ?pwTitle . ?pathway dc:identifier ?wpURL . ?pwElement wp:bdbEnsembl ?dbXref . } ORDER BY ASC(?pvalue)
WikiPathways with Wikidata - !Under Construction!
The following queries are run on the WikiPathways SPARQL end point. But you can run federated queries on the Wikidata SPARQL end point too. Example queries for that are found here.
Metabolites in Wikipedia with InChIKeys from Wikidata
The corresponding query on Wikidata is here.
PREFIX wdt: <http://www.wikidata.org/prop/direct/> SELECT ?metabolite ?wikidata ?inchikey WHERE { ?metabolite a wp:Metabolite ; wp:bdbWikidata ?wikidata . SERVICE <https://query.wikidata.org/sparql> { ?wikidata wdt:P235 ?inchikey . } } LIMIT 10
Identifier to WikiPathways lists
List of WikiPathways for Ensembl identifiers
select distinct ?pathwayRes (str(?wpid) as ?pathway) (str(?title) as ?pathwayTitle) (fn:substring(?ensId,32) as ?ensembl) where { ?gene a wp:GeneProduct ; dcterms:identifier ?id ; dcterms:isPartOf ?pathwayRes ; wp:bdbEnsembl ?ensId . ?pathwayRes a wp:Pathway ; dcterms:identifier ?wpid ; dc:title ?title . }
List of WikiPathways for HGNC symbols
select distinct ?pathwayRes (str(?wpid) as ?pathway) (str(?title) as ?pathwayTitle) (fn:substring(?hgncId,36) as ?HGNC) where { ?gene a wp:GeneProduct ; dcterms:identifier ?id ; dcterms:isPartOf ?pathwayRes ; wp:bdbHgncSymbol ?hgncId . ?pathwayRes a wp:Pathway ; dcterms:identifier ?wpid ; dc:title ?title . }
List of WikiPathways for NCBI Gene identifiers
select distinct ?pathwayRes (str(?wpid) as ?pathway) (str(?title) as ?pathwayTitle) (fn:substring(?ncbiGeneId,33) as ?NCBIGene) where { ?gene a wp:GeneProduct ; dcterms:identifier ?id ; dcterms:isPartOf ?pathwayRes ; wp:bdbEntrezGene ?ncbiGeneId . ?pathwayRes a wp:Pathway ; dcterms:identifier ?wpid ; dc:title ?title . }
List of WikiPathways for HMDB identifiers
select distinct ?pathwayRes (str(?wpid) as ?pathway) (str(?title) as ?pathwayTitle) (fn:substring(?hmdbId,29) as ?hmdb) where { ?gene a wp:Metabolite ; dcterms:identifier ?id ; dcterms:isPartOf ?pathwayRes ; wp:bdbHmdb ?hmdbId . ?pathwayRes a wp:Pathway ; dcterms:identifier ?wpid ; dc:title ?title . }
List of WikiPathways for ChemSpider identifiers
select distinct ?pathwayRes (str(?wpid) as ?pathway) (str(?title) as ?pathwayTitle) (fn:substring(?csId,35) as ?chemspider) where { ?gene a wp:Metabolite ; dcterms:identifier ?id ; dcterms:isPartOf ?pathwayRes ; wp:bdbChemspider ?csId . ?pathwayRes a wp:Pathway ; dcterms:identifier ?wpid ; dc:title ?title . }
List of WikiPathways for PubChem CID identifiers
select distinct ?pathwayRes (str(?wpid) as ?pathway) (str(?title) as ?pathwayTitle) (fn:substring(?cid,46) as ?PubChem) where { ?gene a wp:Metabolite ; dcterms:identifier ?id ; dcterms:isPartOf ?pathwayRes ; wp:bdbPubChem ?cid . ?pathwayRes a wp:Pathway ; dcterms:identifier ?wpid ; dc:title ?title . }
Code examples
Perl
There is an RDF api available. Below is an example that extracts the data by converting the query into a url and extracts the data as CSV.
#!/usr/bin/perl use LWP::Simple; use URI::Escape; my $sparql = "SELECT DISTINCT ?wpIdentifier ?elementneedsattention ?elementLabel WHERE { ?pathway dc:title ?title . ?elementneedsattention a gpml:requiresCurationAttention . ?elementneedsattention dcterms:isPartOf ?pathway . ?elementneedsattention rdfs:label ?elementLabel . ?pathway wp:organism ?organism . ?pathway foaf:page ?page . ?pathway dc:identifier ?wpIdentifier . ?organism rdfs:label \"Mus musculus\"^^<http://www.w3.org/2001/XMLSchema#string> . } ORDER BY ?wpIdentifier"; my $url = 'http://sparql.wikipathways.org/sparql?default-graph-uri=&query='.uri_escape($sparql).'&format=text%2Fcsv&timeout=0&debug=on'; my $content = get $url; die "Couldn't get $url" unless defined $content; print $content;
Java
For java we recommend the Jena Framework.
import com.hp.hpl.jena.query.Query; import com.hp.hpl.jena.query.QueryExecution; import com.hp.hpl.jena.query.QueryExecutionFactory; import com.hp.hpl.jena.query.QueryFactory; import com.hp.hpl.jena.query.QuerySolution; import com.hp.hpl.jena.query.ResultSet; public class javaCodeExample { public static void main(String[] args) { String sparqlQueryString = "SELECT * WHERE {?s ?p ?o} LIMIT 10"; Query query = QueryFactory.create(sparqlQueryString); QueryExecution queryExecution = QueryExecutionFactory.sparqlService("http://sparql.wikipathways.org", query); ResultSet resultSet = queryExecution.execSelect(); while (resultSet.hasNext()) { QuerySolution solution = resultSet.next(); System.out.print(solution.get("s")); System.out.print("\t"+solution.get("p")); System.out.println("\t"+solution.get("o")); } } }
php
For php we recommend the arc2: Easy RDF and SPARQL for LAMP systems
R
The R package rrdf can be found and installed from https://github.com/egonw/rrdf.
library(rrdf) sparql.remote( "http://sparql.wikipathways.org/", "SELECT DISTINCT ?p WHERE { ?s ?p ?o }" )
Bioclipse
The below code works in both the JavaScript and the Groovy console:
rdf.sparqlRemote( "http://sparql.wikipathways.org/", "SELECT DISTINCT ?p WHERE { ?s ?p ?o }" )
SPARQL from the command line
For quick and easy querying, we recommend to use curl (Linux and OS X)
curl -F "query=SELECT * WHERE {?s ?p ?o} LIMIT 10" http://sparql.wikipathways.org/sparql