@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_04155#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_04155#construct-template-9>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-3>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-16>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-27>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-28>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-20>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-10>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-4>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-5>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-42>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-43>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-40>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-53>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-33>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-44>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-31>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-32>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-1>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-51>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-35>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-6>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-8>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-18>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-45>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-17>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-29>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-14>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-55>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-36>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-46>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-26>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-66>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-12>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-49>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-39>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-34>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-22>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-50>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-7>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-15>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-38>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-37>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-64>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-19>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-47>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-65>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-41>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-25>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-21>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-30>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-2>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-58>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-63>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-62>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-61>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-52>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-60>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-23>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-48>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-13>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-24>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-56>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-69>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-68>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-11>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-67>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-54>,
    <http://purl.uniprot.org/unirules/MF_04155#construct-template-0>, <http://purl.uniprot.org/unirules/MF_04155#construct-template-59>,
    <http://purl.uniprot.org/unirules/MF_04155#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_04155#construct-where-list-0>;
  <http://spinrdf.org/sp#templates> <http://purl.uniprot.org/unirules/MF_04155#construct-template-list-0>;
  <http://www.w3.org/ns/shacl#construct> """CONSTRUCT {
  _:977781 up:source unirule:MF_04155 .
  _:977782 up:source unirule:MF_04155 .
  _:977783 up:source unirule:MF_04155 .
  _:977784 up:source unirule:MF_04155 .
  _:977785 up:source unirule:MF_04155 .
  _:977786 up:source unirule:MF_04155 .
  _:977787 up:source unirule:MF_04155 .
  _:977788 up:source unirule:MF_04155 .
  _:977789 up:source unirule:MF_04155 .
  _:977790 up:source unirule:MF_04155 .
  _:977791 up:source unirule:MF_04155 .
  _:977792 up:source unirule:MF_04155 .
  _:977793 up:source unirule:MF_04155 .
  _:977794 up:source unirule:MF_04155 .
  _:977795 up:source unirule:MF_04155 .
  ?this up:annotation ?annotation0 ,
      ?annotation1 ,
      ?annotation2 ;
    up:classifiedWith GO:0003678 ,
      GO:0005524 ,
      keyword:1194 ,
      keyword:235 ,
      keyword:238 ,
      keyword:347 ,
      keyword:378 ,
      keyword:67 .
  ?annotation0 a up:Function_Annotation ;
    rdfs:comment \"ATP-dependent DNA helicase essential for viral DNA replication and recombination. The helicase moves 5' -> 3' on the lagging strand template, unwinding the DNA duplex ahead of the leading strand polymerase at the replication fork and generating ssDNA for both leading and lagging strand synthesis. Interaction with the primase allows the primase to initiate lagging strand synthesis and fully activates the helicase. Loaded by the helicase assembly factor on replication forks that begin at discrete replication origin sequences, as well as on forks that are created during recombination.\" .
  ?annotation1 a up:Subunit_Annotation ;
    rdfs:comment 'Homohexamer. The homohexamer is a trimer of asymmetric dimers. Interacts with the DNA primase; this interaction forms the active primosome complex, which is composed of 6 helicase and 1 primase subunits and expresses full helicase and primase activities. Interacts (via C-terminus) with the helicase assembly factor; this interaction brings about the rapid assembly of the helicase onto ssDNA. Part of the replicase complex that includes the DNA polymerase, the polymerase clamp, the clamp loader complex, the single-stranded DNA binding protein, the primase, the DnaB-like replicative helicase and the helicase assembly factor.' .
  ?annotation2 a up:Similarity_Annotation ;
    rdfs:comment 'Belongs to the helicase family. DnaB subfamily.' .
  ?case3 up:alternativeName ?name5 ;
    up:recommendedName ?name4 .
  ?name4 up:ecName '3.6.4.-' ;
    up:fullName 'DnaB-like replicative helicase' ;
    rdf:type up:Structured_Name .
  ?name5 up:fullName 'Gene product 41' ;
    up:shortName 'Gp41' ;
    rdf:type up:Structured_Name .
  ?case6 up:recommendedName ?name7 .
  ?name7 up:ecName '3.6.4.-' ;
    up:fullName 'DnaB-like replicative helicase' ;
    rdf:type up:Structured_Name .
  ?pfs8 up:annotation ?annotation9 .
  ?annotation9 faldo:begin ?pfsb10 ;
    faldo:end ?pfse11 ;
    up:ligand ?ligand12 ;
    rdf:type up:Binding_Site_Annotation .
  ?pfsb10 faldo:position ?thisPositionOn13 ;
    rdf:type faldo:ExactPosition .
  ?pfse11 faldo:position ?thisPositionOn14 ;
    rdf:type faldo:ExactPosition .
  ?ligand12 rdfs:subClassOf chebi:30616 .
  _:977796 a rdf:Statement ;
    up:attribution _:977781 ;
    rdf:subject ?this ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation0 .
  _:977797 a rdf:Statement ;
    up:attribution _:977782 ;
    rdf:subject ?this ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation1 .
  _:977798 a rdf:Statement ;
    up:attribution _:977783 ;
    rdf:subject ?this ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation2 .
  _:977799 a rdf:Statement ;
    up:attribution _:977784 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:67 .
  _:977800 a rdf:Statement ;
    up:attribution _:977785 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:235 .
  _:977801 a rdf:Statement ;
    up:attribution _:977786 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:238 .
  _:977802 a rdf:Statement ;
    up:attribution _:977787 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:347 .
  _:977803 a rdf:Statement ;
    up:attribution _:977788 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:378 .
  _:977804 a rdf:Statement ;
    up:attribution _:977789 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:1194 .
  _:977805 a rdf:Statement ;
    up:attribution _:977790 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object GO:0005524 .
  _:977806 a rdf:Statement ;
    up:attribution _:977791 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object GO:0003678 .
  _:977807 a rdf:Statement ;
    up:attribution _:977792 ;
    rdf:subject ?case3 ;
    rdf:predicate up:recommendedName ;
    rdf:object ?name4 .
  _:977808 a rdf:Statement ;
    up:attribution _:977793 ;
    rdf:subject ?case3 ;
    rdf:predicate up:alternativeName ;
    rdf:object ?name5 .
  _:977809 a rdf:Statement ;
    up:attribution _:977794 ;
    rdf:subject ?case6 ;
    rdf:predicate up:recommendedName ;
    rdf:object ?name7 .
  _:977810 a rdf:Statement ;
    up:source unirule:MF_04155 ;
    rdf:subject ?pfs8 ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation9 .
  _:977811 a rdf:Statement ;
    up:attribution _:977795 ;
    rdf:subject ?pfs8 ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation9 .
}
WHERE {
  #baseURI: http://purl.uniprot.org/unirule/MF_04155
  #Rule MF_04155 Created by:? on:2021-02-08 Modified by:Edouard de Castro on:2022-11-19
  ?this up:organism ?thisOrganism ;
    rdfs:seeAlso signature:MF_04155 .
  ?thisOrganism rdfs:subClassOf+ taxon:10239 .
  BIND(URI(CONCAT(STR(?this), '#MF_04155a0')) AS ?annotation0) .
  BIND(URI(CONCAT(STR(?this), '#MF_04155a1')) AS ?annotation1) .
  BIND(URI(CONCAT(STR(?this), '#MF_04155a2')) AS ?annotation2) .
  OPTIONAL {
    ?this up:sequence ?thisSequence .
    ?thisSequence rdf:value ?thisSequenceValue .
    ?templateMotifMatch19 faldo:location ?templateMotifSequenceMatchRegionP0453020 ;
      edam:is_output_of ?templateMotifSequenceProfileAlignmentOperationP0453022 ;
      rdf:type edam:data_0869 ;
      rdf:value ?templateMotifCigarP04530MF_0415515 .
    ?templateMotifSequenceMatchRegionP0453020 faldo:begin ?templateMotifSequenceMatchBeginP0453021 .
    ?templateMotifSequenceMatchBeginP0453021 faldo:position ?templateMotifSequenceMatchBeginPositionP0453016 ;
      faldo:reference isoform:P04530-1 .
    ?templateMotifSequenceProfileAlignmentOperationP0453022 edam:has_input signature:MF_04155 ;
      rdf:type edam:operation_0300 .
    ?targetMotifMatch23 faldo:location ?targetMotifMatchRegionMatch24 ;
      edam:is_output_of ?targetMotifSequenceAlignmentOperationMF_0415526 ;
      rdf:type edam:data_0869 ;
      rdf:value ?targetMotifMatchCigarP04530MF_0415517 .
    ?targetMotifMatchRegionMatch24 faldo:begin ?targetMotifMatchRegionMatchBeginMF_0415525 .
    ?targetMotifMatchRegionMatchBeginMF_0415525 faldo:position ?targetMotifMatchRegionMatchBeginPositionMF_0415518 ;
      faldo:reference ?thisSequence .
    ?targetMotifSequenceAlignmentOperationMF_0415526 edam:has_input signature:MF_04155 ;
      rdf:type edam:operation_0300 .
    BIND(STRLEN(REPLACE(SUBSTR(?templateMotifCigarP04530MF_0415515, 1, (STRLEN(?templateMotifCigarP04530MF_0415515) - STRLEN(REPLACE(?templateMotifCigarP04530MF_0415515, CONCAT('^(?:-*[^-]){', STR(((197 - ?templateMotifSequenceMatchBeginPositionP0453016) + 1)), '}'), '')))), '[a-z]', '')) AS ?step127) .
    BIND((STRLEN(SUBSTR(?targetMotifMatchCigarP04530MF_0415517, 1, (STRLEN(?targetMotifMatchCigarP04530MF_0415517) - STRLEN(REPLACE(?targetMotifMatchCigarP04530MF_0415517, CONCAT('^(?:[a-z]*(?:[A-Z]|-)){', STR(?step127), '}'), ''))))) - STRLEN(REPLACE(SUBSTR(?targetMotifMatchCigarP04530MF_0415517, 1, (STRLEN(?targetMotifMatchCigarP04530MF_0415517) - STRLEN(REPLACE(?targetMotifMatchCigarP04530MF_0415517, CONCAT('^(?:[a-z]*(?:[A-Z]|-)){', STR(?step127), '}'), '')))), '[^-]', ''))) AS ?step228) .
    BIND(((?step228 + ?targetMotifMatchRegionMatchBeginPositionMF_0415518) - 1) AS ?thisPositionOn13) .
    BIND(STRLEN(REPLACE(SUBSTR(?templateMotifCigarP04530MF_0415515, 1, (STRLEN(?templateMotifCigarP04530MF_0415515) - STRLEN(REPLACE(?templateMotifCigarP04530MF_0415515, CONCAT('^(?:-*[^-]){', STR(((204 - ?templateMotifSequenceMatchBeginPositionP0453016) + 1)), '}'), '')))), '[a-z]', '')) AS ?step129) .
    BIND((STRLEN(SUBSTR(?targetMotifMatchCigarP04530MF_0415517, 1, (STRLEN(?targetMotifMatchCigarP04530MF_0415517) - STRLEN(REPLACE(?targetMotifMatchCigarP04530MF_0415517, CONCAT('^(?:[a-z]*(?:[A-Z]|-)){', STR(?step129), '}'), ''))))) - STRLEN(REPLACE(SUBSTR(?targetMotifMatchCigarP04530MF_0415517, 1, (STRLEN(?targetMotifMatchCigarP04530MF_0415517) - STRLEN(REPLACE(?targetMotifMatchCigarP04530MF_0415517, CONCAT('^(?:[a-z]*(?:[A-Z]|-)){', STR(?step129), '}'), '')))), '[^-]', ''))) AS ?step230) .
    BIND(((?step230 + ?targetMotifMatchRegionMatchBeginPositionMF_0415518) - 1) AS ?thisPositionOn14) .
    BIND(?this AS ?pfs1t31) .
    BIND(URI(CONCAT(STR(?thisSequence), '#position', STR(?thisPositionOn13))) AS ?pfsb10) .
    BIND(URI(CONCAT(STR(?thisSequence), '#position', STR(?thisPositionOn14))) AS ?pfse11) .
    FILTER (REGEX('[AG][AGP][IPSTV][GHN][AFSV]GK[ST]', SUBSTR(?thisSequenceValue, ?thisPositionOn13, (?thisPositionOn14 - ?thisPositionOn13)))) .
    BIND(URI(CONCAT(STR(?this), '#MF_04155a9')) AS ?annotation9) .
    BIND(?this AS ?pfs8) .
  }
  OPTIONAL {
    ?this a up:Protein .
    ?this up:organism ?thisOrganism .
    ?thisOrganism rdfs:subClassOf+ taxon:10663 .
    BIND(?this AS ?case3) .
    BIND(URI(CONCAT(STR(?this), '#MF_04155a4')) AS ?name4) .
    BIND(URI(CONCAT(STR(?this), '#MF_04155a5')) AS ?name5) .
  }
  OPTIONAL {
    ?this a up:Protein .
    ?this up:organism ?thisOrganism .
    FILTER (! (EXISTS {
      ?thisOrganism rdfs:subClassOf+ taxon:10663 .
    })) .
    BIND(?this AS ?case6) .
    BIND(URI(CONCAT(STR(?this), '#MF_04155a7')) AS ?name7) .
  }
}
""" .

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