@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_02040#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_02040#construct-template-16>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-50>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-51>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-39>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-1>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-42>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-25>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-5>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-54>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-49>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-46>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-47>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-35>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-36>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-11>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-41>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-30>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-40>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-4>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-38>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-18>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-26>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-43>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-9>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-37>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-15>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-21>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-45>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-0>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-3>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-20>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-44>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-52>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-23>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-48>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-27>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-22>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-13>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-34>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-59>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-24>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-2>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-28>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-12>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-58>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-29>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-6>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-33>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-8>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-19>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-31>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-10>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-14>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-7>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-56>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-32>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-17>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-53>, <http://purl.uniprot.org/unirules/MF_02040#construct-template-55>,
    <http://purl.uniprot.org/unirules/MF_02040#construct-template-57>;
  <http://www.w3.org/ns/shacl#prefixes> <http://purl.uniprot.org/unirules/>;
  <http://spinrdf.org/sp#where> <http://purl.uniprot.org/unirules/MF_02040#construct-where-list-0>;
  <http://spinrdf.org/sp#templates> <http://purl.uniprot.org/unirules/MF_02040#construct-template-list-0>;
  <http://www.w3.org/ns/shacl#construct> """CONSTRUCT {
  _:719302 up:source unirule:MF_02040 .
  _:719303 up:source unirule:MF_02040 .
  _:719304 up:source unirule:MF_02040 .
  _:719305 up:source unirule:MF_02040 .
  _:719306 up:source unirule:MF_02040 .
  _:719307 up:source unirule:MF_02040 .
  _:719308 up:source unirule:MF_02040 .
  _:719309 up:source unirule:MF_02040 .
  _:719310 up:source unirule:MF_02040 .
  _:719311 up:source unirule:MF_02040 .
  _:719312 up:source unirule:MF_02040 .
  _:719313 up:source unirule:MF_02040 .
  _:719314 up:source unirule:MF_02040 .
  _:719315 up:source unirule:MF_02040 .
  ?this up:annotation ?annotation1 ,
      ?annotation2 ,
      ?annotation3 ;
    up:classifiedWith GO:0005524 ,
      GO:0016887 ,
      GO:0051536 ,
      keyword:378 ,
      keyword:408 ,
      keyword:411 ,
      keyword:479 ,
      keyword:547 ,
      keyword:67 ;
    up:recommendedName ?name0 .
  ?name0 up:fullName 'Iron-sulfur cluster carrier protein' ;
    rdf:type up:Structured_Name .
  ?annotation1 a up:Function_Annotation ;
    rdfs:comment 'Binds and transfers iron-sulfur (Fe-S) clusters to target apoproteins. Can hydrolyze ATP.' .
  ?annotation2 a up:Subunit_Annotation ;
    rdfs:comment 'Homodimer.' .
  ?annotation3 a up:Similarity_Annotation ;
    rdfs:comment 'Belongs to the Mrp/NBP35 ATP-binding proteins family.' .
  ?pfs4 up:annotation ?annotation5 .
  ?annotation5 faldo:begin ?pfsb6 ;
    faldo:end ?pfse7 ;
    up:ligand ?ligand8 ;
    rdf:type up:Binding_Site_Annotation .
  ?pfsb6 faldo:position ?thisPositionOn9 ;
    rdf:type faldo:ExactPosition .
  ?pfse7 faldo:position ?thisPositionOn10 ;
    rdf:type faldo:ExactPosition .
  ?ligand8 rdfs:subClassOf chebi:30616 .
  _:719316 a rdf:Statement ;
    up:attribution _:719302 ;
    rdf:subject ?this ;
    rdf:predicate up:recommendedName ;
    rdf:object ?name0 .
  _:719317 a rdf:Statement ;
    up:attribution _:719303 ;
    rdf:subject ?this ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation1 .
  _:719318 a rdf:Statement ;
    up:attribution _:719304 ;
    rdf:subject ?this ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation2 .
  _:719319 a rdf:Statement ;
    up:attribution _:719305 ;
    rdf:subject ?this ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation3 .
  _:719320 a rdf:Statement ;
    up:attribution _:719306 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:67 .
  _:719321 a rdf:Statement ;
    up:attribution _:719307 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:378 .
  _:719322 a rdf:Statement ;
    up:attribution _:719308 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:408 .
  _:719323 a rdf:Statement ;
    up:attribution _:719309 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:411 .
  _:719324 a rdf:Statement ;
    up:attribution _:719310 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:479 .
  _:719325 a rdf:Statement ;
    up:attribution _:719311 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:547 .
  _:719326 a rdf:Statement ;
    up:attribution _:719312 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object GO:0005524 .
  _:719327 a rdf:Statement ;
    up:attribution _:719313 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object GO:0016887 .
  _:719328 a rdf:Statement ;
    up:attribution _:719314 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object GO:0051536 .
  _:719329 a rdf:Statement ;
    up:source unirule:MF_02040 ;
    rdf:subject ?pfs4 ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation5 .
  _:719330 a rdf:Statement ;
    up:attribution _:719315 ;
    rdf:subject ?pfs4 ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation5 .
}
WHERE {
  #baseURI: http://purl.uniprot.org/unirule/MF_02040
  #Rule MF_02040 Created by:? on:2015-07-17 Modified by:Edouard de Castro on:2022-11-19
  {
    ?this up:organism ?thisOrganism ;
      rdfs:seeAlso signature:MF_02040 .
    ?thisOrganism rdfs:subClassOf+ taxon:2 .
    FILTER (! (EXISTS {
      ?this rdfs:seeAlso signature:MF_03039 .
    })) .
  } UNION {
    ?this up:organism ?thisOrganism ;
      rdfs:seeAlso signature:MF_02040 .
    ?thisOrganism rdfs:subClassOf+ taxon:2 .
    FILTER (! (EXISTS {
      ?this rdfs:seeAlso signature:MF_03039 .
    })) .
    FILTER (! (EXISTS {
      ?thisOrganism rdfs:subClassOf+ taxon:2759 .
    })) .
  } UNION {
    ?this up:organism ?thisOrganism ;
      rdfs:seeAlso signature:MF_02040 .
    ?thisOrganism rdfs:subClassOf+ taxon:2 .
    FILTER (! (EXISTS {
      ?this rdfs:seeAlso signature:MF_03038 .
    })) .
    FILTER (! (EXISTS {
      ?thisOrganism rdfs:subClassOf+ taxon:2759 .
    })) .
  } UNION {
    ?this up:organism ?thisOrganism ;
      rdfs:seeAlso signature:MF_02040 .
    ?thisOrganism rdfs:subClassOf+ taxon:2 .
    FILTER (! (EXISTS {
      ?thisOrganism rdfs:subClassOf+ taxon:2759 .
    })) .
  } UNION {
    ?this up:organism ?thisOrganism ;
      rdfs:seeAlso signature:MF_02040 .
    ?thisOrganism rdfs:subClassOf+ taxon:2157 .
    FILTER (! (EXISTS {
      ?this rdfs:seeAlso signature:MF_03039 .
    })) .
  } UNION {
    ?this up:organism ?thisOrganism ;
      rdfs:seeAlso signature:MF_02040 .
    ?thisOrganism rdfs:subClassOf+ taxon:2157 .
    FILTER (! (EXISTS {
      ?this rdfs:seeAlso signature:MF_03039 .
    })) .
    FILTER (! (EXISTS {
      ?thisOrganism rdfs:subClassOf+ taxon:2759 .
    })) .
  } UNION {
    ?this up:organism ?thisOrganism ;
      rdfs:seeAlso signature:MF_02040 .
    ?thisOrganism rdfs:subClassOf+ taxon:2157 .
    FILTER (! (EXISTS {
      ?this rdfs:seeAlso signature:MF_03038 .
    })) .
    FILTER (! (EXISTS {
      ?thisOrganism rdfs:subClassOf+ taxon:2759 .
    })) .
  } UNION {
    ?this up:organism ?thisOrganism ;
      rdfs:seeAlso signature:MF_02040 .
    ?thisOrganism rdfs:subClassOf+ taxon:2157 .
    FILTER (! (EXISTS {
      ?thisOrganism rdfs:subClassOf+ taxon:2759 .
    })) .
  }
  BIND(URI(CONCAT(STR(?this), '#MF_02040a0')) AS ?name0) .
  BIND(URI(CONCAT(STR(?this), '#MF_02040a1')) AS ?annotation1) .
  BIND(URI(CONCAT(STR(?this), '#MF_02040a2')) AS ?annotation2) .
  BIND(URI(CONCAT(STR(?this), '#MF_02040a3')) AS ?annotation3) .
  OPTIONAL {
    ?this up:sequence ?thisSequence .
    ?thisSequence rdf:value ?thisSequenceValue .
    ?templateMotifMatch15 faldo:location ?templateMotifSequenceMatchRegionQ8ZNN516 ;
      edam:is_output_of ?templateMotifSequenceProfileAlignmentOperationQ8ZNN518 ;
      rdf:type edam:data_0869 ;
      rdf:value ?templateMotifCigarQ8ZNN5MF_0204011 .
    ?templateMotifSequenceMatchRegionQ8ZNN516 faldo:begin ?templateMotifSequenceMatchBeginQ8ZNN517 .
    ?templateMotifSequenceMatchBeginQ8ZNN517 faldo:position ?templateMotifSequenceMatchBeginPositionQ8ZNN512 ;
      faldo:reference isoform:Q8ZNN5-1 .
    ?templateMotifSequenceProfileAlignmentOperationQ8ZNN518 edam:has_input signature:MF_02040 ;
      rdf:type edam:operation_0300 .
    ?targetMotifMatch19 faldo:location ?targetMotifMatchRegionMatch20 ;
      edam:is_output_of ?targetMotifSequenceAlignmentOperationMF_0204022 ;
      rdf:type edam:data_0869 ;
      rdf:value ?targetMotifMatchCigarQ8ZNN5MF_0204013 .
    ?targetMotifMatchRegionMatch20 faldo:begin ?targetMotifMatchRegionMatchBeginMF_0204021 .
    ?targetMotifMatchRegionMatchBeginMF_0204021 faldo:position ?targetMotifMatchRegionMatchBeginPositionMF_0204014 ;
      faldo:reference ?thisSequence .
    ?targetMotifSequenceAlignmentOperationMF_0204022 edam:has_input signature:MF_02040 ;
      rdf:type edam:operation_0300 .
    BIND(STRLEN(REPLACE(SUBSTR(?templateMotifCigarQ8ZNN5MF_0204011, 1, (STRLEN(?templateMotifCigarQ8ZNN5MF_0204011) - STRLEN(REPLACE(?templateMotifCigarQ8ZNN5MF_0204011, CONCAT('^(?:-*[^-]){', STR(((115 - ?templateMotifSequenceMatchBeginPositionQ8ZNN512) + 1)), '}'), '')))), '[a-z]', '')) AS ?step123) .
    BIND((STRLEN(SUBSTR(?targetMotifMatchCigarQ8ZNN5MF_0204013, 1, (STRLEN(?targetMotifMatchCigarQ8ZNN5MF_0204013) - STRLEN(REPLACE(?targetMotifMatchCigarQ8ZNN5MF_0204013, CONCAT('^(?:[a-z]*(?:[A-Z]|-)){', STR(?step123), '}'), ''))))) - STRLEN(REPLACE(SUBSTR(?targetMotifMatchCigarQ8ZNN5MF_0204013, 1, (STRLEN(?targetMotifMatchCigarQ8ZNN5MF_0204013) - STRLEN(REPLACE(?targetMotifMatchCigarQ8ZNN5MF_0204013, CONCAT('^(?:[a-z]*(?:[A-Z]|-)){', STR(?step123), '}'), '')))), '[^-]', ''))) AS ?step224) .
    BIND(((?step224 + ?targetMotifMatchRegionMatchBeginPositionMF_0204014) - 1) AS ?thisPositionOn9) .
    BIND(STRLEN(REPLACE(SUBSTR(?templateMotifCigarQ8ZNN5MF_0204011, 1, (STRLEN(?templateMotifCigarQ8ZNN5MF_0204011) - STRLEN(REPLACE(?templateMotifCigarQ8ZNN5MF_0204011, CONCAT('^(?:-*[^-]){', STR(((122 - ?templateMotifSequenceMatchBeginPositionQ8ZNN512) + 1)), '}'), '')))), '[a-z]', '')) AS ?step125) .
    BIND((STRLEN(SUBSTR(?targetMotifMatchCigarQ8ZNN5MF_0204013, 1, (STRLEN(?targetMotifMatchCigarQ8ZNN5MF_0204013) - STRLEN(REPLACE(?targetMotifMatchCigarQ8ZNN5MF_0204013, CONCAT('^(?:[a-z]*(?:[A-Z]|-)){', STR(?step125), '}'), ''))))) - STRLEN(REPLACE(SUBSTR(?targetMotifMatchCigarQ8ZNN5MF_0204013, 1, (STRLEN(?targetMotifMatchCigarQ8ZNN5MF_0204013) - STRLEN(REPLACE(?targetMotifMatchCigarQ8ZNN5MF_0204013, CONCAT('^(?:[a-z]*(?:[A-Z]|-)){', STR(?step125), '}'), '')))), '[^-]', ''))) AS ?step226) .
    BIND(((?step226 + ?targetMotifMatchRegionMatchBeginPositionMF_0204014) - 1) AS ?thisPositionOn10) .
    BIND(?this AS ?pfs1t27) .
    BIND(URI(CONCAT(STR(?thisSequence), '#position', STR(?thisPositionOn9))) AS ?pfsb6) .
    BIND(URI(CONCAT(STR(?thisSequence), '#position', STR(?thisPositionOn10))) AS ?pfse7) .
    FILTER (REGEX('[GA]KGGVGK[ST]', SUBSTR(?thisSequenceValue, ?thisPositionOn9, (?thisPositionOn10 - ?thisPositionOn9)))) .
    BIND(URI(CONCAT(STR(?this), '#MF_02040a5')) AS ?annotation5) .
    BIND(?this AS ?pfs4) .
  }
}
""" .

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