@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_02096#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_02096#construct-template-10>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-14>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-15>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-5>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-17>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-3>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-21>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-28>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-6>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-27>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-7>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-29>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-13>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-26>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-24>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-48>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-22>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-23>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-47>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-25>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-49>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-43>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-4>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-42>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-46>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-20>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-44>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-1>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-45>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-51>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-50>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-53>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-52>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-2>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-9>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-18>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-19>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-8>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-0>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-16>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-12>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-11>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-39>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-36>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-35>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-59>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-38>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-37>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-31>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-55>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-56>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-30>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-54>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-33>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-34>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-58>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-32>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-57>, <http://purl.uniprot.org/unirules/MF_02096#construct-template-41>,
    <http://purl.uniprot.org/unirules/MF_02096#construct-template-40>;
  <http://www.w3.org/ns/shacl#prefixes> <http://purl.uniprot.org/unirules/>;
  <http://spinrdf.org/sp#where> <http://purl.uniprot.org/unirules/MF_02096#construct-where-list-0>;
  <http://spinrdf.org/sp#templates> <http://purl.uniprot.org/unirules/MF_02096#construct-template-list-0>;
  <http://www.w3.org/ns/shacl#construct> """CONSTRUCT {
  _:744233 up:source unirule:MF_02096 .
  _:744234 up:source unirule:MF_02096 .
  _:744235 up:source unirule:MF_02096 .
  _:744236 up:source unirule:MF_02096 .
  _:744237 up:source unirule:MF_02096 .
  _:744238 up:source unirule:MF_02096 .
  _:744239 up:source unirule:MF_02096 .
  _:744240 up:source unirule:MF_02096 .
  _:744241 up:source unirule:MF_02096 .
  _:744242 up:source unirule:MF_02096 .
  _:744243 up:source unirule:MF_02096 .
  _:744244 up:source unirule:MF_02096 .
  ?this up:annotation ?annotation1 ,
      ?annotation2 ;
    up:classifiedWith GO:0006281 ,
      keyword:227 ,
      keyword:234 ;
    up:recommendedName ?name0 .
  ?name0 up:fullName 'DNA repair protein' ;
    rdf:type up:Structured_Name .
  ?annotation1 a up:Function_Annotation ;
    rdfs:comment 'Involved in DNA damage repair.' .
  ?annotation2 a up:Similarity_Annotation ;
    rdfs:comment 'Belongs to the Nre family.' .
  ?case4 up:classifiedWith GO:0008270 ,
      keyword:479 ,
      keyword:862 ,
      keyword:863 .
  ?pfs5 up:annotation ?annotation6 .
  ?annotation6 faldo:begin ?pfsb7 ;
    faldo:end ?pfse8 ;
    rdf:type up:Zinc_Finger_Annotation ;
    rdfs:comment 'C4-type' .
  ?pfsb7 faldo:position ?thisPositionOn9 ;
    rdf:type faldo:ExactPosition .
  ?pfse8 faldo:position ?thisPositionOn10 ;
    rdf:type faldo:ExactPosition .
  ?pfs11 up:annotation ?annotation12 .
  ?annotation12 faldo:begin ?pfsb13 ;
    faldo:end ?pfse14 ;
    rdf:type up:Motif_Annotation ;
    rdfs:comment 'PIP motif' .
  ?pfsb13 faldo:position ?thisPositionOn15 ;
    rdf:type faldo:ExactPosition .
  ?pfse14 faldo:position ?thisPositionOn16 ;
    rdf:type faldo:ExactPosition .
  _:744245 a rdf:Statement ;
    up:attribution _:744233 ;
    rdf:subject ?this ;
    rdf:predicate up:recommendedName ;
    rdf:object ?name0 .
  _:744246 a rdf:Statement ;
    up:attribution _:744234 ;
    rdf:subject ?this ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation1 .
  _:744247 a rdf:Statement ;
    up:attribution _:744235 ;
    rdf:subject ?this ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation2 .
  _:744248 a rdf:Statement ;
    up:attribution _:744236 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:227 .
  _:744249 a rdf:Statement ;
    up:attribution _:744237 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:234 .
  _:744250 a rdf:Statement ;
    up:attribution _:744238 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object GO:0006281 .
  _:744251 a rdf:Statement ;
    up:attribution _:744239 ;
    rdf:subject ?case4 ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:479 .
  _:744252 a rdf:Statement ;
    up:attribution _:744240 ;
    rdf:subject ?case4 ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:862 .
  _:744253 a rdf:Statement ;
    up:attribution _:744241 ;
    rdf:subject ?case4 ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:863 .
  _:744254 a rdf:Statement ;
    up:attribution _:744242 ;
    rdf:subject ?case4 ;
    rdf:predicate up:classifiedWith ;
    rdf:object GO:0008270 .
  _:744255 a rdf:Statement ;
    up:source unirule:MF_02096 ;
    rdf:subject ?pfs5 ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation6 .
  _:744256 a rdf:Statement ;
    up:attribution _:744243 ;
    rdf:subject ?pfs5 ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation6 .
  _:744257 a rdf:Statement ;
    up:source unirule:MF_02096 ;
    rdf:subject ?pfs11 ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation12 .
  _:744258 a rdf:Statement ;
    up:attribution _:744244 ;
    rdf:subject ?pfs11 ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation12 .
}
WHERE {
  #baseURI: http://purl.uniprot.org/unirule/MF_02096
  #Rule MF_02096 Created by:? on:2017-10-23 Modified by:Edouard de Castro on:2019-11-20
  ?this up:organism ?thisOrganism ;
    rdfs:seeAlso signature:MF_02096 .
  ?thisOrganism rdfs:subClassOf+ taxon:2157 .
  BIND(URI(CONCAT(STR(?this), '#MF_02096a0')) AS ?name0) .
  BIND(URI(CONCAT(STR(?this), '#MF_02096a1')) AS ?annotation1) .
  BIND(URI(CONCAT(STR(?this), '#MF_02096a2')) AS ?annotation2) .
  OPTIONAL {
    ?this up:sequence ?thisSequence .
    ?thisSequence rdf:value ?thisSequenceValue .
    ?templateMotifMatch21 faldo:location ?templateMotifSequenceMatchRegionO2868222 ;
      edam:is_output_of ?templateMotifSequenceProfileAlignmentOperationO2868224 ;
      rdf:type edam:data_0869 ;
      rdf:value ?templateMotifCigarO28682MF_0209617 .
    ?templateMotifSequenceMatchRegionO2868222 faldo:begin ?templateMotifSequenceMatchBeginO2868223 .
    ?templateMotifSequenceMatchBeginO2868223 faldo:position ?templateMotifSequenceMatchBeginPositionO2868218 ;
      faldo:reference isoform:O28682-1 .
    ?templateMotifSequenceProfileAlignmentOperationO2868224 edam:has_input signature:MF_02096 ;
      rdf:type edam:operation_0300 .
    ?targetMotifMatch25 faldo:location ?targetMotifMatchRegionMatch26 ;
      edam:is_output_of ?targetMotifSequenceAlignmentOperationMF_0209628 ;
      rdf:type edam:data_0869 ;
      rdf:value ?targetMotifMatchCigarO28682MF_0209619 .
    ?targetMotifMatchRegionMatch26 faldo:begin ?targetMotifMatchRegionMatchBeginMF_0209627 .
    ?targetMotifMatchRegionMatchBeginMF_0209627 faldo:position ?targetMotifMatchRegionMatchBeginPositionMF_0209620 ;
      faldo:reference ?thisSequence .
    ?targetMotifSequenceAlignmentOperationMF_0209628 edam:has_input signature:MF_02096 ;
      rdf:type edam:operation_0300 .
    BIND(?this AS ?tagzinc) .
    BIND(STRLEN(REPLACE(SUBSTR(?templateMotifCigarO28682MF_0209617, 1, (STRLEN(?templateMotifCigarO28682MF_0209617) - STRLEN(REPLACE(?templateMotifCigarO28682MF_0209617, CONCAT('^(?:-*[^-]){', STR(((3 - ?templateMotifSequenceMatchBeginPositionO2868218) + 1)), '}'), '')))), '[a-z]', '')) AS ?step129) .
    BIND((STRLEN(SUBSTR(?targetMotifMatchCigarO28682MF_0209619, 1, (STRLEN(?targetMotifMatchCigarO28682MF_0209619) - STRLEN(REPLACE(?targetMotifMatchCigarO28682MF_0209619, CONCAT('^(?:[a-z]*(?:[A-Z]|-)){', STR(?step129), '}'), ''))))) - STRLEN(REPLACE(SUBSTR(?targetMotifMatchCigarO28682MF_0209619, 1, (STRLEN(?targetMotifMatchCigarO28682MF_0209619) - STRLEN(REPLACE(?targetMotifMatchCigarO28682MF_0209619, CONCAT('^(?:[a-z]*(?:[A-Z]|-)){', STR(?step129), '}'), '')))), '[^-]', ''))) AS ?step230) .
    BIND(((?step230 + ?targetMotifMatchRegionMatchBeginPositionMF_0209620) - 1) AS ?thisPositionOn9) .
    BIND(STRLEN(REPLACE(SUBSTR(?templateMotifCigarO28682MF_0209617, 1, (STRLEN(?templateMotifCigarO28682MF_0209617) - STRLEN(REPLACE(?templateMotifCigarO28682MF_0209617, CONCAT('^(?:-*[^-]){', STR(((17 - ?templateMotifSequenceMatchBeginPositionO2868218) + 1)), '}'), '')))), '[a-z]', '')) AS ?step131) .
    BIND((STRLEN(SUBSTR(?targetMotifMatchCigarO28682MF_0209619, 1, (STRLEN(?targetMotifMatchCigarO28682MF_0209619) - STRLEN(REPLACE(?targetMotifMatchCigarO28682MF_0209619, CONCAT('^(?:[a-z]*(?:[A-Z]|-)){', STR(?step131), '}'), ''))))) - STRLEN(REPLACE(SUBSTR(?targetMotifMatchCigarO28682MF_0209619, 1, (STRLEN(?targetMotifMatchCigarO28682MF_0209619) - STRLEN(REPLACE(?targetMotifMatchCigarO28682MF_0209619, CONCAT('^(?:[a-z]*(?:[A-Z]|-)){', STR(?step131), '}'), '')))), '[^-]', ''))) AS ?step232) .
    BIND(((?step232 + ?targetMotifMatchRegionMatchBeginPositionMF_0209620) - 1) AS ?thisPositionOn10) .
    BIND(?this AS ?pfs1t33) .
    BIND(URI(CONCAT(STR(?thisSequence), '#position', STR(?thisPositionOn9))) AS ?pfsb7) .
    BIND(URI(CONCAT(STR(?thisSequence), '#position', STR(?thisPositionOn10))) AS ?pfse8) .
    FILTER (REGEX('C[ARNDCQEGHILKMFPSTWYVBZJUOX]{2)C[ARNDCQEGHILKMFPSTWYVBZJUOX]{5,6)C[ARNDCQEGHILKMFPSTWYVBZJUOX]{2,4)C', SUBSTR(?thisSequenceValue, ?thisPositionOn9, (?thisPositionOn10 - ?thisPositionOn9)))) .
    BIND(URI(CONCAT(STR(?this), '#MF_02096a6')) AS ?annotation6) .
    BIND(?this AS ?pfs5) .
  }
  OPTIONAL {
    ?this up:sequence ?thisSequence .
    ?thisSequence rdf:value ?thisSequenceValue .
    ?templateMotifMatch38 faldo:location ?templateMotifSequenceMatchRegionO2868239 ;
      edam:is_output_of ?templateMotifSequenceProfileAlignmentOperationO2868241 ;
      rdf:type edam:data_0869 ;
      rdf:value ?templateMotifCigarO28682MF_0209634 .
    ?templateMotifSequenceMatchRegionO2868239 faldo:begin ?templateMotifSequenceMatchBeginO2868240 .
    ?templateMotifSequenceMatchBeginO2868240 faldo:position ?templateMotifSequenceMatchBeginPositionO2868235 ;
      faldo:reference isoform:O28682-1 .
    ?templateMotifSequenceProfileAlignmentOperationO2868241 edam:has_input signature:MF_02096 ;
      rdf:type edam:operation_0300 .
    ?targetMotifMatch42 faldo:location ?targetMotifMatchRegionMatch43 ;
      edam:is_output_of ?targetMotifSequenceAlignmentOperationMF_0209645 ;
      rdf:type edam:data_0869 ;
      rdf:value ?targetMotifMatchCigarO28682MF_0209636 .
    ?targetMotifMatchRegionMatch43 faldo:begin ?targetMotifMatchRegionMatchBeginMF_0209644 .
    ?targetMotifMatchRegionMatchBeginMF_0209644 faldo:position ?targetMotifMatchRegionMatchBeginPositionMF_0209637 ;
      faldo:reference ?thisSequence .
    ?targetMotifSequenceAlignmentOperationMF_0209645 edam:has_input signature:MF_02096 ;
      rdf:type edam:operation_0300 .
    BIND(?this AS ?tagPIP) .
    BIND(STRLEN(REPLACE(SUBSTR(?templateMotifCigarO28682MF_0209634, 1, (STRLEN(?templateMotifCigarO28682MF_0209634) - STRLEN(REPLACE(?templateMotifCigarO28682MF_0209634, CONCAT('^(?:-*[^-]){', STR(((384 - ?templateMotifSequenceMatchBeginPositionO2868235) + 1)), '}'), '')))), '[a-z]', '')) AS ?step146) .
    BIND((STRLEN(SUBSTR(?targetMotifMatchCigarO28682MF_0209636, 1, (STRLEN(?targetMotifMatchCigarO28682MF_0209636) - STRLEN(REPLACE(?targetMotifMatchCigarO28682MF_0209636, CONCAT('^(?:[a-z]*(?:[A-Z]|-)){', STR(?step146), '}'), ''))))) - STRLEN(REPLACE(SUBSTR(?targetMotifMatchCigarO28682MF_0209636, 1, (STRLEN(?targetMotifMatchCigarO28682MF_0209636) - STRLEN(REPLACE(?targetMotifMatchCigarO28682MF_0209636, CONCAT('^(?:[a-z]*(?:[A-Z]|-)){', STR(?step146), '}'), '')))), '[^-]', ''))) AS ?step247) .
    BIND(((?step247 + ?targetMotifMatchRegionMatchBeginPositionMF_0209637) - 1) AS ?thisPositionOn15) .
    BIND(STRLEN(REPLACE(SUBSTR(?templateMotifCigarO28682MF_0209634, 1, (STRLEN(?templateMotifCigarO28682MF_0209634) - STRLEN(REPLACE(?templateMotifCigarO28682MF_0209634, CONCAT('^(?:-*[^-]){', STR(((391 - ?templateMotifSequenceMatchBeginPositionO2868235) + 1)), '}'), '')))), '[a-z]', '')) AS ?step148) .
    BIND((STRLEN(SUBSTR(?targetMotifMatchCigarO28682MF_0209636, 1, (STRLEN(?targetMotifMatchCigarO28682MF_0209636) - STRLEN(REPLACE(?targetMotifMatchCigarO28682MF_0209636, CONCAT('^(?:[a-z]*(?:[A-Z]|-)){', STR(?step148), '}'), ''))))) - STRLEN(REPLACE(SUBSTR(?targetMotifMatchCigarO28682MF_0209636, 1, (STRLEN(?targetMotifMatchCigarO28682MF_0209636) - STRLEN(REPLACE(?targetMotifMatchCigarO28682MF_0209636, CONCAT('^(?:[a-z]*(?:[A-Z]|-)){', STR(?step148), '}'), '')))), '[^-]', ''))) AS ?step249) .
    BIND(((?step249 + ?targetMotifMatchRegionMatchBeginPositionMF_0209637) - 1) AS ?thisPositionOn16) .
    BIND(?this AS ?pfs2t50) .
    BIND(URI(CONCAT(STR(?thisSequence), '#position', STR(?thisPositionOn15))) AS ?pfsb13) .
    BIND(URI(CONCAT(STR(?thisSequence), '#position', STR(?thisPositionOn16))) AS ?pfse14) .
    FILTER (REGEX('Q[ARNDCQEGHILKMFPSTWYVBZJUOX][ARNDCQEGHILKMFPSTWYVBZJUOX][LIM][ARNDCQEGHILKMFPSTWYVBZJUOX][ARNDCQEGHILKMFPSTWYVBZJUOX][FYW][FYWVMLI]', SUBSTR(?thisSequenceValue, ?thisPositionOn15, (?thisPositionOn16 - ?thisPositionOn15)))) .
    BIND(URI(CONCAT(STR(?this), '#MF_02096a12')) AS ?annotation12) .
    BIND(?this AS ?pfs11) .
  }
  OPTIONAL {
    ?this a up:Protein .
    BIND(?this AS ?caseWithTag51) .
  }
  BIND(IF(BOUND(?tagPIP), ?caseWithTag51, ?UNBOUND_VARIABLE) AS ?case3) .
  OPTIONAL {
    ?this a up:Protein .
    BIND(?this AS ?caseWithTag52) .
  }
  BIND(IF(BOUND(?tagzinc), ?caseWithTag52, ?UNBOUND_VARIABLE) AS ?case4) .
}
""" .

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