about summary refs log tree commit diff
path: root/sourcecodes/violin_int_plotly.py
diff options
context:
space:
mode:
Diffstat (limited to 'sourcecodes/violin_int_plotly.py')
-rw-r--r--sourcecodes/violin_int_plotly.py25
1 files changed, 9 insertions, 16 deletions
diff --git a/sourcecodes/violin_int_plotly.py b/sourcecodes/violin_int_plotly.py
index 15889500..75d2b3cb 100644
--- a/sourcecodes/violin_int_plotly.py
+++ b/sourcecodes/violin_int_plotly.py
@@ -1,4 +1,4 @@
-#!/var/www/html/compbio/BNW_1.3/bnw-env/bin/python3
+#!/home/jziebart/python/Python-2.7.15/python
 import os
 import sys
 import math
@@ -37,12 +37,10 @@ filename=netID+"continuous_input.txt"
 f=open(filename,"r")
 #Read the first line to get the variable names
 line=f.readline()
-#line = map(string.strip,line.strip().split("\t"))
-varNames = line.strip().split("\t")
-#varNames = line
+line = map(string.strip,line.strip().split("\t"))
+varNames = line
 line=f.readline()
-#line = map(string.strip,line.strip().split("\t"))
-line = line.strip().split("\t")
+line = map(string.strip,line.strip().split("\t"))
 for i in range(len(line)):
     line[i] = int(line[i])
 cd_types = line
@@ -57,8 +55,7 @@ intfile=netID+"parameters_ev.txt"
 intf=open(intfile,"r")
 line=intf.readline()
 while line:
-    #line = map(string.strip,line.strip().split("\t"))
-    line = line.strip().split("\t")
+    line = map(string.strip,line.strip().split("\t"))
     param_file.append(line)
     line=intf.readline()
 keepVars = []
@@ -77,8 +74,7 @@ for i in range(len(param_file)):
 data = []
 line = f.readline()
 while line:
-    #line = map(string.strip,line.strip().split("\t"))
-    line = line.strip().split("\t")
+    line = map(string.strip,line.strip().split("\t"))
     temp = []
     for i in range(len(varNames)):
         if cd_types[i] == 1:
@@ -105,19 +101,16 @@ while line:
 
 
 layout = go.Layout(
-    title="Distributions after intervention",
+    title="<br>Distributions after intervention",
     titlefont=dict(
         family='Arial, sans-serif',
         size=24,
         color='black'
         ),
-    title_xref="paper",
-    title_x=0.5,
-    title_xanchor="center",
-    title_yanchor="middle",
+
     yaxis=dict(title="Distributions of standardized data"),
     legend=dict(orientation='h'),
-    margin=dict(t=40,l=70,b=40)
+    margin=dict(t=10,l=70,b=40)
 )
 fig = go.Figure(layout=layout)