sbd-data-book

allJRCNM01005aRelationships.rq

Code examples: curl

SPARQL

PREFIX sbd:  <https://www.sbd4nano.eu/rdf/#>
PREFIX sbdbel:  <https://www.sbd4nano.eu/bel/#>
PREFIX enm:     <http://purl.enanomapper.org/onto/>
PREFIX npo: <http://purl.bioontology.org/ontology/npo#>
PREFIX sio: <http://semanticscience.org/resource/SIO_>
PREFIX sbdbel2:  <https://h2020-sbd4nano.github.io/sbdbel/>

SELECT DISTINCT
  ?nm (SAMPLE(?nmLabel_) AS ?nmLabel)
  (COUNT(DISTINCT ?relation) AS ?relations)
WHERE {
  VALUES ?ca { sbdbel:CausalAssertion sbd:CausalAssertion sbdbel2:CausalAssertion }
  VALUES ?nm { enm:ENM_9000077 }
  ?nm rdfs:label ?nmLabel_ .
  OPTIONAL { ?relation a ?ca ; sbdbel:NP | sio:000332 | sbdbel2:NP ?nm . }
} GROUP BY ?superclass ?nm

run

Output

nm relations
JRCNM01005a 0

Code examples

curl

curl -s https://raw.githubusercontent.com/h2020-sbd4nano/sbd-data-book/master/sparql/allJRCNM01005aRelationships.rq | sed 's+<lang/>+en+' > allJRCNM01005aRelationships.rq

curl -H "Accept: text/tab-separated-values" -G https://sbd4nanolandscape.rdf.bigcat-bioinformatics.org/sparql --data-urlencode query@allJRCNM01005aRelationships.rq

This SPARQL query is available under CCZero.