Skip to content
Snippets Groups Projects
Commit 6a314a50 authored by cmaffeo2's avatar cmaffeo2
Browse files

Fixed some small issues with cadnano reader for ssDNA

parent 07ed55e0
No related branches found
No related tags found
No related merge requests found
......@@ -226,7 +226,10 @@ class cadnano_part(SegmentModel):
numHID = part.getIdNumMax() + 1
for id_num in range(numHID):
offset_and_size = part.getOffsetAndSize(id_num)
try:
offset_and_size = part.getOffsetAndSize(id_num)
except:
offset_and_size = None
if offset_and_size is None:
## Add a placeholder for empty helix
vh_list.append((id_num, 0))
......@@ -499,16 +502,20 @@ class cadnano_part(SegmentModel):
## TODO: use different types of crossovers
## fwd?
## 5'-to-3' direction
if isinstance(seg1, SingleStrandedSegment): f1 = True
if isinstance(seg2, SingleStrandedSegment): f2 = True
seg1.add_crossover(nt1,seg2,nt2,[f1,f2])
def _add_prime_ends(self):
for h,fwd,z in self._5prime_list:
seg, nt = self._get_segment_nucleotide(h,z, fwd)
if isinstance(seg, SingleStrandedSegment): fwd = True
# print("adding 5prime",seg.name,nt,fwd)
seg.add_5prime(nt,fwd)
for h,fwd,z in self._3prime_list:
seg, nt = self._get_segment_nucleotide(h,z, not fwd)
if isinstance(seg, SingleStrandedSegment): fwd = True
# print("adding 3prime",seg.name,nt,fwd)
seg.add_3prime(nt,fwd)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment