Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding more info to the chemical pages #2528

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading