@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_01835#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_01835#construct-template-4>,
    <http://purl.uniprot.org/unirules/MF_01835#construct-template-10>, <http://purl.uniprot.org/unirules/MF_01835#construct-template-1>,
    <http://purl.uniprot.org/unirules/MF_01835#construct-template-8>, <http://purl.uniprot.org/unirules/MF_01835#construct-template-6>,
    <http://purl.uniprot.org/unirules/MF_01835#construct-template-12>, <http://purl.uniprot.org/unirules/MF_01835#construct-template-13>,
    <http://purl.uniprot.org/unirules/MF_01835#construct-template-18>, <http://purl.uniprot.org/unirules/MF_01835#construct-template-2>,
    <http://purl.uniprot.org/unirules/MF_01835#construct-template-3>, <http://purl.uniprot.org/unirules/MF_01835#construct-template-0>,
    <http://purl.uniprot.org/unirules/MF_01835#construct-template-11>, <http://purl.uniprot.org/unirules/MF_01835#construct-template-5>,
    <http://purl.uniprot.org/unirules/MF_01835#construct-template-16>, <http://purl.uniprot.org/unirules/MF_01835#construct-template-9>,
    <http://purl.uniprot.org/unirules/MF_01835#construct-template-15>, <http://purl.uniprot.org/unirules/MF_01835#construct-template-17>,
    <http://purl.uniprot.org/unirules/MF_01835#construct-template-14>, <http://purl.uniprot.org/unirules/MF_01835#construct-template-7>;
  <http://www.w3.org/ns/shacl#prefixes> <http://purl.uniprot.org/unirules/>;
  <http://spinrdf.org/sp#where> <http://purl.uniprot.org/unirules/MF_01835#construct-where-list-0>;
  <http://spinrdf.org/sp#templates> <http://purl.uniprot.org/unirules/MF_01835#construct-template-list-0>;
  <http://www.w3.org/ns/shacl#construct> """CONSTRUCT {
  _:641044 up:source unirule:MF_01835 .
  _:641045 up:source unirule:MF_01835 .
  _:641046 up:source unirule:MF_01835 .
  _:641047 up:source unirule:MF_01835 .
  _:641048 up:source unirule:MF_01835 .
  ?this up:annotation ?annotation2 ;
    up:classifiedWith GO:0007623 ,
      keyword:90 ;
    up:recommendedName ?name0 .
  ?name0 up:fullName 'Circadian clock oscillator protein KaiB' ;
    rdf:type up:Structured_Name .
  ?gene1 skos:prefLabel 'kaiB' .
  ?annotation2 a up:Similarity_Annotation ;
    rdfs:comment 'Belongs to the KaiB family.' .
  _:641049 a rdf:Statement ;
    up:attribution _:641044 ;
    rdf:subject ?this ;
    rdf:predicate up:recommendedName ;
    rdf:object ?name0 .
  _:641050 a rdf:Statement ;
    up:attribution _:641045 ;
    rdf:subject ?gene1 ;
    rdf:predicate up:encodedBy ;
    rdf:object ?gene1 .
  _:641051 a rdf:Statement ;
    up:attribution _:641046 ;
    rdf:subject ?this ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation2 .
  _:641052 a rdf:Statement ;
    up:attribution _:641047 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:90 .
  _:641053 a rdf:Statement ;
    up:attribution _:641048 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object GO:0007623 .
}
WHERE {
  #baseURI: http://purl.uniprot.org/unirule/MF_01835
  #Rule MF_01835 Created by:? on:2005-02-28 Modified by:Edouard de Castro on:2023-06-01
  ?this up:organism ?thisOrganism ;
    rdfs:seeAlso signature:MF_01835 .
  ?thisOrganism rdfs:subClassOf+ taxon:1117 .
  BIND(URI(CONCAT(STR(?this), '#MF_01835a0')) AS ?name0) .
  BIND(URI(CONCAT(STR(?this), '#MF_01835a2')) AS ?annotation2) .
  OPTIONAL {
    ?this a up:Protein .
    ?this up:organism ?thisOrganism .
    ?thisOrganism rdfs:subClassOf+ taxon:1218 .
    BIND(?this AS ?case3) .
  }
  OPTIONAL {
    ?this a up:Protein .
    ?this up:organism ?thisOrganism .
    FILTER (! (EXISTS {
      ?thisOrganism rdfs:subClassOf+ taxon:1218 .
    })) .
    BIND(?this AS ?case4) .
  }
}
""" .

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