aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xserver.py3
-rw-r--r--templates/cytoscape.html4
-rw-r--r--templates/progress.html2
3 files changed, 5 insertions, 4 deletions
diff --git a/server.py b/server.py
index b171c1e..3c124d3 100755
--- a/server.py
+++ b/server.py
@@ -47,9 +47,9 @@ def search():
progress=0
for gene in genes:
nodes+="{ data: { id: '" + gene + "', nodecolor:'#FADBD8', fontweight:700, url:'https://www.ncbi.nlm.nih.gov/gene/?term="+gene+"'} },\n"
- sent0=gene_addiction(gene)
progress+=percent
yield "data:"+str(progress)+"\n\n"
+ sent0=gene_addiction(gene)
e0=generate_edges(sent0, tf_name)
sent1=gene_functional(gene)
progress+=percent
@@ -97,6 +97,5 @@ def shownode():
out="<p>"+node.upper()+"<hr><li>"+ allnodes[node].replace("|", "<li>")
return render_template('sentences.html', sentences=out+"<p>")
-
if __name__ == '__main__':
app.run(debug=True)
diff --git a/templates/cytoscape.html b/templates/cytoscape.html
index b70481b..2f25e62 100644
--- a/templates/cytoscape.html
+++ b/templates/cytoscape.html
@@ -24,7 +24,9 @@
'line-color':'black',
'opacity': 'mapData(sentCnt, 1, 50, 0.3, 1)',
'width': 'mapData(sentCnt, 1, 50, 0.3, 4)',
- 'font-size': '9%'
+ 'font-size': '9%',
+ 'font-weight': 'bold',
+ 'color': '#117A65'
}
},
{ selector: 'node.highlight',
diff --git a/templates/progress.html b/templates/progress.html
index 7b4a9d0..081f1d9 100644
--- a/templates/progress.html
+++ b/templates/progress.html
@@ -15,7 +15,7 @@ var source = new EventSource("/search");
source.onmessage = function(event) {
$('.progress-bar').css('width', event.data+'%').attr('aria-valuenow', event.data);
$('.progress-bar-label').text(event.data+'%');
- var alpha = event.data/150
+ var alpha = 1-event.data/150
document.body.style.backgroundColor = 'rgba('+r+','+g+','+b+',0.3)'.replace(/[^,]+(?=\))/, alpha)
if(event.data == 100){