Commit 470db6c1 authored by Roman Sarrazin-Gendron's avatar Roman Sarrazin-Gendron
Browse files

update distance between module

parent a73b176c
......@@ -400,7 +400,9 @@ def seq_to_struct(
if component<len(position_subsets)-1:
dis = component_distance[component]
if dis[1]<4:
dis[1]=4
dis[1]=10
else:
dis[1]=1.5*dis[1]
if len(re_call) > 0:
re_call = re_call + r")([ACGU]{"+str(2)+","+str(dis[1])+"})"
if len(i) == 1:
......
......@@ -273,21 +273,23 @@ def cross_validation(modules_to_test):
print(scores[k])
crossval_results[i].append(scores[k])
else:
continue
found = False
new_seq,new_ss = [],[]
offset = 0
if last-first<300:
if last-first<400:
helices = BayesPairing.find_loops(ss)[1]
print("HELICES")
print(helices)
for helix in helices:
if first>helix[0] and last<helix[1]:
found = True
new_seq = seq[helix[0]:helix[1]]
new_ss = ss[helix[0]:helix[1]]
offset = helix[0]
break
else:
continue
if len(new_seq)>400:
if len(new_seq)>400 or found==False:
continue
#filler = 200-(last-first)
#split = random.randrange(0,filler)
......@@ -308,9 +310,9 @@ def cross_validation(modules_to_test):
crossval_results[i].append(scores[k])
cv_fn = "crossval_"+str(i)
cv_fn = "car_crossval_"+str(i)+".cPickle"
pickle.dump(crossval_results[i],open(cv_fn,"wb"))
pickle.dump(crossval_results, open("crossval_results.cPickle","wb"))
pickle.dump(crossval_results, open("just_short_carnaval_crossval_results_fixed_max_len.cPickle","wb"))
if __name__ == "__main__":
modules_to_test = range(0,len(graphs))
cross_validation(modules_to_test)
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