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

fixed flipped modules

parent 07b6f626
......@@ -480,7 +480,7 @@ def parse_sequence(seq, modules, ss, dataset, BNs, t=-10, samplesize=20000, Lamb
#print(seq)
#print(struct)
if not str(r.node.positions) in modules_predicted[r.module.ID]:
#print("about to score",r.seq, r.rotation, r.pos)
#print("about to score",r.seq, r.rotation, r.pos, r.module.nodes)
r.eval(fold_compound=fc)
#print("SCORED MODULE",r.module.ID, r.seq, r.pos, r.score)
#print("PASSING THRESHOLD",r.score,t)
......
......@@ -55,8 +55,8 @@ class ExactScanResult:
#print("FOUND SEQUENCE:",self.seq)
#print("UNROTATED GAPS",self.module.gaps_per_strand)
if rotation:
self.rotate(rotation)
#if rotation:
# self.rotate(rotation)
#print("LEN POS",self.pos,"LEN SEQ",self.seq, "ROTATION",rotation)
#print("DONE ROTATION, CURRENT SEQUENCE", self.seq)
......@@ -100,8 +100,9 @@ class ExactScanResult:
def reintegrate_module_gaps_to_sse_sequence_and_positions(self):
#print("REGAPPING MODULE", self.module.ss, self.module.stackings, self.gaps,self.seq,self.pos)
positions = self.pos
gaps = self.rotate_list(self.gaps)
positions = self.rotate_list(self.pos)
#gaps = self.rotate_list(self.gaps) this does not help, the gaps shouldnt rotate on the module
gaps = self.gaps
seq = self.seq
new_seq = ""
......@@ -113,8 +114,8 @@ class ExactScanResult:
if ind not in gaps[0]:
new_seq += nuc
else:
#for strand,subseq in enumerate(self.rotate_list(seq.split("&"))):
for strand,subseq in enumerate(seq.split("&")):
for strand,subseq in enumerate(self.rotate_list(seq.split("&"))):
#for strand,subseq in enumerate(seq.split("&")):
#print("STRAND",strand,"GAPS",gaps, seq, seq.split("&"))
if not gaps[strand]:
new_seq+=subseq
......@@ -138,7 +139,7 @@ class ExactScanResult:
new_strand.append(pos)
new_pos.append(new_strand)
self.module_positions = new_pos
#print("POST REGAPPED SEQUENCE:",new_pos,new_seq)
#print("POST REGAPPED SEQUENCE:",new_pos,new_seq, gaps)
#still on tryout.. does it affect anything else to name pos here immediately?
self.pos = new_pos
......
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