@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_01111#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_01111#construct-template-4>,
    <http://purl.uniprot.org/unirules/MF_01111#construct-template-12>, <http://purl.uniprot.org/unirules/MF_01111#construct-template-19>,
    <http://purl.uniprot.org/unirules/MF_01111#construct-template-1>, <http://purl.uniprot.org/unirules/MF_01111#construct-template-2>,
    <http://purl.uniprot.org/unirules/MF_01111#construct-template-20>, <http://purl.uniprot.org/unirules/MF_01111#construct-template-23>,
    <http://purl.uniprot.org/unirules/MF_01111#construct-template-3>, <http://purl.uniprot.org/unirules/MF_01111#construct-template-8>,
    <http://purl.uniprot.org/unirules/MF_01111#construct-template-9>, <http://purl.uniprot.org/unirules/MF_01111#construct-template-10>,
    <http://purl.uniprot.org/unirules/MF_01111#construct-template-17>, <http://purl.uniprot.org/unirules/MF_01111#construct-template-6>,
    <http://purl.uniprot.org/unirules/MF_01111#construct-template-0>, <http://purl.uniprot.org/unirules/MF_01111#construct-template-16>,
    <http://purl.uniprot.org/unirules/MF_01111#construct-template-14>, <http://purl.uniprot.org/unirules/MF_01111#construct-template-25>,
    <http://purl.uniprot.org/unirules/MF_01111#construct-template-22>, <http://purl.uniprot.org/unirules/MF_01111#construct-template-24>,
    <http://purl.uniprot.org/unirules/MF_01111#construct-template-15>, <http://purl.uniprot.org/unirules/MF_01111#construct-template-28>,
    <http://purl.uniprot.org/unirules/MF_01111#construct-template-29>, <http://purl.uniprot.org/unirules/MF_01111#construct-template-21>,
    <http://purl.uniprot.org/unirules/MF_01111#construct-template-18>, <http://purl.uniprot.org/unirules/MF_01111#construct-template-7>,
    <http://purl.uniprot.org/unirules/MF_01111#construct-template-30>, <http://purl.uniprot.org/unirules/MF_01111#construct-template-5>,
    <http://purl.uniprot.org/unirules/MF_01111#construct-template-13>, <http://purl.uniprot.org/unirules/MF_01111#construct-template-27>,
    <http://purl.uniprot.org/unirules/MF_01111#construct-template-26>, <http://purl.uniprot.org/unirules/MF_01111#construct-template-11>,
    <http://purl.uniprot.org/unirules/MF_01111#construct-template-31>;
  <http://www.w3.org/ns/shacl#prefixes> <http://purl.uniprot.org/unirules/>;
  <http://spinrdf.org/sp#where> <http://purl.uniprot.org/unirules/MF_01111#construct-where-list-0>;
  <http://spinrdf.org/sp#templates> <http://purl.uniprot.org/unirules/MF_01111#construct-template-list-0>;
  <http://www.w3.org/ns/shacl#construct> """CONSTRUCT {
  _:386646 up:source unirule:MF_01111 .
  _:386647 up:source unirule:MF_01111 .
  _:386648 up:source unirule:MF_01111 .
  _:386649 up:source unirule:MF_01111 .
  _:386650 up:source unirule:MF_01111 .
  _:386651 up:source unirule:MF_01111 .
  ?this up:annotation ?annotation2 ;
    up:classifiedWith GO:0005524 ,
      keyword:547 ,
      keyword:67 ;
    up:recommendedName ?name0 .
  ?name0 up:fullName ?nameValue1 ;
    rdf:type up:Structured_Name .
  ?annotation2 a up:Similarity_Annotation ;
    rdfs:comment 'Belongs to the UPF0200 family.' .
  ?pfs3 up:annotation ?annotation4 .
  ?annotation4 faldo:begin ?pfsb5 ;
    faldo:end ?pfse6 ;
    up:ligand ?ligand7 ;
    rdf:type up:Binding_Site_Annotation .
  ?pfsb5 faldo:position ?thisPositionOn8 ;
    rdf:type faldo:ExactPosition .
  ?pfse6 faldo:position ?thisPositionOn9 ;
    rdf:type faldo:ExactPosition .
  ?ligand7 rdfs:subClassOf chebi:30616 .
  _:386652 a rdf:Statement ;
    up:attribution _:386646 ;
    rdf:subject ?this ;
    rdf:predicate up:recommendedName ;
    rdf:object ?name0 .
  _:386653 a rdf:Statement ;
    up:attribution _:386647 ;
    rdf:subject ?this ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation2 .
  _:386654 a rdf:Statement ;
    up:attribution _:386648 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:67 .
  _:386655 a rdf:Statement ;
    up:attribution _:386649 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:547 .
  _:386656 a rdf:Statement ;
    up:attribution _:386650 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object GO:0005524 .
  _:386657 a rdf:Statement ;
    up:source unirule:MF_01111 ;
    rdf:subject ?pfs3 ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation4 .
  _:386658 a rdf:Statement ;
    up:attribution _:386651 ;
    rdf:subject ?pfs3 ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation4 .
}
WHERE {
  #baseURI: http://purl.uniprot.org/unirule/MF_01111
  #Rule MF_01111 Created by:? on:2005-02-28 Modified by:Edouard de Castro on:2022-11-19
  ?this up:organism ?thisOrganism ;
    rdfs:seeAlso signature:MF_01111 .
  ?thisOrganism rdfs:subClassOf+ taxon:2157 .
  BIND(URI(CONCAT(STR(?this), '#MF_01111a0')) AS ?name0) .
  OPTIONAL {
    ?this up:encodedBy ?gene13 .
    ?gene13 up:locusName ?geneLocus11 .
  }
  OPTIONAL {
    ?this up:encodedBy ?gene13 .
    ?gene13 up:orfName ?geneOrf12 .
  }
  BIND(IF(BOUND(?geneLocus11), ?geneLocus11, ?geneOrf12) AS ?part10) .
  BIND(CONCAT('UPF0200 protein ', ?part10) AS ?nameValue1) .
  BIND(URI(CONCAT(STR(?this), '#MF_01111a2')) AS ?annotation2) .
  OPTIONAL {
    ?this up:sequence ?thisSequence .
    ?thisSequence rdf:value ?thisSequenceValue .
    ?templateMotifMatch18 faldo:location ?templateMotifSequenceMatchRegionQ5879419 ;
      edam:is_output_of ?templateMotifSequenceProfileAlignmentOperationQ5879421 ;
      rdf:type edam:data_0869 ;
      rdf:value ?templateMotifCigarQ58794MF_0111114 .
    ?templateMotifSequenceMatchRegionQ5879419 faldo:begin ?templateMotifSequenceMatchBeginQ5879420 .
    ?templateMotifSequenceMatchBeginQ5879420 faldo:position ?templateMotifSequenceMatchBeginPositionQ5879415 ;
      faldo:reference isoform:Q58794-1 .
    ?templateMotifSequenceProfileAlignmentOperationQ5879421 edam:has_input signature:MF_01111 ;
      rdf:type edam:operation_0300 .
    ?targetMotifMatch22 faldo:location ?targetMotifMatchRegionMatch23 ;
      edam:is_output_of ?targetMotifSequenceAlignmentOperationMF_0111125 ;
      rdf:type edam:data_0869 ;
      rdf:value ?targetMotifMatchCigarQ58794MF_0111116 .
    ?targetMotifMatchRegionMatch23 faldo:begin ?targetMotifMatchRegionMatchBeginMF_0111124 .
    ?targetMotifMatchRegionMatchBeginMF_0111124 faldo:position ?targetMotifMatchRegionMatchBeginPositionMF_0111117 ;
      faldo:reference ?thisSequence .
    ?targetMotifSequenceAlignmentOperationMF_0111125 edam:has_input signature:MF_01111 ;
      rdf:type edam:operation_0300 .
    BIND(STRLEN(REPLACE(SUBSTR(?templateMotifCigarQ58794MF_0111114, 1, (STRLEN(?templateMotifCigarQ58794MF_0111114) - STRLEN(REPLACE(?templateMotifCigarQ58794MF_0111114, CONCAT('^(?:-*[^-]){', STR(((8 - ?templateMotifSequenceMatchBeginPositionQ5879415) + 1)), '}'), '')))), '[a-z]', '')) AS ?step126) .
    BIND((STRLEN(SUBSTR(?targetMotifMatchCigarQ58794MF_0111116, 1, (STRLEN(?targetMotifMatchCigarQ58794MF_0111116) - STRLEN(REPLACE(?targetMotifMatchCigarQ58794MF_0111116, CONCAT('^(?:[a-z]*(?:[A-Z]|-)){', STR(?step126), '}'), ''))))) - STRLEN(REPLACE(SUBSTR(?targetMotifMatchCigarQ58794MF_0111116, 1, (STRLEN(?targetMotifMatchCigarQ58794MF_0111116) - STRLEN(REPLACE(?targetMotifMatchCigarQ58794MF_0111116, CONCAT('^(?:[a-z]*(?:[A-Z]|-)){', STR(?step126), '}'), '')))), '[^-]', ''))) AS ?step227) .
    BIND(((?step227 + ?targetMotifMatchRegionMatchBeginPositionMF_0111117) - 1) AS ?thisPositionOn8) .
    BIND(STRLEN(REPLACE(SUBSTR(?templateMotifCigarQ58794MF_0111114, 1, (STRLEN(?templateMotifCigarQ58794MF_0111114) - STRLEN(REPLACE(?templateMotifCigarQ58794MF_0111114, CONCAT('^(?:-*[^-]){', STR(((15 - ?templateMotifSequenceMatchBeginPositionQ5879415) + 1)), '}'), '')))), '[a-z]', '')) AS ?step128) .
    BIND((STRLEN(SUBSTR(?targetMotifMatchCigarQ58794MF_0111116, 1, (STRLEN(?targetMotifMatchCigarQ58794MF_0111116) - STRLEN(REPLACE(?targetMotifMatchCigarQ58794MF_0111116, CONCAT('^(?:[a-z]*(?:[A-Z]|-)){', STR(?step128), '}'), ''))))) - STRLEN(REPLACE(SUBSTR(?targetMotifMatchCigarQ58794MF_0111116, 1, (STRLEN(?targetMotifMatchCigarQ58794MF_0111116) - STRLEN(REPLACE(?targetMotifMatchCigarQ58794MF_0111116, CONCAT('^(?:[a-z]*(?:[A-Z]|-)){', STR(?step128), '}'), '')))), '[^-]', ''))) AS ?step229) .
    BIND(((?step229 + ?targetMotifMatchRegionMatchBeginPositionMF_0111117) - 1) AS ?thisPositionOn9) .
    BIND(?this AS ?pfs1t30) .
    BIND(URI(CONCAT(STR(?thisSequence), '#position', STR(?thisPositionOn8))) AS ?pfsb5) .
    BIND(URI(CONCAT(STR(?thisSequence), '#position', STR(?thisPositionOn9))) AS ?pfse6) .
    FILTER (REGEX('G[ARNDCQEGHILKMFPSTWYVBZJUOX]P[ARNDCQEGHILKMFPSTWYVBZJUOX][SA]GK[GSTD]', SUBSTR(?thisSequenceValue, ?thisPositionOn8, (?thisPositionOn9 - ?thisPositionOn8)))) .
    BIND(URI(CONCAT(STR(?this), '#MF_01111a4')) AS ?annotation4) .
    BIND(?this AS ?pfs3) .
  }
}
""" .

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