From 7653d3367c7ba70e2715645cd2a79042fb34eca7 Mon Sep 17 00:00:00 2001 From: Zhou Ji Date: Sun, 10 Jul 2022 20:23:07 -0400 Subject: [PATCH] implement CNKB interaction tooltips --- web/src/main/webapp/js/gene.cart.js | 4 +++- web/src/main/webapp/js/supported.interactomes.js | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/web/src/main/webapp/js/gene.cart.js b/web/src/main/webapp/js/gene.cart.js index 1e381e09..72c65f4c 100644 --- a/web/src/main/webapp/js/gene.cart.js +++ b/web/src/main/webapp/js/gene.cart.js @@ -727,7 +727,9 @@ const drawCNKBCytoscape = function (data, confidence_type) { const types = { 7: "p-value", 1: "likelihood ratio", 3: "mutual information", 6: "mode of action", 4: "probability" } $("#interaction-values").empty() for (const type in confidences) { - $("#interaction-values").append(`
  • ${types[type]}: ${confidences[type]}
  • `) + const type_name = types[type] + const tooltip = supported_confidence_types.find(x => x.name == type_name)["description"] + $("#interaction-values").append(`
  • ${type_name}: ${confidences[type]}
  • `) } $("#network-detail-viewer > #initial-text").hide() $("#gene-detail").hide() diff --git a/web/src/main/webapp/js/supported.interactomes.js b/web/src/main/webapp/js/supported.interactomes.js index b87e3516..347b46d9 100644 --- a/web/src/main/webapp/js/supported.interactomes.js +++ b/web/src/main/webapp/js/supported.interactomes.js @@ -1,14 +1,14 @@ export const supported_confidence_types = [{ name: "p-value", - description: "the probability that the measured interaction actually occurred by chance", + description: "Probability that the measured interaction occurred by chance, under a null model.", directionality: "decreasing" }, { name: "likelihood ratio", - description: "an edge weight that indicates how strong the mutual information for an edge is when compared to the maximum observed MI in the network, it ranges between 0 and 1.", + description: "Ratio of interaction mutual information divided by the maximum mutual information observed in the network (ranges between 0 and 1).", directionality: "increasing" }, { name: "mutual information", - description: "quantifies the \"amount of information\" obtained about one random variable by observing the other random variable", + description: "Measure of statistical correlation between the gene expression of the two genes comprising the interaction.", directionality: "increasing" }, { name: "probability", @@ -16,7 +16,7 @@ export const supported_confidence_types = [{ directionality: "increasing" }, { name: "mode of action", - description: "indicates the sign of the association between regulator and target gene and ranges between -1 and +1. It is inferred by Spearman correlation analysis.", + description: "Spearman correlation between the gene expression of the two genes comprising the interaction (ranges between -1 and 1). Provides information about the possible mode of mutual regulation (activating or repressing, depending on positive or negative MoA).", directionality: "increasing" /* absolute values */ }, ]