@prefix ex:<https://purl.expasy.org/sparql-examples/neXtProt/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <https://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix spex:<https://purl.expasy.org/sparql-examples/ontology#> .

ex:NXQ_00259 a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "Proteins involved in diseases with clinical manifestations that include long organs "@en ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX : <http://nextprot.org/rdf/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX ncit: <http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX sio: <http://semanticscience.org/resource/>

SELECT DISTINCT ?entry (str(?gen) as ?genx) ?umlsTerm WHERE {
 SERVICE <https://rdf.disgenet.org/sparql> {
 SELECT DISTINCT ?protein ?umlsTerm WHERE {
 ?gda sio:SIO_000628 ?gene,?disease .
 ?disease a sio:SIO_010056 . # traits or phenotypes
 ?disease dcterms:title ?umlsTerm .
 filter(contains(str(?umlsTerm),"Long "))
 ?gene a ncit:C16612; sio:SIO_010078 ?protein .
 }
 }
 BIND(IRI(replace(str(?protein),"purl","www")) AS ?unipage) .
 ?entry :swissprotPage ?unipage .
 ?entry :gene / :recommendedName / rdfs:label ?gen .
} order by ?entry""" ;
    schema:keywords "disease",
        "federated query",
        "tutorial" ;
    schema:target <https://sparql.nextprot.org/sparql> ;
    spex:federatesWith <https://rdf.disgenet.org/sparql> .

