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
1d5f21b8
Commit
1d5f21b8
authored
Jun 05, 2020
by
cmaffeo2
Browse files
Segmentmodel_from_lists will now guess stacks based on connectivity if not supplied
parent
4526e407
Changes
1
Hide whitespace changes
Inline
Side-by-side
mrdna/readers/segmentmodel_from_lists.py
View file @
1d5f21b8
...
...
@@ -261,7 +261,18 @@ def model_from_basepair_stack_3prime(coordinate, basepair, stack, three_prime,
raise
ValueError
(
"The 'orientation' array is not properly formatted"
)
if
stack
is
None
:
stack
=
find_stacks
(
coordinate
,
orientation
)
if
orientation
is
not
None
:
stack
=
find_stacks
(
coordinate
,
orientation
)
else
:
## Guess stacking based on 3' connectivity
stack
=
np
.
array
(
three_prime
,
dtype
=
np
.
int
)
# Assume nts on 3' ends are stacked
_stack_below
=
_three_prime_list_to_five_prime
(
stack
)
_has_bp
=
(
basepair
>=
0
)
_nostack
=
np
.
where
(
(
stack
==
-
1
)
*
_has_bp
)[
0
]
_has_stack_below
=
_stack_below
[
basepair
[
_nostack
]]
>=
0
_nostack2
=
_nostack
[
_has_stack_below
]
stack
[
_nostack2
]
=
basepair
[
_stack_below
[
basepair
[
_nostack2
]]]
else
:
try
:
stack
=
np
.
array
(
stack
,
dtype
=
np
.
int
)
...
...
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