about summary refs log tree commit diff
path: root/templates/network.html
diff options
context:
space:
mode:
authorHao Chen2019-05-08 01:55:31 -0500
committerHao Chen2019-05-08 01:55:31 -0500
commitefaf3a4abe2f6ae5b67578182085d18d05f25c5f (patch)
tree00ee6bb45907e03cc192e469892c06c30e0f2e6b /templates/network.html
parent577515fb8afdf7fa535a3b16d13f261696bb6ce0 (diff)
downloadgenecup-efaf3a4abe2f6ae5b67578182085d18d05f25c5f.tar.gz
multiple genes allowed
Diffstat (limited to 'templates/network.html')
-rw-r--r--templates/network.html46
1 files changed, 46 insertions, 0 deletions
diff --git a/templates/network.html b/templates/network.html
new file mode 100644
index 0000000..24c18c1
--- /dev/null
+++ b/templates/network.html
@@ -0,0 +1,46 @@
+{% extends "layout.html" %}
+{% block content %}
+
+<script type="text/javascript" src="{{ url_for('static', filename='cytoscape.min.js') }}"></script>
+
+
+    <div id="cy"></div>
+    <script>
+      var cy = cytoscape({
+        container: document.getElementById('cy'),
+
+		style: [
+			{ selector: 'node',
+			  css: {
+				'content': 'data(id)',
+				'text-valign': 'center',
+				'text-halign': 'center',
+                'background-color': 'data(nodecolor)',
+				'font-weight': 'data(fontweight)'
+			  }
+			},
+		
+			{ selector: 'edge',
+			  css: {
+				'content': 'data(sentCnt)',
+				'curve-style': 'bezier',
+    			"opacity": "0.4",
+			  }
+			}
+		],
+	    elements:[ {{ elements | safe }} ], 
+	
+	    layout: {
+			name: 'concentric',
+			concentric: function( node ){
+			  return node.degree();
+        	},
+			levelWidth: function( nodes ){
+			  return 2;
+			}
+      	},
+
+	  });
+    </script>
+
+{% endblock %}