Commit 00443f9d authored by cmaffeo2's avatar cmaffeo2
Browse files

Gave vHelix reader large default dimensions; removed some print statements

parent 817951ed
......@@ -20,6 +20,8 @@ def read_cadnano(json_file, **model_parameters):
def read_vhelix(maya_file, **model_parameters):
data = parse_maya_file(maya_file)
segments, dsSegmentDict = convert_maya_to_segments( data )
if 'dimensions' not in model_parameters:
model_parameters['dimensions']=(5000,5000,5000)
model = SegmentModel( segments,**model_parameters )
model.set_sequence(m13seq*10)
return model
......
......@@ -314,10 +314,8 @@ def convert_maya_to_segments(helices):
nt = 0
def add_primes(b,nt,fwd):
if b.end3 is None:
if not fwd: print("3prime at {}[{},{}]".format(hn,nt,fwd))
segments[hn].add_3prime(nt,fwd)
if b.end5 is None:
if not fwd: print("5prime at {}[{},{}]".format(hn,nt,fwd))
segments[hn].add_5prime(nt,fwd)
for b in ordered_fwd_bases:
......
......@@ -905,6 +905,7 @@ class DoubleStrandedSegment(Segment):
## Real work
def _connect_ends(self, end1, end2, type_, force_connection):
debug = False
## TODO remove self?
## validate the input
for end in (end1, end2):
......@@ -914,10 +915,10 @@ class DoubleStrandedSegment(Segment):
## Remove other connections involving these points
if end1.connection is not None:
print("WARNING: reconnecting {}".format(end1))
if debug: print("WARNING: reconnecting {}".format(end1))
end1.connection.delete()
if end2.connection is not None:
print("WARNING: reconnecting {}".format(end2))
if debug: print("WARNING: reconnecting {}".format(end2))
end2.connection.delete()
## Create and add connection
......@@ -1133,11 +1134,13 @@ class Strand(Group):
self.children = self.strand_segments = []
self.segname = segname
self.is_circular = is_circular
self.debug = False
## TODO disambiguate names of functions
def add_dna(self, segment, start, end, is_fwd):
""" start/end are given as nt """
if np.abs(start-end) <= 0.9:
if self.debug:
print( "WARNING: segment constructed with a very small number of nts ({})".format(np.abs(start-end)) )
# import pdb
# pdb.set_trace()
......
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