Commit d12589d5 authored by cmaffeo2's avatar cmaffeo2
Browse files

Added termini to sequences

parent f87c6dfe
......@@ -386,7 +386,7 @@ class Segment(ConnectableElement, Group):
nt_dict = canonicalNtRev
atoms = nt_dict[ key ].generate() # TODO: clone?
atoms.orientation = orientation.dot(atoms.orientation) # this one should be correct
atoms.orientation = orientation.dot(atoms.orientation)
atoms.position = pos
## TODOTODO: scale positions, set beta
......@@ -920,6 +920,7 @@ class Strand(Group):
## set sequence on each segment
for s in self.children:
seg = s.segment
# TODOTODO
...
...
......@@ -939,13 +940,20 @@ class Strand(Group):
def generate_atomic_model(self):
last = None
resid = 1
strand_segment_count = 0
for s in self.strand_segments:
strand_segment_count += 1
seg = s.segment
contour = s.get_contour_points()
assert(s.end != s.start)
assert(np.linalg.norm( seg.contour_to_position(contour[-1]) - seg.contour_to_position(contour[0]) ) > 0.1)
for c,seq in zip(contour,s.get_sequence()):
nt = seg._generate_atomic_nucleotide( c, s.is_fwd, seq ) # TODOTODO add sequence,termini
if last is None:
seq = "5"+seq
if strand_segment_count == len(s.strand_segments) and c == 1:
seq = seq+"3"
nt = seg._generate_atomic_nucleotide( c, s.is_fwd, seq )
# if s.is_fwd:
# else:
# nt = seg._generate_atomic_nucleotide( c, s.is_fwd, "A" )
......
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