Commit d1e71f5f authored by cmaffeo2's avatar cmaffeo2
Browse files

Made readers/__init__.py import readers only when used

parent fa7887ae
from ..segmentmodel import SegmentModel
""" cadnano """
from .cadnano_segments import read_json_file
from .cadnano_segments import read_model as model_from_cadnano_json
""" vHelix """
from .polygon_mesh import parse_maya_file, convert_maya_to_segments
from ..model.dna_sequence import m13 as m13seq
""" Atomic PDB """
from .segmentmodel_from_pdb import SegmentModelFromPdb
## TODO: make module this package conform to a single style for input/output
def read_cadnano(json_file, **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)
def read_vhelix(maya_file, **model_parameters):
from .polygon_mesh import parse_maya_file, convert_maya_to_segments
from ..model.dna_sequence import m13 as m13seq
from ..segmentmodel import SegmentModel
data = parse_maya_file(maya_file)
segments, dsSegmentDict = convert_maya_to_segments( data )
if 'dimensions' not in model_parameters:
......@@ -42,4 +36,5 @@ def read_list(infile,**model_parameters):
def read_atomic_pdb(pdb_file, **model_parameters):
from .segmentmodel_from_pdb import SegmentModelFromPdb
return SegmentModelFromPdb(pdb_file)
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