A set of SPARQL examples that are used in different SIB resources
Cell lines with at least one publication prior to 1970
PREFIX cello: <https://purl.expasy.org/cellosaurus/rdf/ontology/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
select ?cl ?cl_name ?ref_class ?in_year ?year ?id ?title_shortened where {
?cl cello:derivedFromIndividualBelongingToSpecies / cello:isIdentifiedByXref ?species_xref .
?species_xref cello:more_specific_than* / skos:notation "50557" . # Insecta in NCBI_TaxID
?cl cello:recommendedName ?cl_name .
?cl cello:references ?ref .
?ref a ?ref_class .
?ref cello:internalId ?id .
?ref cello:title ?title .
?ref cello:publicationYear ?year .
bind(concat('in ', ?year) as ?in_year)
bind(substr(?title,0,80) as ?title_shortened)
filter (str(?year) < "1970" )
}
order by ?year
limit 100
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?cl"):::projected
v4("?cl_name"):::projected
v7("?id"):::projected
v9("?in_year"):::projected
v5("?ref")
v6("?ref_class"):::projected
v3("?species_xref")
v8("?title")
v10("?title_shortened"):::projected
v1("?year"):::projected
a1((" "))
a2((" "))
c6(["50557"]):::literal
f0[["str(?year) < '1970'"]]
f0 --> v1
v2 --"cello:derivedFromIndividualBelongingToSpecies"--> a1
a1 --"cello:isIdentifiedByXref"--> v3
v3 --"cello:more_specific_than"--> a2
a2 --"skos:notation"--> c6
v2 --"cello:recommendedName"--> v4
v2 --"cello:references"--> v5
v5 --"a"--> v6
v5 --"cello:internalId"--> v7
v5 --"cello:title"--> v8
v5 --"cello:publicationYear"--> v1
bind1[/"concat('in ',?year)"/]
v1 --o bind1
bind1 --as--o v9
bind2[/"substring(?title,'0^^xsd:integer','80^^xsd:integer')"/]
v8 --o bind2
bind2 --as--o v10