aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHao Chen2019-05-09 23:56:22 -0500
committerHao Chen2019-05-09 23:56:22 -0500
commit6c7339df3134088d4cfc8072f79808d63ad9f2c8 (patch)
tree74edf33efa5e6e3733b51ca1dd40d41761872269
parentebdf692ea30b649b6023151f9364f8c71717fadc (diff)
downloadgenecup-6c7339df3134088d4cfc8072f79808d63ad9f2c8.tar.gz
mapping edge
-rwxr-xr-xratspub.py4
-rw-r--r--templates/cytoscape.html14
2 files changed, 9 insertions, 9 deletions
diff --git a/ratspub.py b/ratspub.py
index ea78d85..dd20f67 100755
--- a/ratspub.py
+++ b/ratspub.py
@@ -90,10 +90,10 @@ def generate_edges(data, filename):
edgeCnts[edgeID]=1
for edgeID in edgeCnts:
(filename, source,target)=edgeID.split("|")
- json0+="{ data: { id: '" + edgeID + "', source: '" + source + "', target: '" + target + "', sentCnt: '" + str(edgeCnts[edgeID]) + "', url:'/sentences?edgeID=" + edgeID + "' } },\n"
+ json0+="{ data: { id: '" + edgeID + "', source: '" + source + "', target: '" + target + "', sentCnt: " + str(edgeCnts[edgeID]) + ", url:'/sentences?edgeID=" + edgeID + "' } },\n"
return(json0)
-addiction_d = {"reward":"reward|hedonic|incentive|intracranial self stimulation|ICSS|reinforcement|conditioned place preference|CPP|self administration|self administered|drug reinforced|operant|instrumental response",
+addiction_d = {"reward":"reward|hedonic|incentive|intracranial self stimulation|ICSS|reinforcement|reinforcing|conditioned place preference|CPP|self administration|self administered|drug reinforced|operant|instrumental response",
"aversion":"aversion|aversive|CTA|withdrawal|conditioned taste aversion",
"relapse":"relapse|reinstatement|craving|drug seeking|seeking",
"sensitization":"sensitization",
diff --git a/templates/cytoscape.html b/templates/cytoscape.html
index 05fc045..b70481b 100644
--- a/templates/cytoscape.html
+++ b/templates/cytoscape.html
@@ -21,9 +21,10 @@
{ selector: 'edge',
css: {
'content': 'data(sentCnt)',
- 'curve-style': 'bezier',
- 'line-cap': 'round',
- 'opacity': 'mapData(sentCnt, 1, 50, 0.2, 0.3)',
+ 'line-color':'black',
+ 'opacity': 'mapData(sentCnt, 1, 50, 0.3, 1)',
+ 'width': 'mapData(sentCnt, 1, 50, 0.3, 4)',
+ 'font-size': '9%'
}
},
{ selector: 'node.highlight',
@@ -38,12 +39,11 @@
},
{
selector: 'edge.highlight',
- style: { 'mid-target-arrow-color': '#FFF' },
- style:{ 'opacity': '0.9' }
+ style: { 'line-color': 'red' },
},
{
selector: 'edge.semitransp',
- style:{ 'opacity': '0.2' }
+ style:{ 'opacity': '0.01' }
}
],
elements:[ {{ elements | safe }} ],
@@ -53,7 +53,7 @@
return node.degree();
},
levelWidth: function( nodes ){
- return 7;
+ return 6;
}
}