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
616ca8e2
Commit
616ca8e2
authored
6 years ago
by
cmaffeo2
Browse files
Options
Downloads
Patches
Plain Diff
Added 'read_model' to cadnano_segments
parent
ad9e6189
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
cadnano_segments.py
+33
-0
33 additions, 0 deletions
cadnano_segments.py
with
33 additions
and
0 deletions
cadnano_segments.py
+
33
−
0
View file @
616ca8e2
...
@@ -544,6 +544,39 @@ def decode_cadnano_part(json_data):
...
@@ -544,6 +544,39 @@ def decode_cadnano_part(json_data):
def
package_archive
(
name
,
directory
):
def
package_archive
(
name
,
directory
):
...
...
def
read_model
(
json_data
,
sequence
=
None
):
"""
Read in data
"""
part
=
decode_cadnano_part
(
json_data
)
model
=
cadnano_part
(
part
,
max_basepairs_per_bead
=
7
,
max_nucleotides_per_bead
=
4
,
local_twist
=
False
)
model
.
_generate_strands
()
# TODO: move into model creation
# TODO
# try:
# model.set_cadnano_sequence()
# finally:
# ...
# if sequence is not None and len() :
# model.strands[0].set_sequence(seq)
if
sequence
is
None
or
len
(
sequence
)
==
0
:
## default m13mp18
sequence
=
list
(
m13seq
)
try
:
model
.
strands
[
0
].
set_sequence
(
sequence
)
except
:
...
else
:
model
.
strands
[
0
].
set_sequence
(
sequence
)
for
s
in
model
.
segments
:
s
.
randomize_unset_sequence
()
return
model
def
run_simulation_protocol
(
output_name
,
job_id
,
json_data
,
def
run_simulation_protocol
(
output_name
,
job_id
,
json_data
,
sequence
=
None
,
sequence
=
None
,
remove_long_bonds
=
False
,
remove_long_bonds
=
False
,
...
...
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