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
3c9c0217
Commit
3c9c0217
authored
4 years ago
by
cmaffeo2
Browse files
Options
Downloads
Patches
Plain Diff
Exposed fill_sequence in read_cadnano
parent
1707caf7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mrdna/readers/__init__.py
+2
-3
2 additions, 3 deletions
mrdna/readers/__init__.py
mrdna/readers/cadnano_segments.py
+3
-3
3 additions, 3 deletions
mrdna/readers/cadnano_segments.py
with
5 additions
and
6 deletions
mrdna/readers/__init__.py
+
2
−
3
View file @
3c9c0217
## TODO: make module this package conform to a single style for input/output
## TODO: make module this package conform to a single style for input/output
def
read_cadnano
(
json_file
,
**
model_parameters
):
def
read_cadnano
(
json_file
,
sequence
=
None
,
fill_sequence
=
'
T
'
,
**
model_parameters
):
from
.cadnano_segments
import
read_json_file
from
.cadnano_segments
import
read_json_file
from
.cadnano_segments
import
read_model
as
model_from_cadnano_json
from
.cadnano_segments
import
read_model
as
model_from_cadnano_json
data
=
read_json_file
(
json_file
)
data
=
read_json_file
(
json_file
)
return
model_from_cadnano_json
(
data
,
**
model_parameters
)
return
model_from_cadnano_json
(
data
,
sequence
,
fill_sequence
,
**
model_parameters
)
def
read_vhelix
(
maya_file
,
**
model_parameters
):
def
read_vhelix
(
maya_file
,
**
model_parameters
):
from
.polygon_mesh
import
parse_maya_file
,
convert_maya_bases_to_segment_model
from
.polygon_mesh
import
parse_maya_file
,
convert_maya_bases_to_segment_model
from
..model.dna_sequence
import
m13
as
m13seq
maya_bases
=
parse_maya_file
(
maya_file
)
maya_bases
=
parse_maya_file
(
maya_file
)
model
=
convert_maya_bases_to_segment_model
(
maya_bases
,
**
model_parameters
)
model
=
convert_maya_bases_to_segment_model
(
maya_bases
,
**
model_parameters
)
...
...
This diff is collapsed.
Click to expand it.
mrdna/readers/cadnano_segments.py
+
3
−
3
View file @
3c9c0217
...
@@ -673,7 +673,7 @@ def _get_lattice(part):
...
@@ -673,7 +673,7 @@ def _get_lattice(part):
def
package_archive
(
name
,
directory
):
def
package_archive
(
name
,
directory
):
...
...
def
read_model
(
json_data
,
sequence
=
None
,
**
kwargs
):
def
read_model
(
json_data
,
sequence
=
None
,
fill_sequence
=
'
T
'
,
**
kwargs
):
"""
Read in data
"""
"""
Read in data
"""
part
=
decode_cadnano_part
(
json_data
)
part
=
decode_cadnano_part
(
json_data
)
model
=
cadnano_part
(
part
,
model
=
cadnano_part
(
part
,
...
@@ -689,9 +689,9 @@ def read_model(json_data, sequence=None, **kwargs):
...
@@ -689,9 +689,9 @@ def read_model(json_data, sequence=None, **kwargs):
if
sequence
is
None
or
len
(
sequence
)
==
0
:
if
sequence
is
None
or
len
(
sequence
)
==
0
:
## default m13mp18
## default m13mp18
model
.
set_sequence
(
m13seq
,
force
=
False
)
model
.
set_sequence
(
m13seq
,
force
=
False
,
fill_sequence
=
fill_sequence
)
else
:
else
:
model
.
set_sequence
(
sequence
)
model
.
set_sequence
(
sequence
,
fill_sequence
=
fill_sequence
)
return
model
return
model
...
...
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