Please note: image processing might take up to several minutes. When fully loaded,
transgene 'subway map' will appear below
\nCount: 82511
\nPairs count: 671
\n', 1828: 'Seq: TACGATGGCATTTGCTTL
\nCount: 396
\nPairs count: 19
\n'};
var edges_info = {0: "From: 1828 To: 146569
Count: 199230.0 Type: ['Lib_0']"};
nodes = new vis.DataSet([
{'color': 'LightGray', 'font': {'size': 30}, 'id': 1828, 'label': '1828'},
{'color': 'DarkSeaGreen', 'font': {'size': 30}, 'id': 146569, 'label': '146569'}
]);
edges = new vis.DataSet([
{id: 0, from: 1828, to: 146569, color:{color:'red',}, length: 150, value:'4.52673049383'}
]);
var container = document.getElementById('mynetwork');
// provide the data in the vis format
var data = {
nodes: nodes,
edges: edges
};
var options = {
"edges": {
"smooth": {
"forceDirection": "none"
}
},
"physics": {
"barnesHut": {
"centralGravity": 0.05,
"springLength": 0,
"springConstant": 0.17
},
"minVelocity": 0.75,
"timestep": 0.96
}
};
// initialize your network!
var network = new vis.Network(container, data, options);
network.on("selectNode", function (params) {
var nod_id = this.getNodeAt(params.pointer.DOM);
if (nod_id != undefined){
document.getElementById('text').innerHTML = barcide_info[nod_id]
}
});
network.on("selectEdge", function (params) {
var edge_id = this.getEdgeAt(params.pointer.DOM);
if (edge_id != undefined){
document.getElementById('text').innerHTML = edges_info[edge_id]
}
});
var highlited_node_id = -1
var old_color = -1
function _findNode(node_id){
if (highlited_node_id != -1){
nodes.update({id: highlited_node_id, color: 'yellow'})
}
nodes.update({ id: highlited_node_id, color: 'DarkSeaGreen' })
highlited_node_id = node_id
nodes.update({ id: highlited_node_id, color: 'yellow' })
}
function findNode(){
var node_id=document.getElementById("node_id").value;
_findNode(node_id)
}
var pandas_tables = document.querySelectorAll(".dataframe")
pandas_tables.forEach(
function(elem){
elem.addEventListener("click", function(e)
{
var element = parseInt(e.target.innerText);
console.info(element)
_findNode(element)
})
})