@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rdf4j: <http://rdf4j.org/schema/rdf4j#> .
@prefix sesame: <http://www.openrdf.org/schema/sesame#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix fn: <http://www.w3.org/2005/xpath-functions#> .

<http://purl.uniprot.org/unirules/MF_00971#construct> a <http://www.w3.org/ns/shacl#SPARQLRule>,
    <http://spinrdf.org/sp#Construct>;
  <https://hamap.expasy.org/rdf/vocab#addsTriple> <http://purl.uniprot.org/unirules/MF_00971#construct-template-29>,
    <http://purl.uniprot.org/unirules/MF_00971#construct-template-30>, <http://purl.uniprot.org/unirules/MF_00971#construct-template-47>,
    <http://purl.uniprot.org/unirules/MF_00971#construct-template-23>, <http://purl.uniprot.org/unirules/MF_00971#construct-template-0>,
    <http://purl.uniprot.org/unirules/MF_00971#construct-template-48>, <http://purl.uniprot.org/unirules/MF_00971#construct-template-24>,
    <http://purl.uniprot.org/unirules/MF_00971#construct-template-1>, <http://purl.uniprot.org/unirules/MF_00971#construct-template-51>,
    <http://purl.uniprot.org/unirules/MF_00971#construct-template-9>, <http://purl.uniprot.org/unirules/MF_00971#construct-template-31>,
    <http://purl.uniprot.org/unirules/MF_00971#construct-template-49>, <http://purl.uniprot.org/unirules/MF_00971#construct-template-25>,
    <http://purl.uniprot.org/unirules/MF_00971#construct-template-16>, <http://purl.uniprot.org/unirules/MF_00971#construct-template-36>,
    <http://purl.uniprot.org/unirules/MF_00971#construct-template-26>, <http://purl.uniprot.org/unirules/MF_00971#construct-template-40>,
    <http://purl.uniprot.org/unirules/MF_00971#construct-template-27>, <http://purl.uniprot.org/unirules/MF_00971#construct-template-7>,
    <http://purl.uniprot.org/unirules/MF_00971#construct-template-14>, <http://purl.uniprot.org/unirules/MF_00971#construct-template-28>,
    <http://purl.uniprot.org/unirules/MF_00971#construct-template-34>, <http://purl.uniprot.org/unirules/MF_00971#construct-template-38>,
    <http://purl.uniprot.org/unirules/MF_00971#construct-template-12>, <http://purl.uniprot.org/unirules/MF_00971#construct-template-3>,
    <http://purl.uniprot.org/unirules/MF_00971#construct-template-21>, <http://purl.uniprot.org/unirules/MF_00971#construct-template-53>,
    <http://purl.uniprot.org/unirules/MF_00971#construct-template-18>, <http://purl.uniprot.org/unirules/MF_00971#construct-template-41>,
    <http://purl.uniprot.org/unirules/MF_00971#construct-template-42>, <http://purl.uniprot.org/unirules/MF_00971#construct-template-43>,
    <http://purl.uniprot.org/unirules/MF_00971#construct-template-17>, <http://purl.uniprot.org/unirules/MF_00971#construct-template-44>,
    <http://purl.uniprot.org/unirules/MF_00971#construct-template-20>, <http://purl.uniprot.org/unirules/MF_00971#construct-template-5>,
    <http://purl.uniprot.org/unirules/MF_00971#construct-template-10>, <http://purl.uniprot.org/unirules/MF_00971#construct-template-11>,
    <http://purl.uniprot.org/unirules/MF_00971#construct-template-45>, <http://purl.uniprot.org/unirules/MF_00971#construct-template-8>,
    <http://purl.uniprot.org/unirules/MF_00971#construct-template-46>, <http://purl.uniprot.org/unirules/MF_00971#construct-template-22>,
    <http://purl.uniprot.org/unirules/MF_00971#construct-template-35>, <http://purl.uniprot.org/unirules/MF_00971#construct-template-19>,
    <http://purl.uniprot.org/unirules/MF_00971#construct-template-39>, <http://purl.uniprot.org/unirules/MF_00971#construct-template-4>,
    <http://purl.uniprot.org/unirules/MF_00971#construct-template-37>, <http://purl.uniprot.org/unirules/MF_00971#construct-template-13>,
    <http://purl.uniprot.org/unirules/MF_00971#construct-template-32>, <http://purl.uniprot.org/unirules/MF_00971#construct-template-33>,
    <http://purl.uniprot.org/unirules/MF_00971#construct-template-2>, <http://purl.uniprot.org/unirules/MF_00971#construct-template-50>,
    <http://purl.uniprot.org/unirules/MF_00971#construct-template-15>, <http://purl.uniprot.org/unirules/MF_00971#construct-template-6>,
    <http://purl.uniprot.org/unirules/MF_00971#construct-template-52>;
  <http://www.w3.org/ns/shacl#prefixes> <http://purl.uniprot.org/unirules/>;
  <http://spinrdf.org/sp#where> <http://purl.uniprot.org/unirules/MF_00971#construct-where-list-0>;
  <http://spinrdf.org/sp#templates> <http://purl.uniprot.org/unirules/MF_00971#construct-template-list-0>;
  <http://www.w3.org/ns/shacl#construct> """CONSTRUCT {
  _:338650 up:source unirule:MF_00971 .
  _:338651 up:source unirule:MF_00971 .
  _:338652 up:source unirule:MF_00971 .
  _:338653 up:source unirule:MF_00971 .
  _:338654 up:source unirule:MF_00971 .
  _:338655 up:source unirule:MF_00971 .
  _:338656 up:source unirule:MF_00971 .
  _:338657 up:source unirule:MF_00971 .
  _:338658 up:source unirule:MF_00971 .
  _:338659 up:source unirule:MF_00971 .
  _:338660 up:source unirule:MF_00971 .
  _:338661 up:source unirule:MF_00971 .
  ?this up:annotation ?annotation2 ,
      ?annotation3 ,
      ?annotation4 ;
    up:classifiedWith GO:0003677 ,
      GO:0005524 ,
      keyword:238 ,
      keyword:378 ,
      keyword:547 ,
      keyword:67 ;
    up:recommendedName ?name0 .
  ?name0 up:fullName 'DNA-binding protein MutS2' ;
    rdf:type up:Structured_Name .
  ?gene1 skos:prefLabel 'mutS2' .
  ?annotation2 a up:Function_Annotation ;
    rdfs:comment 'Has ATPase and non-specific DNA-binding activities.' .
  ?annotation3 up:cofactor chebi:60240 ;
    rdf:type up:Cofactor_Annotation .
  ?annotation4 a up:Similarity_Annotation ;
    rdfs:comment 'Belongs to the DNA mismatch repair MutS family. Archaeal Muts2 subfamily.' .
  ?pfs5 up:annotation ?annotation6 .
  ?annotation6 faldo:begin ?pfsb7 ;
    faldo:end ?pfse8 ;
    up:ligand ?ligand9 ;
    rdf:type up:Binding_Site_Annotation .
  ?pfsb7 faldo:position ?thisPositionOn10 ;
    rdf:type faldo:ExactPosition .
  ?pfse8 faldo:position ?thisPositionOn11 ;
    rdf:type faldo:ExactPosition .
  ?ligand9 rdfs:subClassOf chebi:30616 .
  _:338662 a rdf:Statement ;
    up:attribution _:338650 ;
    rdf:subject ?this ;
    rdf:predicate up:recommendedName ;
    rdf:object ?name0 .
  _:338663 a rdf:Statement ;
    up:attribution _:338651 ;
    rdf:subject ?gene1 ;
    rdf:predicate up:encodedBy ;
    rdf:object ?gene1 .
  _:338664 a rdf:Statement ;
    up:attribution _:338652 ;
    rdf:subject ?this ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation2 .
  _:338665 a rdf:Statement ;
    up:attribution _:338653 ;
    rdf:subject ?this ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation3 .
  _:338666 a rdf:Statement ;
    up:attribution _:338654 ;
    rdf:subject ?this ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation4 .
  _:338667 a rdf:Statement ;
    up:attribution _:338655 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:67 .
  _:338668 a rdf:Statement ;
    up:attribution _:338656 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:238 .
  _:338669 a rdf:Statement ;
    up:attribution _:338657 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:378 .
  _:338670 a rdf:Statement ;
    up:attribution _:338658 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:547 .
  _:338671 a rdf:Statement ;
    up:attribution _:338659 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object GO:0005524 .
  _:338672 a rdf:Statement ;
    up:attribution _:338660 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object GO:0003677 .
  _:338673 a rdf:Statement ;
    up:source unirule:MF_00971 ;
    rdf:subject ?pfs5 ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation6 .
  _:338674 a rdf:Statement ;
    up:attribution _:338661 ;
    rdf:subject ?pfs5 ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation6 .
}
WHERE {
  #baseURI: http://purl.uniprot.org/unirule/MF_00971
  #Rule MF_00971 Created by:? on:2013-08-08 Modified by:Edouard de Castro on:2022-11-19
  ?this up:organism ?thisOrganism ;
    rdfs:seeAlso signature:MF_00971 .
  ?thisOrganism rdfs:subClassOf+ taxon:2157 .
  BIND(URI(CONCAT(STR(?this), '#MF_00971a0')) AS ?name0) .
  BIND(URI(CONCAT(STR(?this), '#MF_00971a2')) AS ?annotation2) .
  BIND(URI(CONCAT(STR(?this), '#MF_00971a3')) AS ?annotation3) .
  BIND(URI(CONCAT(STR(?this), '#MF_00971a4')) AS ?annotation4) .
  OPTIONAL {
    ?this up:sequence ?thisSequence .
    ?thisSequence rdf:value ?thisSequenceValue .
    ?templateMotifMatch16 faldo:location ?templateMotifSequenceMatchRegionQ8U3J217 ;
      edam:is_output_of ?templateMotifSequenceProfileAlignmentOperationQ8U3J219 ;
      rdf:type edam:data_0869 ;
      rdf:value ?templateMotifCigarQ8U3J2MF_0097112 .
    ?templateMotifSequenceMatchRegionQ8U3J217 faldo:begin ?templateMotifSequenceMatchBeginQ8U3J218 .
    ?templateMotifSequenceMatchBeginQ8U3J218 faldo:position ?templateMotifSequenceMatchBeginPositionQ8U3J213 ;
      faldo:reference isoform:Q8U3J2-1 .
    ?templateMotifSequenceProfileAlignmentOperationQ8U3J219 edam:has_input signature:MF_00971 ;
      rdf:type edam:operation_0300 .
    ?targetMotifMatch20 faldo:location ?targetMotifMatchRegionMatch21 ;
      edam:is_output_of ?targetMotifSequenceAlignmentOperationMF_0097123 ;
      rdf:type edam:data_0869 ;
      rdf:value ?targetMotifMatchCigarQ8U3J2MF_0097114 .
    ?targetMotifMatchRegionMatch21 faldo:begin ?targetMotifMatchRegionMatchBeginMF_0097122 .
    ?targetMotifMatchRegionMatchBeginMF_0097122 faldo:position ?targetMotifMatchRegionMatchBeginPositionMF_0097115 ;
      faldo:reference ?thisSequence .
    ?targetMotifSequenceAlignmentOperationMF_0097123 edam:has_input signature:MF_00971 ;
      rdf:type edam:operation_0300 .
    BIND(STRLEN(REPLACE(SUBSTR(?templateMotifCigarQ8U3J2MF_0097112, 1, (STRLEN(?templateMotifCigarQ8U3J2MF_0097112) - STRLEN(REPLACE(?templateMotifCigarQ8U3J2MF_0097112, CONCAT('^(?:-*[^-]){', STR(((380 - ?templateMotifSequenceMatchBeginPositionQ8U3J213) + 1)), '}'), '')))), '[a-z]', '')) AS ?step124) .
    BIND((STRLEN(SUBSTR(?targetMotifMatchCigarQ8U3J2MF_0097114, 1, (STRLEN(?targetMotifMatchCigarQ8U3J2MF_0097114) - STRLEN(REPLACE(?targetMotifMatchCigarQ8U3J2MF_0097114, CONCAT('^(?:[a-z]*(?:[A-Z]|-)){', STR(?step124), '}'), ''))))) - STRLEN(REPLACE(SUBSTR(?targetMotifMatchCigarQ8U3J2MF_0097114, 1, (STRLEN(?targetMotifMatchCigarQ8U3J2MF_0097114) - STRLEN(REPLACE(?targetMotifMatchCigarQ8U3J2MF_0097114, CONCAT('^(?:[a-z]*(?:[A-Z]|-)){', STR(?step124), '}'), '')))), '[^-]', ''))) AS ?step225) .
    BIND(((?step225 + ?targetMotifMatchRegionMatchBeginPositionMF_0097115) - 1) AS ?thisPositionOn10) .
    BIND(STRLEN(REPLACE(SUBSTR(?templateMotifCigarQ8U3J2MF_0097112, 1, (STRLEN(?templateMotifCigarQ8U3J2MF_0097112) - STRLEN(REPLACE(?templateMotifCigarQ8U3J2MF_0097112, CONCAT('^(?:-*[^-]){', STR(((387 - ?templateMotifSequenceMatchBeginPositionQ8U3J213) + 1)), '}'), '')))), '[a-z]', '')) AS ?step126) .
    BIND((STRLEN(SUBSTR(?targetMotifMatchCigarQ8U3J2MF_0097114, 1, (STRLEN(?targetMotifMatchCigarQ8U3J2MF_0097114) - STRLEN(REPLACE(?targetMotifMatchCigarQ8U3J2MF_0097114, CONCAT('^(?:[a-z]*(?:[A-Z]|-)){', STR(?step126), '}'), ''))))) - STRLEN(REPLACE(SUBSTR(?targetMotifMatchCigarQ8U3J2MF_0097114, 1, (STRLEN(?targetMotifMatchCigarQ8U3J2MF_0097114) - STRLEN(REPLACE(?targetMotifMatchCigarQ8U3J2MF_0097114, CONCAT('^(?:[a-z]*(?:[A-Z]|-)){', STR(?step126), '}'), '')))), '[^-]', ''))) AS ?step227) .
    BIND(((?step227 + ?targetMotifMatchRegionMatchBeginPositionMF_0097115) - 1) AS ?thisPositionOn11) .
    BIND(?this AS ?pfs1t28) .
    BIND(URI(CONCAT(STR(?thisSequence), '#position', STR(?thisPositionOn10))) AS ?pfsb7) .
    BIND(URI(CONCAT(STR(?thisSequence), '#position', STR(?thisPositionOn11))) AS ?pfse8) .
    FILTER (REGEX('G[ARNDCQEGHILKMFPSTWYVBZJUOX]N[ARNDCQEGHILKMFPSTWYVBZJUOX]GGK[TS]', SUBSTR(?thisSequenceValue, ?thisPositionOn10, (?thisPositionOn11 - ?thisPositionOn10)))) .
    BIND(URI(CONCAT(STR(?this), '#MF_00971a6')) AS ?annotation6) .
    BIND(?this AS ?pfs5) .
  }
}
""" .

<http://purl.uniprot.org/unirules/MF_00971> <http://www.w3.org/ns/shacl#rule> <http://purl.uniprot.org/unirules/MF_00971#construct> .
