Commit 3c9c0217 authored by cmaffeo2's avatar cmaffeo2
Browse files

Exposed fill_sequence in read_cadnano

parent 1707caf7
## 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_model as model_from_cadnano_json
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):
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)
model = convert_maya_bases_to_segment_model( maya_bases, **model_parameters )
......@@ -673,7 +673,7 @@ def _get_lattice(part):
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 """
part = decode_cadnano_part(json_data)
model = cadnano_part(part,
......@@ -689,9 +689,9 @@ def read_model(json_data, sequence=None, **kwargs):
if sequence is None or len(sequence) == 0:
## default m13mp18
model.set_sequence(m13seq,force=False, fill_sequence=fill_sequence)
model.set_sequence(sequence, fill_sequence=fill_sequence)
return model
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment