Skip to content

Commit

Permalink
Merge pull request #280 from UC-Davis-molecular-computing/279-rename-…
Browse files Browse the repository at this point in the history
…idtfields-to-vendorfields

closes #279: rename IDTFields to VendorFields
  • Loading branch information
dave-doty committed Aug 30, 2023
2 parents d012f17 + 65630f4 commit c0b86f8
Show file tree
Hide file tree
Showing 69 changed files with 33,875 additions and 33,838 deletions.
18 changes: 10 additions & 8 deletions examples/16_helix_origami_barrel_from_algoSST_paper.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@ def add_adapters(design: sc.Design) -> None:
start=left_outside_seed, end=left_inside_seed)
dom_bot = sc.Domain(helix=bot_helix, forward=False,
start=left_outside_seed, end=left_inside_seed)
idt = sc.IDTFields(scale='25nm', purification='STD')
adapter = sc.Strand(domains=[dom_bot, dom_top], name=f'adap-left-{top_helix}-{bot_helix}', idt=idt)
idt = sc.VendorFields(scale='25nm', purification='STD')
adapter = sc.Strand(domains=[dom_bot, dom_top], name=f'adap-left-{top_helix}-{bot_helix}',
vendor_fields=idt)
design.add_strand(adapter)

# right adapters
Expand All @@ -123,8 +124,9 @@ def add_adapters(design: sc.Design) -> None:
start=right_inside_seed, end=right_outside_seed)
dom_bot = sc.Domain(helix=bot_helix, forward=False,
start=right_inside_seed, end=right_outside_seed)
idt = sc.IDTFields(scale='25nm', purification='STD')
adapter = sc.Strand(domains=[dom_top, dom_bot], name=f'adap-right-{top_helix}-{bot_helix}', idt=idt)
idt = sc.VendorFields(scale='25nm', purification='STD')
adapter = sc.Strand(domains=[dom_top, dom_bot], name=f'adap-right-{top_helix}-{bot_helix}',
vendor_fields=idt)
design.add_strand(adapter)


Expand Down Expand Up @@ -161,9 +163,9 @@ def add_tiles_and_assign_dna(design: sc.Design) -> None:
start=left_left, end=left_right)
ss_bot = sc.Domain(helix=bot_helix, forward=False,
start=left_left, end=left_right)
idt = sc.IDTFields(scale='25nm', purification='STD')
idt = sc.VendorFields(scale='25nm', purification='STD')
tile = sc.Strand(domains=[ss_bot, ss_top], name=f'tile-left-{top_helix}-{bot_helix}',
color=sc.Color(0, 0, 0), idt=idt)
color=sc.Color(0, 0, 0), vendor_fields=idt)
design.add_strand(tile)
design.assign_dna(tile, seq)

Expand All @@ -176,9 +178,9 @@ def add_tiles_and_assign_dna(design: sc.Design) -> None:
start=right_left, end=right_right)
ss_bot = sc.Domain(helix=bot_helix, forward=False,
start=right_left, end=right_right)
idt = sc.IDTFields(scale='25nm', purification='STD')
idt = sc.VendorFields(scale='25nm', purification='STD')
tile = sc.Strand(domains=[ss_bot, ss_top], name=f'tile-right-{top_helix}-{bot_helix}',
color=sc.Color(0, 0, 0), idt=idt)
color=sc.Color(0, 0, 0), vendor_fields=idt)
design.add_strand(tile)
design.assign_dna(tile, seq)

Expand Down
12 changes: 7 additions & 5 deletions examples/16_helix_origami_rectangle_seed_tiles_grow_from_top.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def set_helix_major_ticks(design: sc.Design) -> None:
for helix in design.helices.values():
helix.major_ticks = list(major_ticks)

