@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_00539#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_00539#construct-template-6>,
    <http://purl.uniprot.org/unirules/MF_00539#construct-template-2>, <http://purl.uniprot.org/unirules/MF_00539#construct-template-5>,
    <http://purl.uniprot.org/unirules/MF_00539#construct-template-14>, <http://purl.uniprot.org/unirules/MF_00539#construct-template-15>,
    <http://purl.uniprot.org/unirules/MF_00539#construct-template-4>, <http://purl.uniprot.org/unirules/MF_00539#construct-template-3>,
    <http://purl.uniprot.org/unirules/MF_00539#construct-template-10>, <http://purl.uniprot.org/unirules/MF_00539#construct-template-16>,
    <http://purl.uniprot.org/unirules/MF_00539#construct-template-8>, <http://purl.uniprot.org/unirules/MF_00539#construct-template-0>,
    <http://purl.uniprot.org/unirules/MF_00539#construct-template-12>, <http://purl.uniprot.org/unirules/MF_00539#construct-template-13>,
    <http://purl.uniprot.org/unirules/MF_00539#construct-template-9>, <http://purl.uniprot.org/unirules/MF_00539#construct-template-11>,
    <http://purl.uniprot.org/unirules/MF_00539#construct-template-1>, <http://purl.uniprot.org/unirules/MF_00539#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_00539#construct-where-list-0>;
  <http://spinrdf.org/sp#templates> <http://purl.uniprot.org/unirules/MF_00539#construct-template-list-0>;
  <http://www.w3.org/ns/shacl#construct> """CONSTRUCT {
  _:210400 up:source unirule:MF_00539 .
  _:210401 up:source unirule:MF_00539 .
  _:210402 up:source unirule:MF_00539 .
  _:210403 up:source unirule:MF_00539 .
  _:210404 up:source unirule:MF_00539 .
  ?this up:annotation ?annotation0 ;
    up:classifiedWith GO:0006412 ,
      keyword:687 ,
      keyword:689 .
  ?annotation0 a up:Similarity_Annotation ;
    rdfs:comment 'Belongs to the bacterial ribosomal protein bL27 family.' .
  ?case1 up:classifiedWith GO:0009507 .
  _:210405 a rdf:Statement ;
    up:attribution _:210400 ;
    rdf:subject ?this ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation0 .
  _:210406 a rdf:Statement ;
    up:attribution _:210401 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:687 .
  _:210407 a rdf:Statement ;
    up:attribution _:210402 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:689 .
  _:210408 a rdf:Statement ;
    up:attribution _:210403 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object GO:0006412 .
  _:210409 a rdf:Statement ;
    up:attribution _:210404 ;
    rdf:subject ?case1 ;
    rdf:predicate up:classifiedWith ;
    rdf:object GO:0009507 .
}
WHERE {
  #baseURI: http://purl.uniprot.org/unirule/MF_00539
  #Rule MF_00539 Created by:? on:2005-02-28 Modified by:Andrea Auchincloss on:2023-12-08
  {
    ?this up:organism ?thisOrganism ;
      rdfs:seeAlso signature:MF_00539 .
    ?thisOrganism rdfs:subClassOf+ taxon:2 .
  } UNION {
    ?this rdfs:seeAlso signature:MF_00539 .
    {
      ?this up:encodedIn up:Plastid .
    } UNION {
      ?this up:encodedIn up:Chloroplast .
    }
  }
  BIND(URI(CONCAT(STR(?this), '#MF_00539a0')) AS ?annotation0) .
  OPTIONAL {
    ?this a up:Protein .
    {
      ?this up:encodedIn up:Plastid .
    } UNION {
      ?this up:encodedIn up:Chloroplast .
    }
    BIND(?this AS ?case1) .
  }
  OPTIONAL {
    ?this a up:Protein .
    ?this up:organism ?thisOrganism .
    ?thisOrganism rdfs:subClassOf+ taxon:1117 .
    BIND(?this AS ?case2) .
  }
  OPTIONAL {
    ?this a up:Protein .
    ?this up:organism ?thisOrganism .
    {
      ?this up:encodedIn up:Plastid .
    } UNION {
      ?this up:encodedIn up:Chloroplast .
    }
    FILTER (! (EXISTS {
      ?thisOrganism rdfs:subClassOf+ taxon:2 .
    })) .
    BIND(?this AS ?case3) .
  }
  OPTIONAL {
    ?this a up:Protein .
    ?this up:organism ?thisOrganism .
    ?thisOrganism rdfs:subClassOf+ taxon:2 .
    FILTER (! (EXISTS {
      ?thisOrganism rdfs:subClassOf+ taxon:1117 .
    })) .
    BIND(?this AS ?case4) .
  }
}
""" .

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