Commit 27e83032 authored by Roman Sarrazin-Gendron's avatar Roman Sarrazin-Gendron
Browse files

setup for blanchette run

:wq
parent 6f8f64a0
......@@ -63,7 +63,7 @@ def parse_sequence(seq,modules,ss,dataset,left_out,sm=0.25, mc=0,k=5000):
os.chdir("../models")
motif = pickle.load( open( str(dataset+"_BN_"+str(mod)), "rb" ) )
constraints = testSS.get_constraints_from_BN(this_graph)
pickle_name = "samp"+str(mod)+".cPickle"
pickle_name = dataset + "_samp"+str(mod)+".cPickle"
if left_out != "NONE":
#if not (os.path.isfile(pickle_name)) or not (os.path.isfile("best"+pickle_name)):
sample_df,sample_dict,struct_list = bs.setup_sampling(motif,k)
......
......@@ -389,8 +389,8 @@ def seq_to_struct(
(m, iii, l) = best_struct
#print(iii)
print("III")
print(iii)
# Build a regex expression with the subsequences, allowing a lot of leeway between them (for now it's up to 30
# but I have to pick a number with a meaning for that)
......@@ -421,7 +421,7 @@ def seq_to_struct(
space = 0
for k in range(int(i[0]), int(i[-1]) + 1):
if k in i or str(k) in i:
cons = [convert[int(a)]for a in iii[int(k)]]
cons = [convert[int(a)]for a in list(iii[int(k)])]
if space > 1:
re_call = re_call + ')([ACGU]{' + str(space
- 1) + ',' + str(space + 1) + '})'
......
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