-
Notifications
You must be signed in to change notification settings - Fork 7
/
idt-plates-explicit.py
52 lines (40 loc) · 1.56 KB
/
idt-plates-explicit.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import scadnano as sc
ROWS = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H']
COLS = list(range(1, 13))
def create_design() -> sc.Design:
num_strands = 208
start = 0
strands = []
plate = 1
row_idx = 0
col_idx = 0
for s in range(1, num_strands + 1):
ss_f = sc.Domain(helix=0, forward=True, start=start, end=start + 10)
ss_r = sc.Domain(helix=1, forward=False, start=start, end=start + 10)
row = ROWS[row_idx]
col = COLS[col_idx]
well = f'{row}{col}'
idt = sc.VendorFields(plate=f'plate{plate}', well=well)
strand = sc.Strand(domains=[ss_f, ss_r], vendor_fields=idt, name=f'staple{s}')
strands.append(strand)
row_idx += 1
if row_idx == len(ROWS):
row_idx = 0
col_idx += 1
if col_idx == len(COLS):
col_idx = 0
plate += 1
start += 10
scaffold = sc.Strand([sc.Domain(helix=0, forward=False, start=0, end=start),
sc.Domain(helix=1, forward=True, start=0, end=start)], is_scaffold=True)
strands.append(scaffold)
design = sc.Design(strands=strands, grid=sc.square)
design.assign_m13_to_scaffold()
return design
def main() -> None:
design = create_design()
design.write_scadnano_file(directory='output_designs')
design.write_idt_bulk_input_file(directory='idt')
design.write_idt_plate_excel_file(directory='idt', use_default_plates=False, only_strands_with_idt=True)
if __name__ == '__main__':
main()