Skip to content

Commit

Permalink
- Rename quick_defs.json to .js since it is a Javascript file (#2365)
Browse files Browse the repository at this point in the history
- Add quick-links to external URLs for ClinicalTrials and DrugApprovals KPs in Settings (#2346)
- Update some of those URLs to TRAPI 1.5 endpoints
- Update ARAXi DSL helper JSON
- Add "Total" row to Testing summary view
  • Loading branch information
isbluis committed Sep 14, 2024
1 parent a1b38ed commit 641d570
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 13 deletions.
14 changes: 7 additions & 7 deletions code/UI/interactive/araxi.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// WARNING:
// This file was auto-generated by /mnt/data/orangeboard/devLM/RTX/code/UI/interactive/./dsl2json.py on: 2024-07-25 01:50:08
// This file was auto-generated by /mnt/data/orangeboard/devLM/RTX/code/UI/interactive/./dsl2json.py on: 2024-09-11 06:23:47
//
var araxi_commands = {
"add_qedge()": {
Expand Down Expand Up @@ -208,7 +208,7 @@ var araxi_commands = {
"description": "Whether to omit supporting data on nodes/edges in the results (e.g., publications, description, etc.)."
}
},
"description": "This command will expand (aka, answer/fill) your query graph in an edge-by-edge fashion, intelligently selecting which KPs to use for each edge. It selects KPs from the SmartAPI Registry based on the meta information provided by their TRAPI APIs, whether they have an endpoint running a matching TRAPI version, and whether they have an endpoint with matching maturity. For each QEdge, it queries the selected KPs concurrently; it will timeout for a particular KP if it decides it's taking too long to respond (this KP timeout can be controlled by the user). You may also optionally specify a particular KP to use via the 'kp' parameter (described below).\n\nCurrent candidate KPs include (for TRAPI 1.5, maturity 'development'): \ninfores:answer-coalesce, infores:automat-binding-db, infores:automat-cam-kp, infores:automat-ctd, infores:automat-drug-central, infores:automat-genome-alliance, infores:automat-gtex, infores:automat-gtopdb, infores:automat-gwas-catalog, infores:automat-hetionet, infores:automat-hgnc, infores:automat-hmdb, infores:automat-human-goa, infores:automat-icees-kg, infores:automat-intact, infores:automat-monarchinitiative, infores:automat-panther, infores:automat-pharos, infores:automat-reactome, infores:automat-robokop, infores:automat-string-db, infores:automat-ubergraph, infores:automat-viral-proteome, infores:cohd, infores:connections-hypothesis, infores:gelinea, infores:genetics-data-provider, infores:knowledge-collaboratory, infores:molepro, infores:openpredict, infores:rtx-kg2, infores:service-provider-trapi, infores:spoke. \n\n(Note that this list of KPs may change unexpectedly based on the SmartAPI registry.)"
"description": "This command will expand (aka, answer/fill) your query graph in an edge-by-edge fashion, intelligently selecting which KPs to use for each edge. It selects KPs from the SmartAPI Registry based on the meta information provided by their TRAPI APIs, whether they have an endpoint running a matching TRAPI version, and whether they have an endpoint with matching maturity. For each QEdge, it queries the selected KPs concurrently; it will timeout for a particular KP if it decides it's taking too long to respond (this KP timeout can be controlled by the user). You may also optionally specify a particular KP to use via the 'kp' parameter (described below).\n\nCurrent candidate KPs include (for TRAPI 1.5, maturity 'development'): \ninfores:answer-coalesce, infores:automat-binding-db, infores:automat-cam-kp, infores:automat-ctd, infores:automat-drug-central, infores:automat-genome-alliance, infores:automat-gtex, infores:automat-gtopdb, infores:automat-gwas-catalog, infores:automat-hetionet, infores:automat-hgnc, infores:automat-hmdb, infores:automat-human-goa, infores:automat-icees-kg, infores:automat-intact, infores:automat-monarchinitiative, infores:automat-panther, infores:automat-pharos, infores:automat-reactome, infores:automat-robokop, infores:automat-string-db, infores:automat-ubergraph, infores:automat-viral-proteome, infores:cohd, infores:connections-hypothesis, infores:gelinea, infores:genetics-data-provider, infores:knowledge-collaboratory, infores:molepro, infores:multiomics-clinicaltrials, infores:multiomics-drugapprovals, infores:multiomics-microbiome, infores:multiomics-multiomics, infores:openpredict, infores:rtx-kg2, infores:service-provider-trapi, infores:spoke. \n\n(Note that this list of KPs may change unexpectedly based on the SmartAPI registry.)"
},
"overlay(action=add_node_pmids)": {
"parameters": {
Expand Down Expand Up @@ -1374,15 +1374,15 @@ var araxi_commands = {
"type": "list",
"description": "List with just two qnode keys to connect. example: [n1, n2]"
},
"result_as": {
"node_category_constraint": {
"is_required": false,
"examples": [
"betweenness_centrality",
"all_in_one",
"one_by_one"
"biolink:Disease",
"biolink:Gene",
"biolink:ChemicalEntity"
],
"type": "string",
"description": "It determines how to receive the results. For instance, one_by_one means that it will return each path in one subgraph. The default value is betweenness_centrality"
"description": "This constraint will display paths that only pass through the user-specified category."
}
},
"description": "\nconnect_nodes adds paths between two nodes specified in the query.\n "
Expand Down
1 change: 1 addition & 0 deletions code/UI/interactive/dsl2json.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/mnt/data/python/Python-3.9.18/bin/python3
import datetime
import importlib
import json
Expand Down
10 changes: 6 additions & 4 deletions code/UI/interactive/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<script src="//unpkg.com/timelines-chart"></script>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="/rtxcomplete/data/quick_def.json"></script>
<script src="/rtxcomplete/data/quick_def.js"></script>
<script src="/rtxcomplete/bootstrap.js"></script>
<script src="/rtxcomplete/bootstrap3-typeahead.js"></script>
<script src="/rtxcomplete/rtxcomplete.js"></script>
Expand Down Expand Up @@ -552,13 +552,15 @@ <h3 style="margin-bottom:0px;">EXTERNAL API (post query):</h3>
<input type="button" class="qprob p0" value="ClinicalRiskKP" onClick="update_url('EXT','https://api.bte.ncats.io/v1/smartapi/d86a24f6027ffe778f84ba10a7a1861a');"/>
<input type="button" class="qprob scod" value="COHD" onClick="update_url('EXT','https://cohd.io/api');"/>
<input type="button" class="qprob p0" value="DrugResponseKP" onClick="update_url('EXT','https://api.bte.ncats.io/v1/smartapi/adf20dd6ff23dfe18e8e012bde686e31');"/>
<input type="button" class="qprob sgen" value="GeneticsKP" onClick="update_url('EXT','https://translator.broadinstitute.org/genetics_provider/trapi/v1.4');"/>
<input type="button" class="qprob sgen" value="GeneticsKP" onClick="update_url('EXT','https://translator.broadinstitute.org/genetics_provider/trapi/v1.5');"/>
<input type="button" class="qprob p1" value="ICEES-Asthma" onClick="update_url('EXT','https://icees.renci.org:16339');"/>
<input type="button" class="qprob p1" value="ICEES-DILI" onClick="update_url('EXT','https://icees.renci.org:16341');"/>
<input type="button" class="qprob smol" value="MolePro" onClick="update_url('EXT','https://translator.broadinstitute.org/molepro/trapi/v1.4');"/>
<input type="button" class="qprob srtx" value="RTX-KG2" onClick="update_url('EXT','https://arax.ncats.io/api/rtxkg2/v1.4');"/>
<input type="button" class="qprob smol" value="MolePro" onClick="update_url('EXT','https://translator.broadinstitute.org/molepro/trapi/v1.5');"/>
<input type="button" class="qprob srtx" value="RTX-KG2" onClick="update_url('EXT','https://arax.ncats.io/api/rtxkg2/v1.5');"/>
<input type="button" class="qprob p0" value="TumorGeneMutationKP" onClick="update_url('EXT','https://api.bte.ncats.io/v1/smartapi/5219cefb9d2b8d5df08c3a956fdd20f3');"/>
<input type="button" class="qprob p0" value="WellnessKP" onClick="update_url('EXT','https://api.bte.ncats.io/v1/smartapi/02af7d098ab304e80d6f4806c3527027');"/>
<input type="button" class="qprob p3" value="ClinicalTrialsKP" onClick="update_url('EXT','https://multiomics.rtx.ai:9990/ctkp');"/>
<input type="button" class="qprob p5" value="DrugApprovalsKP" onClick="update_url('EXT','https://multiomics.rtx.ai:9990/dakp');"/>
<br><br>
</div>

Expand Down
8 changes: 8 additions & 0 deletions code/UI/interactive/rtx.js
Original file line number Diff line number Diff line change
Expand Up @@ -7025,6 +7025,7 @@ function displayARSResults(parentnode,arsdata) {
for (var agent of arsdata['ara_list']) {
stats[agent] = {};
stats[agent]['PASSED'] = 0;
stats[agent]['TOTAL'] = 0;
}

var tdiv = document.createElement("div");
Expand Down Expand Up @@ -7212,6 +7213,7 @@ function displayARSResults(parentnode,arsdata) {
}
sumtable.appendChild(tr);

stats.status_list['TOTAL'] = 1;
for (var status in stats.status_list) {
tr = document.createElement("tr");
tr.className = 'hoverable';
Expand All @@ -7238,6 +7240,9 @@ function displayARSResults(parentnode,arsdata) {
span.innerHTML = status.split(":")[1];
span.className = 'explevel p3';
}
else if (status == 'TOTAL') {
tr.style.borderTop = "2px solid black";
}
td.appendChild(span);
tr.appendChild(td);

Expand Down Expand Up @@ -7267,6 +7272,9 @@ function displayARSResults(parentnode,arsdata) {
td.appendChild(span);
}
tr.appendChild(td);

if (status != 'TOTAL' && stats[agent][status]!=null)
stats[agent]['TOTAL'] += stats[agent][status];
}
sumtable.appendChild(tr);
}
Expand Down
2 changes: 1 addition & 1 deletion code/UI/interactive/rtx.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Demanding Praying mantis
Urban Otter
1 change: 0 additions & 1 deletion code/autocomplete/data/quick_def.json

This file was deleted.

0 comments on commit 641d570

Please sign in to comment.