@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_00828#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_00828#construct-template-43>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-44>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-28>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-29>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-67>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-1>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-17>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-26>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-8>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-56>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-3>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-13>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-35>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-40>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-45>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-18>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-41>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-49>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-9>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-27>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-36>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-39>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-60>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-23>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-11>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-34>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-7>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-50>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-31>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-4>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-21>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-24>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-65>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-19>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-6>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-46>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-54>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-10>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-22>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-32>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-38>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-20>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-48>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-64>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-63>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-62>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-69>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-33>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-5>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-68>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-16>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-12>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-42>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-66>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-53>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-25>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-2>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-47>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-58>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-15>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-0>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-14>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-51>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-30>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-57>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-37>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-61>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-55>, <http://purl.uniprot.org/unirules/MF_00828#construct-template-52>,
    <http://purl.uniprot.org/unirules/MF_00828#construct-template-59>;
  <http://www.w3.org/ns/shacl#prefixes> <http://purl.uniprot.org/unirules/>;
  <http://spinrdf.org/sp#where> <http://purl.uniprot.org/unirules/MF_00828#construct-where-list-0>;
  <http://spinrdf.org/sp#templates> <http://purl.uniprot.org/unirules/MF_00828#construct-template-list-0>;
  <http://www.w3.org/ns/shacl#construct> """CONSTRUCT {
  _:294614 up:source unirule:MF_00828 .
  _:294615 up:source unirule:MF_00828 .
  _:294616 up:source unirule:MF_00828 .
  _:294617 up:source unirule:MF_00828 .
  _:294618 up:source unirule:MF_00828 .
  _:294619 up:source unirule:MF_00828 .
  _:294620 up:source unirule:MF_00828 .
  _:294621 up:source unirule:MF_00828 .
  _:294622 up:source unirule:MF_00828 .
  _:294623 up:source unirule:MF_00828 .
  _:294624 up:source unirule:MF_00828 .
  _:294625 up:source unirule:MF_00828 .
  _:294626 up:source unirule:MF_00828 .
  _:294627 up:source unirule:MF_00828 .
  _:294628 up:source unirule:MF_00828 .
  _:294629 up:source unirule:MF_00828 .
  _:294630 up:source unirule:MF_00828 .
  _:294631 up:source unirule:MF_00828 .
  _:294632 up:source unirule:MF_00828 .
  ?this up:alternativeName ?name1 ;
    up:annotation ?annotation3 ;
    up:classifiedWith GO:0015979 ,
      keyword:1133 ,
      keyword:472 ,
      keyword:602 ,
      keyword:603 ,
      keyword:812 ;
    up:recommendedName ?name0 .
  ?name0 up:fullName 'Photosystem I reaction center subunit XII' ;
    rdf:type up:Structured_Name .
  ?name1 up:fullName 'PSI-M' ;
    rdf:type up:Structured_Name .
  ?gene2 skos:prefLabel 'psaM' .
  ?annotation3 a up:Similarity_Annotation ;
    rdfs:comment 'Belongs to the PsaM family.' .
  ?case4 up:classifiedWith GO:0009535 .
  ?case5 up:classifiedWith keyword:1003 ,
      keyword:997 .
  ?case6 up:classifiedWith keyword:793 .
  ?case7 up:classifiedWith GO:0005886 .
  ?case8 up:classifiedWith GO:0042651 .
  ?sam9 up:classifiedWith keyword:1133 ,
      keyword:472 ,
      keyword:812 .
  ?transmembrane10 faldo:begin ?transmembraneb11 ;
    faldo:end ?transmembranee12 .
  ?transmembraneb11 faldo:position ?transmembranebp13 .
  ?transmembranee12 faldo:position ?transmembraneep14 .
  ?keyword15 up:range ?transmembrane10 .
  ?keyword16 up:range ?transmembrane10 .
  ?keyword17 up:range ?transmembrane10 .
  _:294633 a rdf:Statement ;
    up:attribution _:294614 ;
    rdf:subject ?this ;
    rdf:predicate up:recommendedName ;
    rdf:object ?name0 .
  _:294634 a rdf:Statement ;
    up:attribution _:294615 ;
    rdf:subject ?this ;
    rdf:predicate up:alternativeName ;
    rdf:object ?name1 .
  _:294635 a rdf:Statement ;
    up:attribution _:294616 ;
    rdf:subject ?gene2 ;
    rdf:predicate up:encodedBy ;
    rdf:object ?gene2 .
  _:294636 a rdf:Statement ;
    up:attribution _:294617 ;
    rdf:subject ?this ;
    rdf:predicate up:annotation ;
    rdf:object ?annotation3 .
  _:294637 a rdf:Statement ;
    up:attribution _:294618 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:472 .
  _:294638 a rdf:Statement ;
    up:attribution _:294619 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:602 .
  _:294639 a rdf:Statement ;
    up:attribution _:294620 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:603 .
  _:294640 a rdf:Statement ;
    up:attribution _:294621 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:812 .
  _:294641 a rdf:Statement ;
    up:attribution _:294622 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:1133 .
  _:294642 a rdf:Statement ;
    up:attribution _:294623 ;
    rdf:subject ?this ;
    rdf:predicate up:classifiedWith ;
    rdf:object GO:0015979 .
  _:294643 a rdf:Statement ;
    up:attribution _:294624 ;
    rdf:subject ?case4 ;
    rdf:predicate up:classifiedWith ;
    rdf:object GO:0009535 .
  _:294644 a rdf:Statement ;
    up:attribution _:294625 ;
    rdf:subject ?case5 ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:1003 .
  _:294645 a rdf:Statement ;
    up:attribution _:294626 ;
    rdf:subject ?case5 ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:997 .
  _:294646 a rdf:Statement ;
    up:attribution _:294627 ;
    rdf:subject ?case6 ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:793 .
  _:294647 a rdf:Statement ;
    up:attribution _:294628 ;
    rdf:subject ?case7 ;
    rdf:predicate up:classifiedWith ;
    rdf:object GO:0005886 .
  _:294648 a rdf:Statement ;
    up:attribution _:294629 ;
    rdf:subject ?case8 ;
    rdf:predicate up:classifiedWith ;
    rdf:object GO:0042651 .
  _:294649 a rdf:Statement ;
    up:attribution _:294630 ;
    rdf:subject ?sam9 ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:472 .
  _:294650 a rdf:Statement ;
    up:attribution _:294631 ;
    rdf:subject ?sam9 ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:812 .
  _:294651 a rdf:Statement ;
    up:attribution _:294632 ;
    rdf:subject ?sam9 ;
    rdf:predicate up:classifiedWith ;
    rdf:object keyword:1133 .
}
WHERE {
  #baseURI: http://purl.uniprot.org/unirule/MF_00828
  #Rule MF_00828 Created by:? on:2007-01-24 Modified by:Edouard de Castro on:2023-06-01
  {
    ?this up:organism ?thisOrganism ;
      rdfs:seeAlso signature:MF_00828 .
    ?thisOrganism rdfs:subClassOf+ taxon:1117 .
  } UNION {
    ?this rdfs:seeAlso signature:MF_00828 .
    {
      ?this up:encodedIn up:Plastid .
    } UNION {
      ?this up:encodedIn up:Chloroplast .
    } UNION {
      ?this up:encodedIn up:Cyanelle .
    } UNION {
      ?this up:encodedIn up:Apicoplast .
    } UNION {
      ?this up:encodedIn up:Organellar_chromatophore .
    } UNION {
      ?this up:encodedIn up:Non-photosynthetic_plastid .
    }
  }
  BIND(URI(CONCAT(STR(?this), '#MF_00828a0')) AS ?name0) .
  BIND(URI(CONCAT(STR(?this), '#MF_00828a1')) AS ?name1) .
  BIND(URI(CONCAT(STR(?this), '#MF_00828a3')) AS ?annotation3) .
  OPTIONAL {
    ?this a up:Protein .
    {
      ?this up:encodedIn up:Plastid .
    } UNION {
      ?this up:encodedIn up:Chloroplast .
    }
    BIND(?this AS ?case4) .
  }
  OPTIONAL {
    ?this a up:Protein .
    ?this up:organism ?thisOrganism .
    ?thisOrganism rdfs:subClassOf+ taxon:33071 .
    BIND(?this AS ?case5) .
  }
  OPTIONAL {
    ?this a up:Protein .
    ?this up:organism ?thisOrganism .
    FILTER (! (EXISTS {
      ?thisOrganism rdfs:subClassOf+ taxon:33071 .
    })) .
    BIND(?this AS ?case6) .
  }
  OPTIONAL {
    ?this a up:Protein .
    ?this up:organism ?thisOrganism .
    ?thisOrganism rdfs:subClassOf+ taxon:33071 .
    FILTER (! (EXISTS {
      {
        ?this up:encodedIn up:Plastid .
      } UNION {
        ?this up:encodedIn up:Chloroplast .
      }
    })) .
    BIND(?this AS ?case7) .
  }
  OPTIONAL {
    ?this a up:Protein .
    ?this up:organism ?thisOrganism .
    FILTER (! (EXISTS {
      {
        ?this up:encodedIn up:Plastid .
      } UNION {
        ?this up:encodedIn up:Chloroplast .
      }
    })) .
    FILTER (! (EXISTS {
      ?thisOrganism rdfs:subClassOf+ taxon:33071 .
    })) .
    BIND(?this AS ?case8) .
  }
  OPTIONAL {
    ?this up:annotation ?samtransmembrane18 ;
      up:sequence ?thisSequence .
    ?samtransmembrane18 up:range ?samtransmembraner19 ;
      rdf:type up:Transmembrane_Annotation .
    ?samtransmembraner19 faldo:begin ?samtransmembraneb20 ;
      faldo:end ?samtransmembranee21 .
    ?samtransmembraneb20 faldo:position ?samtransmembranebp22 ;
      faldo:reference ?thisSequence .
    ?samtransmembranee21 faldo:position ?samtransmembraneep23 ;
      faldo:reference ?thisSequence .
    BIND(?this AS ?sam9) .
  }
  BIND(URI(CONCAT(STR(?this), '#MF_00828a15')) AS ?keyword15) .
  BIND(URI(CONCAT(STR(?this), '#MF_00828a16')) AS ?keyword16) .
  BIND(URI(CONCAT(STR(?this), '#MF_00828a17')) AS ?keyword17) .
}
""" .

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