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
RNABayesPairing
Commits
bf65c555
Commit
bf65c555
authored
Mar 21, 2019
by
Roman Sarrazin-Gendron
Browse files
fixed tuple out of range issue
parent
11098857
Changes
1
Hide whitespace changes
Inline
Side-by-side
bayespairing/src/parse_sequences.py
View file @
bf65c555
...
...
@@ -248,7 +248,7 @@ def run_fasta(input, modules_to_parse, dataset, ss="", arguments={}):
index
=
0
while
index
+
w
<
len
(
input
):
#print("Running Bayespairing on sequence window:", index, index + w)
print
(
input
[
index
:
index
+
w
])
#
print(input[index:index + w])
bf
=
max
(
0
,
index
)
maxs
=
run_BP
(
input
[
index
:
index
+
w
],
ss
,
modules_to_parse
,
dataset
,
"NONE"
,
m
,
n
,
sm
,
mc
,
p
,
k
,
sscons
)
for
mod
in
modules_to_parse
:
...
...
@@ -261,7 +261,7 @@ def run_fasta(input, modules_to_parse, dataset, ss="", arguments={}):
all_maxes
.
append
((
mod
,
index
,
corrected_maxes
))
index
=
index
+
s
#print("Running Bayespairing on sequence part:", index, len(input))
print
(
input
[
index
:])
#
print(input[index:])
maxs
=
run_BP
(
input
[
index
:],
ss
,
modules_to_parse
,
dataset
,
"NONE"
,
m
,
n
,
sm
,
mc
,
p
,
k
,
sscons
)
for
mod
in
modules_to_parse
:
corrected_maxes
=
[]
...
...
@@ -324,7 +324,7 @@ def present_output(all_maxes, threshold, offset=0):
if
len
(
m
)
<
2
:
continue
current_module
=
m
[
0
]
for
sub_max
in
range
(
len
(
m
)):
for
sub_max
in
range
(
len
(
m
)
-
2
):
if
sub_max
%
3
==
1
:
this_max
=
[
round
(
m
[
sub_max
],
3
),
*
(
seq_ranges
(
m
[
sub_max
+
1
],
m
[
sub_max
+
2
]))]
if
this_max
[
0
]
>
threshold
and
not
check_already_there
(
output
,
this_max
,
current_module
):
...
...
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