Commit 0dbcd0f6 authored by Yixiong Sun's avatar Yixiong Sun
Browse files

Small fixes

parent c0043541
......@@ -8,7 +8,7 @@ def draw_graph(g0, title="",node_numbers=False):
elabels = {}
pos = nx.circular_layout(g0)
nodes = nx.draw_networkx_nodes(g0, pos, nodelist=g0.nodes(), node_color='lightgrey', node_size=500, linewidth=2,
nodes = nx.draw_networkx_nodes(g0, pos, nodelist=g0.nodes(), node_color='lightgrey', node_size=500, linewidths=2,
alpha=0.99)
nodes.set_edgecolor("black")
#for index, i in enumerate(list(g0.nodes(data=True))):
......
......@@ -45,7 +45,6 @@ def get_pdb_seqs(pdb_list):
def filter_extra_seqs(seqs):
good_seqs = []
for seq in seqs:
if len(seq)<3:
continue
seq = "".join(seq)
......@@ -251,10 +250,13 @@ def call_makeBN(mod,dataset,left_out, leave_out_seq = False, left_out_seq = "",
excluded = left_out
g_list = pickle.load(open("../models/"+dataset + "_one_of_each_graph.cPickle",'rb'))
seq_list = pickle.load(open("../models/"+dataset + "_sequences.pickle",'rb'))
try:
motif_seqs = seq_list[0][mod]
except:
motif_seqs = seq_list[mod]
if type(seq_list) == list:
motif_seqs = seq_list[mod][0]
else:
try:
motif_seqs = seq_list[0][mod]
except:
motif_seqs = seq_list[mod]
#print("SEQUENCES",motif_seqs)
#motif_seqs = pickle.load(open("../models/"+dataset + "_sequences.pickle",'rb'))[0][mod]
......
id: 1
Bases: 0_G 1_G 2_A 3_A 4_G 20_C 21_A 22_C 23_C 40_G 41_A 42_C 60_G 61_A 62_G 63_A 64_C
Bases: 0_G 1_G 2_A 3_A 4_G 20_C 21_A 22_C 23_C 40_G 41_A 42_C 59_G 60_G 61_A 62_G 63_A 64_C
( 0_G )--- C/C - --- ( 1_G )
( 1_G )--- C/C - --- ( 2_A )
( 2_A )--- C/C - --- ( 3_A )
......@@ -9,6 +9,7 @@ id: 1
( 22_C )--- C/C - --- ( 23_C )
( 40_G )--- C/C - --- ( 41_A )
( 41_A )--- C/C - --- ( 42_C )
( 59_G )--- C/C - --- ( 60_G )
( 60_G )--- C/C - --- ( 61_A )
( 61_A )--- C/C - --- ( 62_G )
( 62_G )--- C/C - --- ( 63_A )
......@@ -16,6 +17,6 @@ id: 1
( 0_G )--- +/+ c --- ( 64_C )
( 4_G )--- +/+ c --- ( 20_C )
( 23_C )--- +/+ c --- ( 40_G )
( 42_C )--- +/+ c --- ( 60_G )
( 42_C )--- +/+ c --- ( 59_G )
( 3_A )--- 5/5 s --- ( 23_C )
( 4_G )--- 5/5 s --- ( 21_A )
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment