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

ex:11 a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "Find shortest rapidly evolving Caudovirales genes"@en ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX : <http://purl.orthodb.org/>
PREFIX up: <http://purl.uniprot.org/core/>

SELECT *
WHERE {
?gene a :Gene; :description ?description.
?gene :geneTranslatedLength ?aa_length.
?gene :memberOf ?og.
?og :ogBuiltAt [up:scientificName "Caudovirales"].
?og a :OrthoGroup; :ogEvolRate ?evolrate.
FILTER(?evolrate > 1)
bind (?evolrate/?aa_length as ?x)
}
ORDER BY desc(?x) limit 99
""" ;
    schema:target <https://sparql.orthodb.org/sparql/> .

