@prefix ex: <https://sparql.uniprot.org/.well-known/sparql-examples/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <https://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .

ex:drosophila_enzymes_derived_from_at_least_two_mRNAs a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "Find Drosophila proteins, that depend on more than one transcript (requires cross-references to Ensembl family of resources)."@en ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
PREFIX up: <http://purl.uniprot.org/core/>

SELECT
  ?protein
WHERE {
  ?protein up:organism taxon:7227 ;
    a up:Protein ;
    up:reviewed true ;
    rdfs:seeAlso ?transcript .
  ?transcript  a up:Transcript_Resource .
} GROUP BY ?protein HAVING(COUNT(?transcript) >= 2)""" ;
    schema:keywords  "transcript" , "cross-reference" , "count" , "Ensembl" ;
    schema:target <https://sparql.uniprot.org/sparql/> ;
    schema:subjectOf <https://education.expasy.org/cours/SIB_UniProtKB_Enzymes_2024/> .

