@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_00612#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_00612#construct-template-0>,
    <http://purl.uniprot.org/unirules/MF_00612#construct-template-1>, <http://purl.uniprot.org/unirules/MF_00612#construct-template-2>,
    <http://purl.uniprot.org/unirules/MF_00612#construct-template-3>, <http://purl.uniprot.org/unirules/MF_00612#construct-template-4>;
  <http://www.w3.org/ns/shacl#prefixes> <http://purl.uniprot.org/unirules/>;
  <http://spinrdf.org/sp#where> <http://purl.uniprot.org/unirules/MF_00612#construct-where-list-0>;
  <http://spinrdf.org/sp#templates> <http://purl.uniprot.org/unirules/MF_00612#construct-template-list-0>;
  <http://www.w3.org/ns/shacl#construct> """CONSTRUCT {
  _:236496 up:source unirule:MF_00612 .
  ?this up:annotation ?annotation0 .
  ?annotation0 a up:Similarity_Annotation ;
    rdfs:comment 'Belongs to the UPF0225 family.' .
  _:236497 a rdf:Statement ;
    up:attribution _:236496 ;
    rdf:subject ?this ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation0 .
}
WHERE {
  #baseURI: http://purl.uniprot.org/unirule/MF_00612
  #Rule MF_00612 Created by:? on:2005-02-28 Modified by:Catherine Rivoire on:2012-07-10
  ?this up:organism ?thisOrganism ;
    rdfs:seeAlso signature:MF_00612 .
  ?thisOrganism rdfs:subClassOf+ taxon:2 .
  BIND(URI(CONCAT(STR(?this), '#MF_00612a0')) AS ?annotation0) .
  OPTIONAL {
    ?this a up:Protein .
    VALUES ?supertaxon3 {taxon:561 taxon:620 taxon:590}
    ?this up:organism ?thisOrganism .
    ?thisOrganism rdfs:subClassOf+ ?supertaxon3 .
    BIND(?this AS ?case1) .
  }
  OPTIONAL {
    ?this a up:Protein .
    ?this up:organism ?thisOrganism .
    FILTER (! (EXISTS {
      VALUES ?supertaxon4 {taxon:561 taxon:620 taxon:590}
      ?thisOrganism rdfs:subClassOf+ ?supertaxon4 .
    })) .
    BIND(?this AS ?case2) .
  }
}
""" .

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