From 5c4455d8f5b8d5335dffa59e42c16063187d6454 Mon Sep 17 00:00:00 2001 From: Sebastian Proost Date: Thu, 25 Jan 2018 03:14:10 +0100 Subject: [PATCH] graph comparison only showing genes in intersection --- conekt/helpers/cytoscape.py | 2 +- conekt/static/js/cytoscape.cycss | 11 +++++++++++ config.template.py | 2 ++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/conekt/helpers/cytoscape.py b/conekt/helpers/cytoscape.py index edd7665..122f7e8 100644 --- a/conekt/helpers/cytoscape.py +++ b/conekt/helpers/cytoscape.py @@ -563,7 +563,7 @@ def merge_networks(network_one, network_two, prune=True): # Prune is enabled, only return nodes which are in both lists (and compound nodes) nodes_to_keep = list(set(nodes_to_keep)) return {'nodes': [n for n in nodes if n["data"]["id"] in nodes_to_keep], - 'edges': [e for e in edges if e["data"]["source"] in nodes_to_keep and e["data"]["target"]]} + 'edges': [e for e in edges if e["data"]["source"] in nodes_to_keep and e["data"]["target"]in nodes_to_keep]} @staticmethod def get_families(network): diff --git a/conekt/static/js/cytoscape.cycss b/conekt/static/js/cytoscape.cycss index 5f6b7e6..2b86538 100644 --- a/conekt/static/js/cytoscape.cycss +++ b/conekt/static/js/cytoscape.cycss @@ -41,6 +41,17 @@ node:unselected { border-opacity:0.5; } +node:parent { + background-color: #AAD8FF; + background-opacity:0.2; +} + +node#compound_node_two { + background-color: #AAFFD8; + background-opacity:0.2; +} + + node.hidden { visibility: hidden; } diff --git a/config.template.py b/config.template.py index 8b7ac21..6a9ce7a 100644 --- a/config.template.py +++ b/config.template.py @@ -36,6 +36,8 @@ CACHE_DEFAULT_TIMEOUT = 120 CACHE_THRESHOLD = 10000 +WTF_CSRF_TIME_LIMIT = None + # Minify pages when debug is off MINIFY_PAGE = not DEBUG