Skip to content

Commit

Permalink
Adding more info to the chemical pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Adafede committed Aug 19, 2024
1 parent 9eb28f3 commit d255bbd
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scholia/app/templates/chemical.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down Expand Up @@ -66,6 +68,14 @@ <h2 id="publications-per-year">Publications per year</h2>
<iframe class="embed-responsive-item" id="publications-per-year-iframe" ></iframe>
</div>

<h2 id="biological-processes">Biological processes in which the chemical is involved</h2>

<table class="table table-hover" id="biological-processes-table"></table>

<h2 id="found-in-matrix-np">Matrices that are natural products of taxa in which the chemical was found</h2>

<table class="table table-hover" id="found-in-matrix-np-table"></table>

<h2 id="found-in-taxon">Taxa in which the chemical was found</h2>

<table class="table table-hover" id="found-in-taxon-table"></table>
Expand Down
10 changes: 10 additions & 0 deletions scholia/app/templates/chemical_biological-processes.sparql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
PREFIX target: <http://www.wikidata.org/entity/{{ q }}>

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
10 changes: 10 additions & 0 deletions scholia/app/templates/chemical_found-in-matrix-np.sparql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
PREFIX target: <http://www.wikidata.org/entity/{{ q }}>

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

0 comments on commit d255bbd

Please sign in to comment.