for _,helix in zip([0,1,2], design.helices.values()):
for _, helix in zip([0, 1, 2], design.helices.values()):
ticks = [11, 22, 32, 40, 48]
tick = 58
offset = 11
Expand Down Expand Up @@ -73,8 +73,9 @@ def add_adapters(design: sc.Design) -> None:
start=left_outside_seed, end=left_inside_seed)
ss_bot = sc.Domain(helix=bot_helix, forward=False,
start=left_outside_seed, end=left_inside_seed)
idt = sc.IDTFields(scale='25nm', purification='STD')
adapter = sc.Strand(domains=[ss_bot, ss_top], name=f'adap-left-{top_helix}-{bot_helix}', idt=idt)
idt = sc.VendorFields(scale='25nm', purification='STD')
adapter = sc.Strand(domains=[ss_bot, ss_top], name=f'adap-left-{top_helix}-{bot_helix}',
vendor_fields=idt)
design.add_strand(adapter)

# right adapters
Expand All @@ -86,8 +87,9 @@ def add_adapters(design: sc.Design) -> None:
start=right_inside_seed, end=right_outside_seed)
ss_bot = sc.Domain(helix=bot_helix, forward=False,
start=right_inside_seed, end=right_outside_seed)
idt = sc.IDTFields(scale='25nm', purification='STD')
adapter = sc.Strand(domains=[ss_top, ss_bot], name=f'adap-right-{top_helix}-{bot_helix}', idt=idt)
idt = sc.VendorFields(scale='25nm', purification='STD')
adapter = sc.Strand(domains=[ss_top, ss_bot], name=f'adap-right-{top_helix}-{bot_helix}',
vendor_fields=idt)
design.add_strand(adapter)


Expand Down
12 changes: 7 additions & 5 deletions examples/1_staple_1_helix_origami_idt_duplicate_names.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
import scadnano as sc


def create_design() -> sc.Design:
ss1_r = sc.Domain(0, True, 0, 4)
ss2_r = sc.Domain(0, True, 4, 8)
ss3_r = sc.Domain(0, True, 8, 12)
ss_l = sc.Domain(0, False, 0, 12)

s1_r = sc.Strand([ss1_r], idt=sc.IDTFields(), name='s1_r')
s2_r = sc.Strand([ss2_r], idt=sc.IDTFields(), name='s1_r')
s3_r = sc.Strand([ss3_r], idt=sc.IDTFields(), name='s1_r')
s_l = sc.Strand([ss_l], idt=sc.IDTFields(), name='s_l')
s1_r = sc.Strand([ss1_r], vendor_fields=sc.VendorFields(), name='s1_r')
s2_r = sc.Strand([ss2_r], vendor_fields=sc.VendorFields(), name='s1_r')
s3_r = sc.Strand([ss3_r], vendor_fields=sc.VendorFields(), name='s1_r')
s_l = sc.Strand([ss_l], vendor_fields=sc.VendorFields(), name='s_l')

strands = [s1_r, s2_r, s3_r, s_l]

design = sc.Design(strands=strands, grid=sc.square)

design.assign_dna(s_l, 'AGTT'*3)
design.assign_dna(s_l, 'AGTT' * 3)

return design


if __name__ == '__main__':
d = create_design()
d.write_idt_bulk_input_file(directory='idt')
4 changes: 3 additions & 1 deletion examples/consecutive_domains.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import scadnano as sc


def create_design() -> sc.Design:
# shows how to make consecutive domains on a helix, separated by a crossover that appears horizontal
# this is useful when doing single-stranded tile designs, for instance, or any other design
Expand All @@ -19,10 +20,11 @@ def create_design() -> sc.Design:
# 0 [------------>
#
# 1 <------------]
design.add_full_crossover(helix=0, helix2=1, offset=8, forward=True)
# design.add_full_crossover(helix=0, helix2=1, offset=8, forward=True)

return design


if __name__ == '__main__':
d = create_design()
d.write_scadnano_file(directory='output_designs')
4 changes: 2 additions & 2 deletions examples/idt-plates-explicit.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ def create_design() -> sc.Design:
row = ROWS[row_idx]
col = COLS[col_idx]
well = f'{row}{col}'
idt = sc.IDTFields(plate=f'plate{plate}', well=well)
idt = sc.VendorFields(plate=f'plate{plate}', well=well)

strand = sc.Strand(domains=[ss_f, ss_r], idt=idt, name=f'staple{s}')
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):
Expand Down
Loading

0 comments on commit c0b86f8

Please sign in to comment.