sub:assertion {
sub:get-environments-for-taxon dct:description "This query returns the environments associated to the given taxon." ;
dct:license <
http://www.apache.org/licenses/LICENSE-2.0> ;
a <
https://w3id.org/kpxl/grlc/grlc-query> ;
rdfs:label "Get environments for taxon" ;
<
https://w3id.org/kpxl/grlc/endpoint> <
https://w3id.org/np/l/nanopub-query-1.1/repo/type/f20d5bfdd3b1cb29232fbabf00df6e1a6e4293db8b904f08cf523ce74b1cc210> ;
<
https://w3id.org/kpxl/grlc/sparql> """prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix dct: <http://purl.org/dc/terms/>
prefix np: <http://www.nanopub.org/nschema#>
prefix npa: <http://purl.org/nanopub/admin/>
prefix npx: <http://purl.org/nanopub/x/>
prefix biolink: <https://w3id.org/biolink/vocab/>
prefix biodiv: <https://w3id.org/kpxl/biodiv/terms/>
prefix nt: <https://w3id.org/np/o/ntemplate/>
select distinct ?relation ?relation_label ?environment ?environment_label ?np (\"^\" as ?np_label) where {
graph npa:graph {
?np npx:hasNanopubType biolink:OrganismTaxonToEnvironmentAssociation .
?np npa:hasValidSignatureForPublicKeyHash ?pubkey .
filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pubkey . }
?np dct:created ?date .
?np npx:introduces ?association .
?np np:hasAssertion ?a .
?np np:hasPublicationInfo ?i .
}
graph ?a {
?association a biolink:OrganismTaxonToEnvironmentAssociation .
?association biolink:subject ?taxonConcept .
?taxonConcept biodiv:hasTaxonName ?_taxonname_iri .
?association biolink:predicate ?relation .
?association biolink:object ?environment .
}
optional { graph ?i { ?relation nt:hasLabelFromApi ?relation_label } }
optional { graph ?i { ?environment nt:hasLabelFromApi ?environment_label } }
}""" .
}