Skip to content

Commit f415a47

Browse files
authored
Merge pull request #285 from UC-Davis-molecular-computing/dev
Dev
2 parents 976ee4d + 82661bb commit f415a47

70 files changed

Lines changed: 34083 additions & 33968 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ pip install scadnano
6565
Read below for troubleshooting suggestions if that didn't work.
6666

6767
### Getting Python
68-
The scadnano Python package requires Python version 3.7 or later (with a workaround available for version 3.6, but not for any lower version).
68+
The scadnano Python package requires Python version 3.7 or later.
6969

7070
To check your current version of Python, open a command line and type
7171

@@ -79,17 +79,13 @@ If it is version 2.7 or below, type
7979
python3 --version
8080
```
8181

82-
If that fails, or reports Python version 3.5 or below, you will have to install a later version of Python (recommended at least 3.7). Follow [this link](https://www.python.org/downloads/) to install Python. You may also use an alternative Python distribution, such as [Anaconda](https://www.anaconda.com/products/individual#Downloads).
83-
84-
If you are using Python 3.6 and do not wish to upgrade, you can install a package providing the required features: the [dataclasses backport](https://pypi.org/project/dataclasses/); see `pip` instructions below to see how to install it.
85-
Python 3.7 provides the
86-
[dataclasses module](https://docs.python.org/3/library/dataclasses.html) automatically.
82+
If that fails, or reports Python version 3.6 or below, you will have to install a later version of Python. Follow [this link](https://www.python.org/downloads/) to install Python. You may also use an alternative Python distribution, such as [Anaconda](https://www.anaconda.com/products/individual#Downloads).
8783

8884

8985

9086
### Installing the scadnano Python package
9187

92-
Once Python is installed (and the dataclasses backport if you have Python version 3.6), there are two ways you can install the scadnano Python package:
88+
Once Python is installed, there are two ways you can install the scadnano Python package:
9389

9490
1. pip (recommended)
9591

examples/16_helix_origami_barrel_from_algoSST_paper.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,9 @@ def add_adapters(design: sc.Design) -> None:
110110
start=left_outside_seed, end=left_inside_seed)
111111
dom_bot = sc.Domain(helix=bot_helix, forward=False,
112112
start=left_outside_seed, end=left_inside_seed)
113-
idt = sc.IDTFields(scale='25nm', purification='STD')
114-
adapter = sc.Strand(domains=[dom_bot, dom_top], name=f'adap-left-{top_helix}-{bot_helix}', idt=idt)
113+
idt = sc.VendorFields(scale='25nm', purification='STD')
114+
adapter = sc.Strand(domains=[dom_bot, dom_top], name=f'adap-left-{top_helix}-{bot_helix}',
115+
vendor_fields=idt)
115116
design.add_strand(adapter)
116117

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

130132

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

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

examples/16_helix_origami_rectangle_seed_tiles_grow_from_top.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def set_helix_major_ticks(design: sc.Design) -> None:
3030
for helix in design.helices.values():
3131
helix.major_ticks = list(major_ticks)
3232

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

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

9395

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
import scadnano as sc
22

3+
34
def create_design() -> sc.Design:
45
ss1_r = sc.Domain(0, True, 0, 4)
56
ss2_r = sc.Domain(0, True, 4, 8)
67
ss3_r = sc.Domain(0, True, 8, 12)
78
ss_l = sc.Domain(0, False, 0, 12)
89

9-
s1_r = sc.Strand([ss1_r], idt=sc.IDTFields(), name='s1_r')
10-
s2_r = sc.Strand([ss2_r], idt=sc.IDTFields(), name='s1_r')
11-
s3_r = sc.Strand([ss3_r], idt=sc.IDTFields(), name='s1_r')
12-
s_l = sc.Strand([ss_l], idt=sc.IDTFields(), name='s_l')
10+
s1_r = sc.Strand([ss1_r], vendor_fields=sc.VendorFields(), name='s1_r')
11+
s2_r = sc.Strand([ss2_r], vendor_fields=sc.VendorFields(), name='s1_r')
12+
s3_r = sc.Strand([ss3_r], vendor_fields=sc.VendorFields(), name='s1_r')
13+
s_l = sc.Strand([ss_l], vendor_fields=sc.VendorFields(), name='s_l')
1314

1415
strands = [s1_r, s2_r, s3_r, s_l]
1516

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

18-
design.assign_dna(s_l, 'AGTT'*3)
19+
design.assign_dna(s_l, 'AGTT' * 3)
1920

2021
return design
2122

23+
2224
if __name__ == '__main__':
2325
d = create_design()
2426
d.write_idt_bulk_input_file(directory='idt')

examples/consecutive_domains.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import scadnano as sc
22

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

2425
return design
2526

27+
2628
if __name__ == '__main__':
2729
d = create_design()
2830
d.write_scadnano_file(directory='output_designs')

examples/idt-plates-explicit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ def create_design() -> sc.Design:
1919
row = ROWS[row_idx]
2020
col = COLS[col_idx]
2121
well = f'{row}{col}'
22-
idt = sc.IDTFields(plate=f'plate{plate}', well=well)
22+
idt = sc.VendorFields(plate=f'plate{plate}', well=well)
2323

24-
strand = sc.Strand(domains=[ss_f, ss_r], idt=idt, name=f'staple{s}')
24+
strand = sc.Strand(domains=[ss_f, ss_r], vendor_fields=idt, name=f'staple{s}')
2525
strands.append(strand)
2626
row_idx += 1
2727
if row_idx == len(ROWS):

0 commit comments

Comments
 (0)