Spaces:
Running
on
Zero
Running
on
Zero
<html> | |
<head> | |
<meta charset="utf-8"> | |
<script src="lib/bindings/utils.js"></script> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/dist/vis-network.min.css" integrity="sha512-WgxfT5LWjfszlPHXRmBWHkV2eceiWTOBvrKCNbdgDYTHrT2AeLCGbF4sZlZw3UMN3WtL0tGUoIAKsu8mllg/XA==" crossorigin="anonymous" referrerpolicy="no-referrer" /> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/vis-network.min.js" integrity="sha512-LnvoEWDFrqGHlHmDD2101OrLcbsfkrzoSpvtSQtxK3RMnRV0eOkhhBN2dXHKRrUU8p2DGRTk35n4O8nWSVe1mQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> | |
<center> | |
<h1></h1> | |
</center> | |
<!-- <link rel="stylesheet" href="../node_modules/vis/dist/vis.min.css" type="text/css" /> | |
<script type="text/javascript" src="../node_modules/vis/dist/vis.js"> </script>--> | |
<link | |
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" | |
rel="stylesheet" | |
integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" | |
crossorigin="anonymous" | |
/> | |
<script | |
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" | |
integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf" | |
crossorigin="anonymous" | |
></script> | |
<center> | |
<h1></h1> | |
</center> | |
<style type="text/css"> | |
#mynetwork { | |
width: 100%; | |
height: 750px; | |
background-color: #ffffff; | |
border: 1px solid lightgray; | |
position: relative; | |
float: left; | |
} | |
#loadingBar { | |
position:absolute; | |
top:0px; | |
left:0px; | |
width: 100%; | |
height: 750px; | |
background-color:rgba(200,200,200,0.8); | |
-webkit-transition: all 0.5s ease; | |
-moz-transition: all 0.5s ease; | |
-ms-transition: all 0.5s ease; | |
-o-transition: all 0.5s ease; | |
transition: all 0.5s ease; | |
opacity:1; | |
} | |
#bar { | |
position:absolute; | |
top:0px; | |
left:0px; | |
width:20px; | |
height:20px; | |
margin:auto auto auto auto; | |
border-radius:11px; | |
border:2px solid rgba(30,30,30,0.05); | |
background: rgb(0, 173, 246); /* Old browsers */ | |
box-shadow: 2px 0px 4px rgba(0,0,0,0.4); | |
} | |
#border { | |
position:absolute; | |
top:10px; | |
left:10px; | |
width:500px; | |
height:23px; | |
margin:auto auto auto auto; | |
box-shadow: 0px 0px 4px rgba(0,0,0,0.2); | |
border-radius:10px; | |
} | |
#text { | |
position:absolute; | |
top:8px; | |
left:530px; | |
width:30px; | |
height:50px; | |
margin:auto auto auto auto; | |
font-size:22px; | |
color: #000000; | |
} | |
div.outerBorder { | |
position:relative; | |
top:400px; | |
width:600px; | |
height:44px; | |
margin:auto auto auto auto; | |
border:8px solid rgba(0,0,0,0.1); | |
background: rgb(252,252,252); /* Old browsers */ | |
background: -moz-linear-gradient(top, rgba(252,252,252,1) 0%, rgba(237,237,237,1) 100%); /* FF3.6+ */ | |
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(252,252,252,1)), color-stop(100%,rgba(237,237,237,1))); /* Chrome,Safari4+ */ | |
background: -webkit-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* Chrome10+,Safari5.1+ */ | |
background: -o-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* Opera 11.10+ */ | |
background: -ms-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* IE10+ */ | |
background: linear-gradient(to bottom, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* W3C */ | |
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfcfc', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */ | |
border-radius:72px; | |
box-shadow: 0px 0px 10px rgba(0,0,0,0.2); | |
} | |
</style> | |
</head> | |
<body> | |
<div class="card" style="width: 100%"> | |
<div id="mynetwork" class="card-body"></div> | |
</div> | |
<div id="loadingBar"> | |
<div class="outerBorder"> | |
<div id="text">0%</div> | |
<div id="border"> | |
<div id="bar"></div> | |
</div> | |
</div> | |
</div> | |
<script type="text/javascript"> | |
// initialize global variables. | |
var edges; | |
var nodes; | |
var allNodes; | |
var allEdges; | |
var nodeColors; | |
var originalNodes; | |
var network; | |
var container; | |
var options, data; | |
var filter = { | |
item : '', | |
property : '', | |
value : [] | |
}; | |
// This method is responsible for drawing the graph, returns the drawn network | |
function drawGraph() { | |
var container = document.getElementById('mynetwork'); | |
// parsing and collecting nodes and edges from the python | |
nodes = new vis.DataSet([{"color": "#ff7f7f", "font": {"color": "black"}, "id": "n1410", "label": "Plasmodium falciparum histone deacetylase 1", "node_type": ":Resource:Target", "shape": "dot", "size": 25}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n7958", "label": "Chromatin modifying enzymes (Plasmodium spp.)", "node_type": ":OtherProteinTargetFamily:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n69559", "label": "n69559", "node_type": ":Interaction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n69578", "label": "n69578", "node_type": ":Interaction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n69580", "label": "n69580", "node_type": ":Interaction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n69581", "label": "n69581", "node_type": ":Interaction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n69582", "label": "n69582", "node_type": ":Interaction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n69583", "label": "n69583", "node_type": ":Interaction:Resource", "shape": "dot", "size": 10}, {"color": "#7f7fff", "font": {"color": "black"}, "id": "n23295", "label": "nexturastat A", "node_type": ":Resource:SyntheticOrganicLigand", "shape": "dot", "size": 20}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n62378", "label": "n62378", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n68689", "label": "n68689", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n77556", "label": "n77556", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#7f7fff", "font": {"color": "black"}, "id": "n23296", "label": "resminostat", "node_type": ":Resource:SyntheticOrganicLigand", "shape": "dot", "size": 20}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n62365", "label": "n62365", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n77553", "label": "n77553", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n77554", "label": "n77554", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n77555", "label": "n77555", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#7f7fff", "font": {"color": "black"}, "id": "n23298", "label": "RGFP966", "node_type": ":Resource:SyntheticOrganicLigand", "shape": "dot", "size": 20}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n77596", "label": "n77596", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#7f7fff", "font": {"color": "black"}, "id": "n23301", "label": "belinostat", "node_type": ":Resource:SyntheticOrganicLigand", "shape": "dot", "size": 20}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n77526", "label": "n77526", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n77527", "label": "n77527", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n77529", "label": "n77529", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n77530", "label": "n77530", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n77531", "label": "n77531", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n77532", "label": "n77532", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n77533", "label": "n77533", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n77534", "label": "n77534", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n77535", "label": "n77535", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n77536", "label": "n77536", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n77537", "label": "n77537", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n77538", "label": "n77538", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n77539", "label": "n77539", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n77540", "label": "n77540", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n77541", "label": "n77541", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n77542", "label": "n77542", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n77603", "label": "n77603", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#7f7fff", "font": {"color": "black"}, "id": "n23310", "label": "panobinostat", "node_type": ":Resource:SyntheticOrganicLigand", "shape": "dot", "size": 20}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n62333", "label": "n62333", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n62334", "label": "n62334", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n62336", "label": "n62336", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n62337", "label": "n62337", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n62339", "label": "n62339", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n62340", "label": "n62340", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n62341", "label": "n62341", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n62342", "label": "n62342", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#7f7fff", "font": {"color": "black"}, "id": "n23716", "label": "ricolinostat", "node_type": ":Resource:SyntheticOrganicLigand", "shape": "dot", "size": 20}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n61959", "label": "n61959", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n61960", "label": "n61960", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n61961", "label": "n61961", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n67508", "label": "n67508", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n77336", "label": "n77336", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#7f7fff", "font": {"color": "black"}, "id": "n23719", "label": "entinostat", "node_type": ":Resource:SyntheticOrganicLigand", "shape": "dot", "size": 20}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n61852", "label": "n61852", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n61854", "label": "n61854", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n61958", "label": "n61958", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n62360", "label": "n62360", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n62361", "label": "n62361", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n62362", "label": "n62362", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n77557", "label": "n77557", "node_type": ":InhibitorInteraction:Resource", "shape": "dot", "size": 10}, {"color": "#ff7f7f", "font": {"color": "black"}, "id": "n8636", "label": "histone deacetylase 2", "node_type": ":Resource:Target", "shape": "dot", "size": 25}, {"color": "#ff7f7f", "font": {"color": "black"}, "id": "n8665", "label": "histone deacetylase 1", "node_type": ":Resource:Target", "shape": "dot", "size": 25}, {"color": "#ff7f7f", "font": {"color": "black"}, "id": "n8600", "label": "histone deacetylase 3", "node_type": ":Resource:Target", "shape": "dot", "size": 25}, {"color": "#ff7f7f", "font": {"color": "black"}, "id": "n8694", "label": "histone deacetylase 4", "node_type": ":Resource:Target", "shape": "dot", "size": 25}, {"color": "#ff7f7f", "font": {"color": "black"}, "id": "n8644", "label": "histone deacetylase 6", "node_type": ":Resource:Target", "shape": "dot", "size": 25}, {"color": "#ff7f7f", "font": {"color": "black"}, "id": "n8730", "label": "histone deacetylase 7", "node_type": ":Resource:Target", "shape": "dot", "size": 25}, {"color": "#ff7f7f", "font": {"color": "black"}, "id": "n8597", "label": "histone deacetylase 8", "node_type": ":Resource:Target", "shape": "dot", "size": 25}, {"color": "#ff7f7f", "font": {"color": "black"}, "id": "n8643", "label": "histone deacetylase 9", "node_type": ":Resource:Target", "shape": "dot", "size": 25}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n7683", "label": "3.5.1.- Histone deacetylases (HDACs)", "node_type": ":EnzymeTargetFamily:Resource", "shape": "dot", "size": 10}, {"color": "#ff7f7f", "font": {"color": "black"}, "id": "n8753", "label": "histone deacetylase 5", "node_type": ":Resource:Target", "shape": "dot", "size": 25}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n41529", "label": "n41529", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n41531", "label": "n41531", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n41616", "label": "n41616", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n41617", "label": "n41617", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n41618", "label": "n41618", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n41619", "label": "n41619", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n42100", "label": "n42100", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n42101", "label": "n42101", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n42107", "label": "n42107", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n42108", "label": "n42108", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n42110", "label": "n42110", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n42111", "label": "n42111", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n42112", "label": "n42112", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n42113", "label": "n42113", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n42134", "label": "n42134", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n42135", "label": "n42135", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n42136", "label": "n42136", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n42140", "label": "n42140", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n42170", "label": "n42170", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n46653", "label": "n46653", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n47562", "label": "n47562", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n48405", "label": "n48405", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n48424", "label": "n48424", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n48426", "label": "n48426", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n48427", "label": "n48427", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n48428", "label": "n48428", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n48429", "label": "n48429", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n53521", "label": "n53521", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n53839", "label": "n53839", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n53840", "label": "n53840", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n53842", "label": "n53842", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n53843", "label": "n53843", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n53844", "label": "n53844", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n53845", "label": "n53845", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n53846", "label": "n53846", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n53847", "label": "n53847", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n53848", "label": "n53848", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n53849", "label": "n53849", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n53850", "label": "n53850", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n53851", "label": "n53851", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n53852", "label": "n53852", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n53853", "label": "n53853", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n53854", "label": "n53854", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n53855", "label": "n53855", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n53867", "label": "n53867", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n53868", "label": "n53868", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n53869", "label": "n53869", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n53870", "label": "n53870", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n53871", "label": "n53871", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n53967", "label": "n53967", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#7fff7f", "font": {"color": "black"}, "id": "n53980", "label": "n53980", "node_type": ":Affinity:Resource", "shape": "dot", "size": 15}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n58535", "label": "n58535", "node_type": ":Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n58538", "label": "n58538", "node_type": ":Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n81531", "label": "n81531", "node_type": ":Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n81611", "label": "n81611", "node_type": ":Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n81751", "label": "n81751", "node_type": ":Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n81755", "label": "n81755", "node_type": ":Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n81756", "label": "n81756", "node_type": ":Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n83112", "label": "n83112", "node_type": ":Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n83427", "label": "n83427", "node_type": ":Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n83428", "label": "n83428", "node_type": ":Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n85560", "label": "n85560", "node_type": ":Resource", "shape": "dot", "size": 10}, {"color": "#cccccc", "font": {"color": "black"}, "id": "n87255", "label": "n87255", "node_type": ":Resource", "shape": "dot", "size": 10}]); | |
edges = new vis.DataSet([{"color": "#999999", "from": "n1410", "label": "hasTargetFamily", "to": "n7958", "width": 1}, {"color": "#999999", "from": "n1410", "label": "hasTarget", "to": "n69559", "width": 1}, {"color": "#999999", "from": "n1410", "label": "hasTarget", "to": "n69578", "width": 1}, {"color": "#999999", "from": "n1410", "label": "hasTarget", "to": "n69580", "width": 1}, {"color": "#999999", "from": "n1410", "label": "hasTarget", "to": "n69581", "width": 1}, {"color": "#999999", "from": "n1410", "label": "hasTarget", "to": "n69582", "width": 1}, {"color": "#999999", "from": "n1410", "label": "hasTarget", "to": "n69583", "width": 1}, {"color": "#999999", "from": "n23295", "label": "hasLigand", "to": "n62378", "width": 1}, {"color": "#999999", "from": "n23295", "label": "hasLigand", "to": "n68689", "width": 1}, {"color": "#999999", "from": "n23295", "label": "hasLigand", "to": "n77556", "width": 1}, {"color": "#999999", "from": "n23296", "label": "hasLigand", "to": "n62365", "width": 1}, {"color": "#999999", "from": "n23296", "label": "hasLigand", "to": "n77553", "width": 1}, {"color": "#999999", "from": "n23296", "label": "hasLigand", "to": "n77554", "width": 1}, {"color": "#999999", "from": "n23296", "label": "hasLigand", "to": "n77555", "width": 1}, {"color": "#999999", "from": "n23298", "label": "hasLigand", "to": "n77596", "width": 1}, {"color": "#999999", "from": "n23301", "label": "hasLigand", "to": "n77526", "width": 1}, {"color": "#999999", "from": "n23301", "label": "hasLigand", "to": "n77527", "width": 1}, {"color": "#999999", "from": "n23301", "label": "hasLigand", "to": "n77529", "width": 1}, {"color": "#999999", "from": "n23301", "label": "hasLigand", "to": "n77530", "width": 1}, {"color": "#999999", "from": "n23301", "label": "hasLigand", "to": "n77531", "width": 1}, {"color": "#999999", "from": "n23301", "label": "hasLigand", "to": "n77532", "width": 1}, {"color": "#999999", "from": "n23301", "label": "hasLigand", "to": "n77533", "width": 1}, {"color": "#999999", "from": "n23301", "label": "hasLigand", "to": "n77534", "width": 1}, {"color": "#999999", "from": "n23301", "label": "hasLigand", "to": "n77535", "width": 1}, {"color": "#999999", "from": "n23301", "label": "hasLigand", "to": "n77536", "width": 1}, {"color": "#999999", "from": "n23301", "label": "hasLigand", "to": "n77537", "width": 1}, {"color": "#999999", "from": "n23301", "label": "hasLigand", "to": "n77538", "width": 1}, {"color": "#999999", "from": "n23301", "label": "hasLigand", "to": "n77539", "width": 1}, {"color": "#999999", "from": "n23301", "label": "hasLigand", "to": "n77540", "width": 1}, {"color": "#999999", "from": "n23301", "label": "hasLigand", "to": "n77541", "width": 1}, {"color": "#999999", "from": "n23301", "label": "hasLigand", "to": "n77542", "width": 1}, {"color": "#999999", "from": "n23301", "label": "hasLigand", "to": "n77603", "width": 1}, {"color": "#999999", "from": "n23310", "label": "hasLigand", "to": "n62333", "width": 1}, {"color": "#999999", "from": "n23310", "label": "hasLigand", "to": "n62334", "width": 1}, {"color": "#999999", "from": "n23310", "label": "hasLigand", "to": "n62336", "width": 1}, {"color": "#999999", "from": "n23310", "label": "hasLigand", "to": "n62337", "width": 1}, {"color": "#999999", "from": "n23310", "label": "hasLigand", "to": "n62339", "width": 1}, {"color": "#999999", "from": "n23310", "label": "hasLigand", "to": "n62340", "width": 1}, {"color": "#999999", "from": "n23310", "label": "hasLigand", "to": "n62341", "width": 1}, {"color": "#999999", "from": "n23310", "label": "hasLigand", "to": "n62342", "width": 1}, {"color": "#999999", "from": "n23310", "label": "hasLigand", "to": "n69559", "width": 1}, {"color": "#999999", "from": "n23310", "label": "hasLigand", "to": "n69578", "width": 1}, {"color": "#999999", "from": "n23310", "label": "hasLigand", "to": "n69580", "width": 1}, {"color": "#999999", "from": "n23310", "label": "hasLigand", "to": "n69581", "width": 1}, {"color": "#999999", "from": "n23310", "label": "hasLigand", "to": "n69582", "width": 1}, {"color": "#999999", "from": "n23310", "label": "hasLigand", "to": "n69583", "width": 1}, {"color": "#999999", "from": "n23716", "label": "hasLigand", "to": "n61959", "width": 1}, {"color": "#999999", "from": "n23716", "label": "hasLigand", "to": "n61960", "width": 1}, {"color": "#999999", "from": "n23716", "label": "hasLigand", "to": "n61961", "width": 1}, {"color": "#999999", "from": "n23716", "label": "hasLigand", "to": "n67508", "width": 1}, {"color": "#999999", "from": "n23716", "label": "hasLigand", "to": "n77336", "width": 1}, {"color": "#999999", "from": "n23719", "label": "hasLigand", "to": "n61852", "width": 1}, {"color": "#999999", "from": "n23719", "label": "hasLigand", "to": "n61854", "width": 1}, {"color": "#999999", "from": "n23719", "label": "hasLigand", "to": "n61958", "width": 1}, {"color": "#999999", "from": "n23719", "label": "hasLigand", "to": "n62360", "width": 1}, {"color": "#999999", "from": "n23719", "label": "hasLigand", "to": "n62361", "width": 1}, {"color": "#999999", "from": "n23719", "label": "hasLigand", "to": "n62362", "width": 1}, {"color": "#999999", "from": "n23719", "label": "hasLigand", "to": "n77557", "width": 1}, {"color": "#999999", "from": "n61852", "label": "hasTarget", "to": "n8636", "width": 1}, {"color": "#999999", "from": "n61854", "label": "hasTarget", "to": "n8665", "width": 1}, {"color": "#999999", "from": "n61958", "label": "hasTarget", "to": "n8600", "width": 1}, {"color": "#999999", "from": "n61959", "label": "hasTarget", "to": "n8665", "width": 1}, {"color": "#999999", "from": "n61960", "label": "hasTarget", "to": "n8636", "width": 1}, {"color": "#999999", "from": "n61961", "label": "hasTarget", "to": "n8600", "width": 1}, {"color": "#999999", "from": "n62333", "label": "hasTarget", "to": "n8665", "width": 1}, {"color": "#999999", "from": "n62334", "label": "hasTarget", "to": "n8636", "width": 1}, {"color": "#999999", "from": "n62336", "label": "hasTarget", "to": "n8600", "width": 1}, {"color": "#999999", "from": "n62337", "label": "hasTarget", "to": "n8694", "width": 1}, {"color": "#999999", "from": "n62339", "label": "hasTarget", "to": "n8644", "width": 1}, {"color": "#999999", "from": "n62340", "label": "hasTarget", "to": "n8730", "width": 1}, {"color": "#999999", "from": "n62341", "label": "hasTarget", "to": "n8597", "width": 1}, {"color": "#999999", "from": "n62342", "label": "hasTarget", "to": "n8643", "width": 1}, {"color": "#999999", "from": "n62360", "label": "hasTarget", "to": "n8665", "width": 1}, {"color": "#999999", "from": "n62361", "label": "hasTarget", "to": "n8636", "width": 1}, {"color": "#999999", "from": "n62362", "label": "hasTarget", "to": "n8600", "width": 1}, {"color": "#999999", "from": "n62365", "label": "hasTarget", "to": "n8597", "width": 1}, {"color": "#999999", "from": "n62378", "label": "hasTarget", "to": "n8665", "width": 1}, {"color": "#999999", "from": "n67508", "label": "hasTarget", "to": "n8597", "width": 1}, {"color": "#999999", "from": "n68689", "label": "hasTarget", "to": "n8644", "width": 1}, {"color": "#999999", "from": "n7683", "label": "hasTargetFamily", "to": "n8597", "width": 1}, {"color": "#999999", "from": "n7683", "label": "hasTargetFamily", "to": "n8600", "width": 1}, {"color": "#999999", "from": "n7683", "label": "hasTargetFamily", "to": "n8636", "width": 1}, {"color": "#999999", "from": "n7683", "label": "hasTargetFamily", "to": "n8643", "width": 1}, {"color": "#999999", "from": "n7683", "label": "hasTargetFamily", "to": "n8644", "width": 1}, {"color": "#999999", "from": "n7683", "label": "hasTargetFamily", "to": "n8665", "width": 1}, {"color": "#999999", "from": "n7683", "label": "hasTargetFamily", "to": "n8694", "width": 1}, {"color": "#999999", "from": "n7683", "label": "hasTargetFamily", "to": "n8730", "width": 1}, {"color": "#999999", "from": "n7683", "label": "hasTargetFamily", "to": "n8753", "width": 1}, {"color": "#999999", "from": "n77336", "label": "hasTarget", "to": "n8644", "width": 1}, {"color": "#999999", "from": "n77526", "label": "hasTarget", "to": "n8636", "width": 1}, {"color": "#999999", "from": "n77527", "label": "hasTarget", "to": "n8665", "width": 1}, {"color": "#999999", "from": "n77529", "label": "hasTarget", "to": "n8694", "width": 1}, {"color": "#999999", "from": "n77530", "label": "hasTarget", "to": "n8644", "width": 1}, {"color": "#999999", "from": "n77531", "label": "hasTarget", "to": "n8730", "width": 1}, {"color": "#999999", "from": "n77532", "label": "hasTarget", "to": "n8597", "width": 1}, {"color": "#999999", "from": "n77533", "label": "hasTarget", "to": "n8643", "width": 1}, {"color": "#999999", "from": "n77534", "label": "hasTarget", "to": "n8665", "width": 1}, {"color": "#999999", "from": "n77535", "label": "hasTarget", "to": "n8636", "width": 1}, {"color": "#999999", "from": "n77536", "label": "hasTarget", "to": "n8600", "width": 1}, {"color": "#999999", "from": "n77537", "label": "hasTarget", "to": "n8694", "width": 1}, {"color": "#999999", "from": "n77538", "label": "hasTarget", "to": "n8753", "width": 1}, {"color": "#999999", "from": "n77539", "label": "hasTarget", "to": "n8644", "width": 1}, {"color": "#999999", "from": "n77540", "label": "hasTarget", "to": "n8730", "width": 1}, {"color": "#999999", "from": "n77541", "label": "hasTarget", "to": "n8597", "width": 1}, {"color": "#999999", "from": "n77542", "label": "hasTarget", "to": "n8643", "width": 1}, {"color": "#999999", "from": "n77553", "label": "hasTarget", "to": "n8665", "width": 1}, {"color": "#999999", "from": "n77554", "label": "hasTarget", "to": "n8600", "width": 1}, {"color": "#999999", "from": "n77555", "label": "hasTarget", "to": "n8644", "width": 1}, {"color": "#999999", "from": "n77556", "label": "hasTarget", "to": "n8644", "width": 1}, {"color": "#999999", "from": "n77557", "label": "hasTarget", "to": "n8643", "width": 1}, {"color": "#999999", "from": "n77596", "label": "hasTarget", "to": "n8600", "width": 1}, {"color": "#999999", "from": "n77603", "label": "hasTarget", "to": "n8600", "width": 1}]); | |
nodeColors = {}; | |
allNodes = nodes.get({ returnType: "Object" }); | |
for (nodeId in allNodes) { | |
nodeColors[nodeId] = allNodes[nodeId].color; | |
} | |
allEdges = edges.get({ returnType: "Object" }); | |
// adding nodes and edges to the graph | |
data = {nodes: nodes, edges: edges}; | |
var options = {"physics": {"barnesHut": {"gravitationalConstant": -2000, "centralGravity": 0.3, "springLength": 200, "springConstant": 0.04}, "maxVelocity": 50, "minVelocity": 0.1, "solver": "barnesHut", "stabilization": {"enabled": true, "iterations": 1000}}}; | |
network = new vis.Network(container, data, options); | |
network.on("stabilizationProgress", function(params) { | |
document.getElementById('loadingBar').removeAttribute("style"); | |
var maxWidth = 496; | |
var minWidth = 20; | |
var widthFactor = params.iterations/params.total; | |
var width = Math.max(minWidth,maxWidth * widthFactor); | |
document.getElementById('bar').style.width = width + 'px'; | |
document.getElementById('text').innerHTML = Math.round(widthFactor*100) + '%'; | |
}); | |
network.once("stabilizationIterationsDone", function() { | |
document.getElementById('text').innerHTML = '100%'; | |
document.getElementById('bar').style.width = '496px'; | |
document.getElementById('loadingBar').style.opacity = 0; | |
// really clean the dom element | |
setTimeout(function () {document.getElementById('loadingBar').style.display = 'none';}, 500); | |
}); | |
return network; | |
} | |
drawGraph(); | |
</script> | |
</body> | |
</html> |