def add_staple_crossovers(design: sc.Design): for helix in range(23): start_offset = 24 if helix % 2 == 0 else 40 for offset in range(start_offset, 296, 32): if offset != 152: # skip crossover near seam design.add_full_crossover(helix=helix, helix2=helix + 1, offset=offset, forward=helix % 2 == 1)
def add_staple_crossovers(design: sc.Design) -> None: for helix in range(23): start_offset = 16 if helix % 2 == 0 else 32 for offset in range(start_offset, 288, 32): if offset != 144: # skip crossover near seam design.add_full_crossover(helix=helix, helix2=helix + 1, offset=offset, forward=helix % 2 == 1)
def add_scaffold_crossovers(design: sc.Design) -> None: for helix in range(1, 23, 2): # scaffold interior crossovers design.add_full_crossover(helix=helix, helix2=helix + 1, offset=144, forward=False) for helix in range(0, 23, 2): # scaffold edges crossovers design.add_half_crossover(helix=helix, helix2=helix + 1, offset=0, forward=True) design.add_half_crossover(helix=helix, helix2=helix + 1, offset=287, forward=True)
def add_crossovers(design: sc.Design) -> None: # staples interior for offset in range(84, 1246, 42): design.add_full_crossover(helix=0, helix2=1, offset=offset, forward=False) design.add_full_crossover(helix=3, helix2=4, offset=offset, forward=True) for offset in range(56, 1246, 42): design.add_full_crossover(helix=1, helix2=2, offset=offset, forward=True) design.add_full_crossover(helix=4, helix2=5, offset=offset, forward=False) for offset in range(70, 1246, 42): design.add_full_crossover(helix=2, helix2=3, offset=offset, forward=False) design.add_full_crossover(helix=5, helix2=0, offset=offset, forward=True) for offset in range(49, 1245, 42): # extra crossovers 5 - 0 for some reason design.add_full_crossover(helix=5, helix2=0, offset=offset, forward=True) # staples edges design.add_half_crossover(helix=0, helix2=1, offset=42, forward=False) design.add_half_crossover(helix=3, helix2=4, offset=42, forward=True) design.add_half_crossover(helix=0, helix2=5, offset=1245, forward=False) design.add_half_crossover(helix=2, helix2=3, offset=1245, forward=False) # scaffold interior for offset in range(58, 1250, 42): design.add_full_crossover(helix=0, helix2=1, offset=offset, forward=True) for offset in range(30, 1250, 42): design.add_full_crossover(helix=1, helix2=2, offset=offset, forward=False) for offset in range(54, 1250, 42): design.add_full_crossover(helix=2, helix2=3, offset=offset, forward=True) for offset in range(26, 1250, 42): design.add_full_crossover(helix=3, helix2=4, offset=offset, forward=False) # scaffold edges design.add_half_crossover(helix=0, helix2=1, offset=16, forward=True) design.add_half_crossover(helix=2, helix2=3, offset=12, forward=True) design.add_half_crossover(helix=4, helix2=5, offset=19, forward=True) design.add_half_crossover(helix=0, helix2=1, offset=1275, forward=True) design.add_half_crossover(helix=2, helix2=3, offset=1271, forward=True) design.add_half_crossover(helix=4, helix2=5, offset=1278, forward=True)