Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mrdna
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tbgl
tools
mrdna
Commits
466df3d2
Commit
466df3d2
authored
5 years ago
by
cmaffeo2
Browse files
Options
Downloads
Patches
Plain Diff
Fixed minor issues with segentmodel_from_lists
parent
76463bb3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mrdna/readers/segmentmodel_from_lists.py
+15
-3
15 additions, 3 deletions
mrdna/readers/segmentmodel_from_lists.py
with
15 additions
and
3 deletions
mrdna/readers/segmentmodel_from_lists.py
+
15
−
3
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
])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment