Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tbgl
tools
mrdna
Commits
466df3d2
Commit
466df3d2
authored
Aug 13, 2019
by
cmaffeo2
Browse files
Fixed minor issues with segentmodel_from_lists
parent
76463bb3
Changes
1
Hide whitespace changes
Inline
Side-by-side
mrdna/readers/segmentmodel_from_lists.py
View file @
466df3d2
...
...
@@ -84,10 +84,11 @@ def basepairs_and_stacks_to_helixmap(basepairs,stacks_above):
assert
(
helixmap
[
nt
]
==
-
1
)
assert
(
helixmap
[
bp
]
==
-
1
)
all_nts
.
append
(
nt
)
if
nt
==
nt0
:
break
all_nts
.
append
(
nt
)
if
counter
>
1e6
:
raise
Exception
(
"DNA is apparently too long; probably there is something wrong with the structure"
)
counter
+=
1
...
...
@@ -98,7 +99,6 @@ def basepairs_and_stacks_to_helixmap(basepairs,stacks_above):
for
nt
in
group
:
bp
=
basepairs
[
nt
]
is_fwd
[
bp
]
=
0
rank
+=
1
helixmap
[
nt
]
=
helixmap
[
bp
]
=
hid
helixrank
[
nt
]
=
helixrank
[
bp
]
=
rank
processed
.
add
(
nt
)
...
...
@@ -263,7 +263,19 @@ def model_from_basepair_stack_3prime(coordinates, basepair, stack, three_prime,
f1
,
f2
=
[
fwd
[
i
]
for
i
in
(
r1
,
r2
)]
if
nt1
in
(
0
,
seg1
.
num_nt
-
1
)
or
nt2
in
(
0
,
seg2
.
num_nt
-
1
):
seg1
.
add_crossover
(
nt1
,
seg2
,
nt2
,[
f1
,
f2
],
type_
=
"terminal_crossover"
)
if
nt1
in
(
0
,
seg1
.
num_nt
-
1
)
and
nt2
in
(
0
,
seg2
.
num_nt
-
1
):
if
nt1
==
0
:
end1
=
seg1
.
start5
if
f1
else
seg1
.
start3
else
:
end1
=
seg1
.
end3
if
f1
else
seg1
.
end5
if
nt2
==
0
:
end2
=
seg2
.
start5
if
f2
else
seg2
.
start3
else
:
end2
=
seg2
.
end3
if
f2
else
seg2
.
end5
seg1
.
_connect_ends
(
end1
,
end2
,
type_
=
'intrahelical'
)
else
:
seg1
.
add_crossover
(
nt1
,
seg2
,
nt2
,[
f1
,
f2
],
type_
=
"terminal_crossover"
)
else
:
seg1
.
add_crossover
(
nt1
,
seg2
,
nt2
,[
f1
,
f2
])
...
...
Write
Preview
Supports
Markdown
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