def add_scaffold_crossovers(design: sc.DNADesign): crossovers = [] # scaffold interior for helix in range(1, 23, 2): crossovers.append( sc.Crossover(helix1=helix, helix2=helix + 1, offset1=152, forward1=False)) # scaffold edges for helix in range(0, 23, 2): crossovers.append( sc.Crossover(helix1=helix, helix2=helix + 1, offset1=8, forward1=True, half=True)) crossovers.append( sc.Crossover(helix1=helix, helix2=helix + 1, offset1=295, forward1=True, half=True)) design.add_crossovers(crossovers)
def add_crossovers(design: sc.DNADesign): # 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 crossovers = [] for offset in range(58, 1250, 42): crossovers.append( sc.Crossover(helix=0, helix2=1, offset=offset, forward=True)) for offset in range(30, 1250, 42): crossovers.append( sc.Crossover(helix=1, helix2=2, offset=offset, forward=False)) for offset in range(54, 1250, 42): crossovers.append( sc.Crossover(helix=2, helix2=3, offset=offset, forward=True)) for offset in range(26, 1250, 42): crossovers.append( sc.Crossover(helix=3, helix2=4, offset=offset, forward=False)) # scaffold edges crossovers.append( sc.Crossover(helix=0, helix2=1, offset=16, forward=True, half=True)) crossovers.append( sc.Crossover(helix=2, helix2=3, offset=12, forward=True, half=True)) crossovers.append( sc.Crossover(helix=4, helix2=5, offset=19, forward=True, half=True)) crossovers.append( sc.Crossover(helix=0, helix2=1, offset=1275, forward=True, half=True)) crossovers.append( sc.Crossover(helix=2, helix2=3, offset=1271, forward=True, half=True)) crossovers.append( sc.Crossover(helix=4, helix2=5, offset=1278, forward=True, half=True)) design.add_crossovers(crossovers)