From d255bbd7bd34f148eb6b62631b821e1352fce9cc Mon Sep 17 00:00:00 2001 From: Adriano Rutz Date: Mon, 19 Aug 2024 14:50:57 +0200 Subject: [PATCH] Adding more info to the `chemical` pages --- scholia/app/templates/chemical.html | 10 ++++++++++ .../app/templates/chemical_biological-processes.sparql | 10 ++++++++++ .../app/templates/chemical_found-in-matrix-np.sparql | 10 ++++++++++ 3 files changed, 30 insertions(+) create mode 100644 scholia/app/templates/chemical_biological-processes.sparql create mode 100644 scholia/app/templates/chemical_found-in-matrix-np.sparql diff --git a/scholia/app/templates/chemical.html b/scholia/app/templates/chemical.html index 30a3af939..4eee02c57 100644 --- a/scholia/app/templates/chemical.html +++ b/scholia/app/templates/chemical.html @@ -10,6 +10,8 @@ {{ sparql_to_table('related') }} {{ sparql_to_table('recent-literature') }} {{ sparql_to_iframe('publications-per-year') }} +{{ sparql_to_table('biological-processes') }} +{{ sparql_to_table('found-in-matrix-np') }} {{ sparql_to_table('found-in-taxon') }} {% endblock %} @@ -66,6 +68,14 @@

Publications per year

+

Biological processes in which the chemical is involved

+ +
+ +

Matrices that are natural products of taxa in which the chemical was found

+ +
+

Taxa in which the chemical was found

diff --git a/scholia/app/templates/chemical_biological-processes.sparql b/scholia/app/templates/chemical_biological-processes.sparql new file mode 100644 index 000000000..bfb354cba --- /dev/null +++ b/scholia/app/templates/chemical_biological-processes.sparql @@ -0,0 +1,10 @@ +PREFIX target: + +SELECT DISTINCT ?pathway ?pathwayLabel (CONCAT("/pathway/", SUBSTR(STR(?pathway), 32)) AS ?pathwayUrl) WHERE { + VALUES ?chemical { target: } + ?chemical wdt:P361 ?pathway. + ?pathway wdt:P527 ?chemical. + ?pathway wdt:P31 wd:Q2996394. + SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } +} ORDER BY ASC(?pathwayLabel) + LIMIT 250 diff --git a/scholia/app/templates/chemical_found-in-matrix-np.sparql b/scholia/app/templates/chemical_found-in-matrix-np.sparql new file mode 100644 index 000000000..9fc669bc8 --- /dev/null +++ b/scholia/app/templates/chemical_found-in-matrix-np.sparql @@ -0,0 +1,10 @@ +PREFIX target: + +SELECT DISTINCT ?matrix ?matrixLabel ?taxon ?taxonLabel (CONCAT("/taxon/", SUBSTR(STR(?taxon), 32)) AS ?taxonUrl) WHERE { + VALUES ?chemical { target: } + ?chemical wdt:P361 ?matrix. + ?matrix (wdt:P279*/wdt:P1582) ?taxon . + ?matrix wdt:P527 ?chemical. + SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } +} ORDER BY ASC(?taxonLabel) + LIMIT 250