sparql-examples

A set of SPARQL examples that are used in different SIB resources

View the Project on GitHub sib-swiss/sparql-examples

NXQ_00002

rq turtle/ttl

Proteins that are located in both the nucleus and in the cytoplasm

Use at

PREFIX : <http://nextprot.org/rdf/>
PREFIX nextprot_cv: <http://nextprot.org/rdf/terminology/>

SELECT DISTINCT ?entry WHERE {
 values ?cytoloc {nextprot_cv:GO_0005737 nextprot_cv:SL-0086} # GO and SL values for cytoplasm
 values ?nucloc {nextprot_cv:GO_0005634 nextprot_cv:SL-0191} # GO and SL values for nucleus
 ?entry :isoform ?iso.
 ?iso :cellularComponent ?loc1, ?loc2 .
 ?loc1 :term /:childOf ?cytoloc .
 ?loc2 :term /:childOf ?nucloc .
 filter not exists {?loc1 :negativeEvidence ?negev} # No negative localization evidence
 filter not exists {?loc2 :negativeEvidence ?negev} # No negative localization evidence
}

# Note the dot "." at the end of statements.
# If missing, you will get a syntax error.
#
# Use a comma to retrieve two localizations in:
# ?iso :cellularComponent ?loc1, ?loc2 .