@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_03166#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_03166#construct-template-50>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-32>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-4>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-42>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-27>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-8>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-15>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-41>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-48>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-11>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-49>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-16>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-31>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-55>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-6>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-33>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-20>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-37>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-66>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-13>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-43>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-30>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-17>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-9>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-46>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-29>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-54>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-2>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-44>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-53>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-7>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-18>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-52>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-25>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-51>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-57>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-23>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-22>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-45>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-0>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-58>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-38>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-14>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-21>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-10>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-12>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-36>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-35>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-59>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-24>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-34>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-62>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-47>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-56>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-3>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-40>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-26>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-1>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-28>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-19>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-64>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-39>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-65>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-5>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-67>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-63>, <http://purl.uniprot.org/unirules/MF_03166#construct-template-60>,
    <http://purl.uniprot.org/unirules/MF_03166#construct-template-61>;
  <http://www.w3.org/ns/shacl#prefixes> <http://purl.uniprot.org/unirules/>;
  <http://spinrdf.org/sp#where> <http://purl.uniprot.org/unirules/MF_03166#construct-where-list-0>;
  <http://spinrdf.org/sp#templates> <http://purl.uniprot.org/unirules/MF_03166#construct-template-list-0>;
  <http://www.w3.org/ns/shacl#construct> """CONSTRUCT {
  _:854825 up:source unirule:MF_03166 .
  _:854826 up:source unirule:MF_03166 .
  _:854827 up:source unirule:MF_03166 .
  _:854828 up:source unirule:MF_03166 .
  _:854829 up:source unirule:MF_03166 .
  _:854830 up:source unirule:MF_03166 .
  _:854831 up:source unirule:MF_03166 .
  _:854832 up:source unirule:MF_03166 .
  _:854833 up:source unirule:MF_03166 .
  _:854834 up:source unirule:MF_03166 .
  _:854835 up:source unirule:MF_03166 .
  _:854836 up:source unirule:MF_03166 .
  _:854837 up:source unirule:MF_03166 .
  _:854838 up:source unirule:MF_03166 .
  _:854839 up:source unirule:MF_03166 .
  ?this up:annotation ?annotation1 ,
      ?annotation2 ,
      ?annotation4 ,
      ?annotation7 ;
    up:classifiedWith GO:0004844 ,
      GO:0005634 ,
      GO:0005739 ,
      GO:0006284 ,
      keyword:227 ,
      keyword:234 ,
      keyword:378 ,
      keyword:496 ,
      keyword:539 ;
    up:recommendedName ?name0 .
  ?name0 up:ecName '3.2.2.27' ;
    up:fullName 'Uracil-DNA glycosylase' ;
    up:shortName 'UDG' ;
    rdf:type up:Structured_Name .
  ?annotation1 a up:Function_Annotation ;
    rdfs:comment 'Excises uracil residues from the DNA which can arise as a result of misincorporation of dUMP residues by DNA polymerase or due to deamination of cytosine.' .
  ?annotation2 up:activity ?activity3 ;
    rdf:type up:Catalytic_Activity_Annotation .
  ?activity3 up:enzymeClass <http://purl.uniprot.org/enzyme/3.2.2.27>.
  ?annotation4 a up:Subcellular_Location_Annotation .
  ?annotation4li5 up:cellularComponent <http://purl.uniprot.org/locations/null>.
  ?annotation4li6 up:cellularComponent <http://purl.uniprot.org/locations/null>.
  ?annotation7 a up:Similarity_Annotation ;
    rdfs:comment 'Belongs to the uracil-DNA glycosylase (UDG) superfamily. UNG family.' .
  ?pfs11 up:annotation ?annotation12 .
  ?annotation12 faldo:begin ?pfsb13 ;
    faldo:end ?pfse14 ;
    rdf:type up:Active_Site_Annotation ;
    rdfs:comment 'Proton acceptor' .
  ?pfsb13 faldo:position ?thisPositionOn15 ;
    rdf:type faldo:ExactPosition .
  ?pfse14 faldo:position ?thisPositionOn16 ;
    rdf:type faldo:ExactPosition .
  _:854840 a rdf:Statement ;
    up:attribution _:854825 ;
    rdf:subject ?this ;
    rdf:predicate up:recommendedName ;
    rdf:object ?name0 .
  _:854841 a rdf:Statement ;
    up:attribution _:854826 ;
    rdf:subject ?this ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation1 .
  _:854842 a rdf:Statement ;
    up:attribution _:854827 ;
    rdf:subject ?this ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation2 .
  _:854843 a rdf:Statement ;
    up:attribution _:854828 ;
    rdf:subject ?this ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation4 .
  _:854844 a rdf:Statement ;
    up:attribution _:854829 ;
    rdf:subject ?this ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation7 .
  _:854845 a rdf:Statement ;
    up:attribution _:854830 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:227 .
  _:854846 a rdf:Statement ;
    up:attribution _:854831 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:234 .
  _:854847 a rdf:Statement ;
    up:attribution _:854832 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:378 .
  _:854848 a rdf:Statement ;
    up:attribution _:854833 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:539 .
  _:854849 a rdf:Statement ;
    up:attribution _:854834 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:496 .
  _:854850 a rdf:Statement ;
    up:attribution _:854835 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object GO:0004844 .
  _:854851 a rdf:Statement ;
    up:attribution _:854836 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object GO:0006284 .
  _:854852 a rdf:Statement ;
    up:attribution _:854837 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object GO:0005634 .
  _:854853 a rdf:Statement ;
    up:attribution _:854838 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object GO:0005739 .
  _:854854 a rdf:Statement ;
    up:source unirule:MF_03166 ;
    rdf:subject ?pfs11 ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation12 .
  _:854855 a rdf:Statement ;
    up:attribution _:854839 ;
    rdf:subject ?pfs11 ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation12 .
}
WHERE {
  #baseURI: http://purl.uniprot.org/unirule/MF_03166
  #Rule MF_03166 Created by:? on:2013-02-20 Modified by:Edouard de Castro on:2023-06-01
  ?this up:organism ?thisOrganism ;
    rdfs:seeAlso signature:MF_00148 .
  ?thisOrganism rdfs:subClassOf+ taxon:2759 .
  BIND(URI(CONCAT(STR(?this), '#MF_03166a0')) AS ?name0) .
  BIND(URI(CONCAT(STR(?this), '#MF_03166a1')) AS ?annotation1) .
  BIND(URI(CONCAT(STR(?this), '#MF_03166a2')) AS ?annotation2) .
  BIND(URI(CONCAT(STR(?this), '#MF_03166a4')) AS ?annotation4) .
  BIND(URI(CONCAT(STR(?this), '#MF_03166a7')) AS ?annotation7) .
  OPTIONAL {
    ?this up:sequence ?thisSequence .
    ?thisSequence rdf:value ?thisSequenceValue .
    ?templateMotifMatch21 faldo:location ?templateMotifSequenceMatchRegionP1229522 ;
      edam:is_output_of ?templateMotifSequenceProfileAlignmentOperationP1229524 ;
      rdf:type edam:data_0869 ;
      rdf:value ?templateMotifCigarP12295MF_0014817 .
    ?templateMotifSequenceMatchRegionP1229522 faldo:begin ?templateMotifSequenceMatchBeginP1229523 .
    ?templateMotifSequenceMatchBeginP1229523 faldo:position ?templateMotifSequenceMatchBeginPositionP1229518 ;
      faldo:reference isoform:P12295-1 .
    ?templateMotifSequenceProfileAlignmentOperationP1229524 edam:has_input signature:MF_00148 ;
      rdf:type edam:operation_0300 .
    ?targetMotifMatch25 faldo:location ?targetMotifMatchRegionMatch26 ;
      edam:is_output_of ?targetMotifSequenceAlignmentOperationMF_0014828 ;
      rdf:type edam:data_0869 ;
      rdf:value ?targetMotifMatchCigarP12295MF_0014819 .
    ?targetMotifMatchRegionMatch26 faldo:begin ?targetMotifMatchRegionMatchBeginMF_0014827 .
    ?targetMotifMatchRegionMatchBeginMF_0014827 faldo:position ?targetMotifMatchRegionMatchBeginPositionMF_0014820 ;
      faldo:reference ?thisSequence .
    ?targetMotifSequenceAlignmentOperationMF_0014828 edam:has_input signature:MF_00148 ;
      rdf:type edam:operation_0300 .
    BIND(STRLEN(REPLACE(SUBSTR(?templateMotifCigarP12295MF_0014817, 1, (STRLEN(?templateMotifCigarP12295MF_0014817) - STRLEN(REPLACE(?templateMotifCigarP12295MF_0014817, CONCAT('^(?:-*[^-]){', STR(((64 - ?templateMotifSequenceMatchBeginPositionP1229518) + 1)), '}'), '')))), '[a-z]', '')) AS ?step129) .
    BIND((STRLEN(SUBSTR(?targetMotifMatchCigarP12295MF_0014819, 1, (STRLEN(?targetMotifMatchCigarP12295MF_0014819) - STRLEN(REPLACE(?targetMotifMatchCigarP12295MF_0014819, CONCAT('^(?:[a-z]*(?:[A-Z]|-)){', STR(?step129), '}'), ''))))) - STRLEN(REPLACE(SUBSTR(?targetMotifMatchCigarP12295MF_0014819, 1, (STRLEN(?targetMotifMatchCigarP12295MF_0014819) - STRLEN(REPLACE(?targetMotifMatchCigarP12295MF_0014819, CONCAT('^(?:[a-z]*(?:[A-Z]|-)){', STR(?step129), '}'), '')))), '[^-]', ''))) AS ?step230) .
    BIND(((?step230 + ?targetMotifMatchRegionMatchBeginPositionMF_0014820) - 1) AS ?thisPositionOn15) .
    BIND(?thisPositionOn15 AS ?thisPositionOn16) .
    BIND(?this AS ?pfs1t31) .
    BIND(URI(CONCAT(STR(?thisSequence), '#position', STR(?thisPositionOn15))) AS ?pfsb13) .
    BIND(URI(CONCAT(STR(?thisSequence), '#position', STR(?thisPositionOn16))) AS ?pfse14) .
    FILTER ((SUBSTR(?thisSequenceValue, ?thisPositionOn15, 1) = 'D')) .
    BIND(URI(CONCAT(STR(?this), '#MF_03166a12')) AS ?annotation12) .
    BIND(?this AS ?pfs11) .
  }
  OPTIONAL {
    ?this a up:Protein .
    ?this up:organism ?thisOrganism .
    ?thisOrganism rdfs:subClassOf+ taxon:4751 .
    BIND(?this AS ?case8) .
  }
  OPTIONAL {
    ?this a up:Protein .
    ?this up:organism ?thisOrganism .
    ?thisOrganism rdfs:subClassOf+ taxon:40674 .
    BIND(?this AS ?case9) .
  }
  OPTIONAL {
    ?this a up:Protein .
    ?this up:organism ?thisOrganism .
    ?thisOrganism rdfs:subClassOf+ taxon:7742 .
    BIND(?this AS ?case10) .
  }
}
""" .

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