#
# example SPARQL query 105
#

@prefix schema: <https://schema.org/> . 
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . 
@prefix sh: <http://www.w3.org/ns/shacl#> . 
@prefix cello: <https://purl.expasy.org/cellosaurus/rdf/ontology/> .


cello:Query_105 a sh:SPARQLExecutable ;
    sh:prefixes _:sparql_examples_prefixes ;
    rdfs:comment """Cell lines obtained from a muscular tissue"""@en ; 
    schema:keywords "tissue" , "site" , "muscle" ; 
    schema:target <https://sparql.cellosaurus.org/sparql> ; 
    sh:select """
PREFIX cello: <https://purl.expasy.org/cellosaurus/rdf/ontology/>
PREFIX db: <https://purl.expasy.org/cellosaurus/rdf/db/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
# All cell lines with a child of UBERON_0001630 muscle organ
select distinct ?cl ?cl_name ?xref_db ?xref_ac ?xref_label where {
  ?cl cello:derivedFromSite ?site .
  ?cl cello:recommendedName ?cl_name .
  ?site  cello:isIdentifiedByXref ?xref .
  ?xref cello:more_specific_than* ?generic_concept .
  ?generic_concept skos:notation "UBERON_0001630" ; skos:inScheme db:UBERON . # muscle organ
  ?xref cello:accession ?xref_ac ; cello:database ?xref_db; skos:prefLabel ?xref_label .
}
limit 1000
    """
    .

