Skip to content

Commit f5f14c1

Browse files
authored
Merge pull request #313 from UC-Davis-molecular-computing/dev
Dev
2 parents 78fcc89 + c4f64ba commit f5f14c1

12 files changed

Lines changed: 240 additions & 85 deletions

.github/workflows/run_unit_tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python-version: [ 3.7, 3.8, 3.9, "3.10", "3.11" ]
11+
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
1212

1313
steps:
1414
- uses: actions/checkout@v2
@@ -21,8 +21,8 @@ jobs:
2121
with:
2222
activate-conda: true
2323
- name: Install openpyxl,tabulate with conda
24-
run: conda install openpyxl=3.0.10 tabulate=0.8.10
24+
run: conda install openpyxl=3.1 tabulate=0.9
2525
- name: Install docutils with conda
26-
run: conda install docutils=0.16
26+
run: conda install docutils=0.18
2727
- name: Test with unittest
2828
run: python -m unittest -v tests/scadnano_tests.py

README.md

Lines changed: 4 additions & 10 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.
68+
The scadnano Python package requires Python version 3.9 or later.
6969

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

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

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).
82+
If that fails, or reports Python version 3.8 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).
8383

8484

8585

@@ -123,17 +123,11 @@ Once Python is installed, there are two ways you can install the scadnano Python
123123
```
124124
pip 19.3.1 from ...lib\site-packages\pip (python 3.8)
125125
```
126-
If the version of Python at the end is Python 3.7 or higher, you are good. If it is version 2.7 or lower, type
126+
If the version of Python at the end is Python 3.9 or higher, you are good. If it is version 2.7 or lower, type
127127
```
128128
pip3 --version
129129
```
130-
If that works and shows Python 3.7 or higher, you are good, but you should type `pip3` in the subsequent instructions instead of `pip`.
131-
132-
If it shows Python 3.6, install the [dataclasses backport module](https://pypi.org/project/dataclasses/) via
133-
```
134-
pip install dataclasses
135-
```
136-
If it shows Python 3.5 or lower, then you will need to upgrade your Python version (recommended Python 3.7 or higher).
130+
If that works and shows Python 3.9 or higher, you are good, but you should type `pip3` in the subsequent instructions instead of `pip`.
137131

138132
139133
2. download

environment.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ name: scadnano-test
33
channels:
44
- defaults
55
dependencies:
6-
- python=3.7
7-
- xlwt=1.3.0=py37_0
6+
- python=3.9
87
- pip
98
- pip:
109
- sphinx

examples/1_staple_1_helix_origami_roll.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import math
2-
31
import scadnano as sc
42

53
def create_design() -> sc.Design:
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import scadnano as sc
2+
3+
4+
def create_design() -> sc.Design:
5+
group0 = sc.HelixGroup(grid=sc.square)
6+
group1 = sc.HelixGroup(grid=sc.square, geometry=sc.Geometry(bases_per_turn=18),
7+
position=sc.Position3D(0, 3, 0))
8+
groups = {"group 0": group0, "group 1": group1}
9+
helices = [sc.Helix(idx=idx, max_offset=40, group=group) for idx, group in
10+
[(0, "group 0"), (1, "group 1")]]
11+
design = sc.Design(helices=helices, groups=groups, strands=[])
12+
design.draw_strand(0, 0).move(40)
13+
design.draw_strand(0, 40).move(-40)
14+
design.draw_strand(1, 0).move(40)
15+
design.draw_strand(1, 40).move(-40)
16+
17+
return design
18+
19+
20+
if __name__ == '__main__':
21+
d = create_design()
22+
d.write_scadnano_file(directory='output_designs')
23+
d.from_scadnano_file('output_designs/2_staple_2_helix_helixgroup_geometry.sc')
24+
print(f'design: {d.to_json()}')

examples/idt-plates-explicit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def main() -> None:
4545
design = create_design()
4646
design.write_scadnano_file(directory='output_designs')
4747
design.write_idt_bulk_input_file(directory='idt')
48-
design.write_idt_plate_excel_file(directory='idt', use_default_plates=False, only_strands_with_idt=True)
48+
design.write_idt_plate_excel_file(directory='idt', use_default_plates=False, only_strands_with_vendor_fields=True)
4949

5050

5151
if __name__ == '__main__':
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"version": "0.19.5",
3+
"groups": {
4+
"group 0": {
5+
"position": {"x": 0, "y": 0, "z": 0},
6+
"grid": "square"
7+
},
8+
"group 1": {
9+
"position": {"x": 0, "y": 3, "z": 0},
10+
"grid": "square",
11+
"geometry": {
12+
"bases_per_turn": 18
13+
}
14+
}
15+
},
16+
"helices": [
17+
{"group": "group 0", "grid_position": [0, 0]},
18+
{"group": "group 1", "grid_position": [0, 0]}
19+
],
20+
"strands": [
21+
{
22+
"color": "#f74308",
23+
"domains": [
24+
{"helix": 0, "forward": true, "start": 0, "end": 40}
25+
]
26+
},
27+
{
28+
"color": "#57bb00",
29+
"domains": [
30+
{"helix": 0, "forward": false, "start": 0, "end": 40}
31+
]
32+
},
33+
{
34+
"color": "#888888",
35+
"domains": [
36+
{"helix": 1, "forward": true, "start": 0, "end": 40}
37+
]
38+
},
39+
{
40+
"color": "#32b86c",
41+
"domains": [
42+
{"helix": 1, "forward": false, "start": 0, "end": 40}
43+
]
44+
}
45+
]
46+
}

0 commit comments

Comments
 (0)