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
39425b0c
Commit
39425b0c
authored
Aug 17, 2018
by
cmaffeo2
Browse files
fixup: Enabled automatic creation of terminal...
parent
e75f2f0a
Changes
1
Hide whitespace changes
Inline
Side-by-side
segmentmodel.py
View file @
39425b0c
...
...
@@ -2059,17 +2059,17 @@ class SegmentModel(ArbdModel):
""" Ensure unconnected ends have 5prime Location objects """
for
seg
in
self
.
segments
:
## TODO move into Segment calls
five_prime_locs
=
seg
.
get_locations
(
"5prime"
)
three_prime_locs
=
seg
.
get_locations
(
"3prime"
)
five_prime_locs
=
sum
([
seg
.
get_locations
(
s
)
for
s
in
(
"5prime"
,
"crossover"
,
"terminal_crossover"
)],[]
)
three_prime_locs
=
sum
([
seg
.
get_locations
(
s
)
for
s
in
(
"3prime"
,
"crossover"
,
"terminal_crossover"
)],[]
)
def
is_start_5prime
(
l
):
return
l
.
get_nt_pos
()
<
1
and
l
.
on_fwd_strand
def
is_end_5prime
(
l
):
return
l
.
get_nt_pos
()
>
seg
.
num_nt
-
1
and
not
l
.
on_fwd_strand
return
l
.
get_nt_pos
()
>
seg
.
num_nt
-
2
and
not
l
.
on_fwd_strand
def
is_start_3prime
(
l
):
return
l
.
get_nt_pos
()
<
1
and
not
l
.
on_fwd_strand
def
is_end_3prime
(
l
):
return
l
.
get_nt_pos
()
>
seg
.
num_nt
-
1
and
l
.
on_fwd_strand
return
l
.
get_nt_pos
()
>
seg
.
num_nt
-
2
and
l
.
on_fwd_strand
if
seg
.
start5
.
connection
is
None
:
if
len
(
list
(
filter
(
is_start_5prime
,
five_prime_locs
)))
==
0
:
...
...
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