Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Roman Sarrazin-Gendron
RNABayesPairing2
Commits
f4574853
Commit
f4574853
authored
Mar 19, 2021
by
Roman Sarrazin-Gendron
Browse files
fixed flipped modules
parent
07b6f626
Changes
2
Hide whitespace changes
Inline
Side-by-side
bayespairing/src/BayesPairing.py
View file @
f4574853
...
...
@@ -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)
...
...
bayespairing/src/scanning/src/classes/ScanResult.py
View file @
f4574853
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment