sparql-examples

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

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

neXtProt/NXQ_00108

Proteins that have a 3D structure in PDB that overlap by at least 50 amino acids with a SH3 domain

Use at

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

SELECT DISTINCT ?entry WHERE {
 ?entry :isoform ?isoform.
 ?isoform :pdbMapping ?struc.
 ?struc :start ?s1 ; :end ?s2.
 ?isoform :region ?dom.
 ?dom :term nextprot_cv:DO-00615 ; :start ?d1 ; :end ?d2.
 bind ( if(?d2<?s2, ?d2, ?s2) - if(?d1>?s1, ?d1, ?s1) as ?overlap) .
 filter (?overlap>50)
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v8("?d1")
  v9("?d2")
  v7("?dom")
  v2("?entry"):::projected 
  v3("?isoform")
  v10("?overlap")
  v5("?s1")
  v6("?s2")
  v4("?struc")
  c8([":terminology/DO-00615"]):::iri 
  f0[["?overlap > '50^^xsd:integer'"]]
  f0 --> v10
  v2 --":isoform"-->  v3
  v3 --":pdbMapping"-->  v4
  v4 --":start"-->  v5
  v4 --":end"-->  v6
  v3 --":region"-->  v7
  v7 --":term"-->  c8
  v7 --":start"-->  v8
  v7 --":end"-->  v9
  bind1[/"if(?d2 < ?s2,?d2,?s2) - if(?d1 > ?s1,?d1,?s1)"/]
  v9 --o bind1
  v6 --o bind1
  v8 --o bind1
  v5 --o bind1
  bind1 --as--o v10