From 4bbf98ad0f530d76af6f67d5482277b81bfcb524 Mon Sep 17 00:00:00 2001 From: Hao Chen Date: Thu, 9 May 2019 16:14:07 -0500 Subject: warning message and style change --- server.py | 3 ++- static/style.css | 26 ++++++++++++++++++++++++++ templates/index.html | 7 ++++--- 3 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 static/style.css diff --git a/server.py b/server.py index 804e0fc..457a8cd 100755 --- a/server.py +++ b/server.py @@ -22,7 +22,8 @@ def search(): genes=genes.replace(";", " ") genes=genes.split() if len(genes)>=6: - return render_template('index.html') + message="Up to five terms can be searched at a time" + return render_template('index.html', message=message) nodes=default_nodes edges=str() for gene in genes: diff --git a/static/style.css b/static/style.css new file mode 100644 index 0000000..509a2b7 --- /dev/null +++ b/static/style.css @@ -0,0 +1,26 @@ +#cy { + width: 80%; + height: 90%; + position: absolute; + left: 0px; +} + + +a:link { + color:grey ; +} + +/* A link that has been visited */ +a:visited { + color: grey; +} + +/* A link that is hovered on */ +a:hover { + color: blue; +} + +/* A link that is selected */ +a:active { + color: blue; +} diff --git a/templates/index.html b/templates/index.html index 011aa6f..6d50a63 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,16 +1,17 @@ {% extends "layout.html" %} {% block content %}

- +
+{{ message | safe }}


- This app searches PubMed to find sentences that contain the query terms (e.g., gene symbols, up to five are allowed per search) and keywords related to drug addiction. + This app searches PubMed to find sentences that contain the query terms (e.g., gene symbols) and keywords related to drug addiction.


-Searches are conducted through PubMed to get relevant PMIDs, which are then used to retrieve the abstracts from a local archive. The relationships are presented as an interactive cytoscape graph. The nodes can be moved around to better reveal the connections. Clicking on the links will bring up the corresponding sentences in a new browser window. +Searches are conducted through PubMed to get relevant PMIDs, which are then used to retrieve the abstracts from a local archive. The gene-keyword relationships are presented as an interactive cytoscape graph. The nodes can be moved to better reveal the connections. Tap on the links will bring up the corresponding sentences in a new browser window.


Source code -- cgit v1.2.3