@prefix ex: <https://sparql.uniprot.org/.well-known/sparql-examples/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <https://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .

ex:108_uniprot_signature_match_start_end a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "List all InterPro member database signature match start and end for a specific UniProtKB protein."@en ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX faldo: <http://biohackathon.org/resource/faldo#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX up: <http://purl.uniprot.org/core/>

SELECT 
  ?protein ?interproMemberDatabaseXref ?matchStart ?matchEnd
WHERE{
  GRAPH <http://sparql.uniprot.org/uniprot> {
    VALUES ?protein {<http://purl.uniprot.org/uniprot/P05067>} .
    ?protein rdfs:seeAlso ?sa .
  }
  GRAPH <http://sparql.uniprot.org/uniparc> {
    ?uniparc up:sequenceFor ?protein ;
      rdfs:seeAlso ?interproMemberDatabaseXref .
    ?interproDatabaseXref up:signatureSequenceMatch ?sam .
    ?sam faldo:begin ?sab ;
      faldo:end ?sae .
    ?sab faldo:position ?matchStart ;
      faldo:reference ?uniparc .
    ?sae  faldo:position ?matchEnd ;
      faldo:reference ?uniparc .
  }
}""" ;
    schema:keywords "InterPro" , "search within sequence" , "domain" ; 
    schema:target <https://sparql.uniprot.org/sparql/> .

