Skip to content
Merged

Dev #313

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/run_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.7, 3.8, 3.9, "3.10", "3.11" ]
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]

steps:
- uses: actions/checkout@v2
Expand All @@ -21,8 +21,8 @@ jobs:
with:
activate-conda: true
- name: Install openpyxl,tabulate with conda
run: conda install openpyxl=3.0.10 tabulate=0.8.10
run: conda install openpyxl=3.1 tabulate=0.9
- name: Install docutils with conda
run: conda install docutils=0.16
run: conda install docutils=0.18
- name: Test with unittest
run: python -m unittest -v tests/scadnano_tests.py
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pip install scadnano
Read below for troubleshooting suggestions if that didn't work.

### Getting Python
The scadnano Python package requires Python version 3.7 or later.
The scadnano Python package requires Python version 3.9 or later.

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

Expand All @@ -79,7 +79,7 @@ If it is version 2.7 or below, type
python3 --version
```

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).
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).



Expand Down Expand Up @@ -123,17 +123,11 @@ Once Python is installed, there are two ways you can install the scadnano Python
```
pip 19.3.1 from ...lib\site-packages\pip (python 3.8)
```
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
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
```
pip3 --version
```
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`.

If it shows Python 3.6, install the [dataclasses backport module](https://pypi.org/project/dataclasses/) via
```
pip install dataclasses
```
If it shows Python 3.5 or lower, then you will need to upgrade your Python version (recommended Python 3.7 or higher).
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`.


2. download
Expand Down
3 changes: 1 addition & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: scadnano-test
channels:
- defaults
dependencies:
- python=3.7
- xlwt=1.3.0=py37_0
- python=3.9
- pip
- pip:
- sphinx
Expand Down
2 changes: 0 additions & 2 deletions examples/1_staple_1_helix_origami_roll.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import math

import scadnano as sc

def create_design() -> sc.Design:
Expand Down
24 changes: 24 additions & 0 deletions examples/2_staple_2_helix_helixgroup_geometry.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import scadnano as sc


def create_design() -> sc.Design:
group0 = sc.HelixGroup(grid=sc.square)
group1 = sc.HelixGroup(grid=sc.square, geometry=sc.Geometry(bases_per_turn=18),
position=sc.Position3D(0, 3, 0))
groups = {"group 0": group0, "group 1": group1}
helices = [sc.Helix(idx=idx, max_offset=40, group=group) for idx, group in
[(0, "group 0"), (1, "group 1")]]
design = sc.Design(helices=helices, groups=groups, strands=[])
design.draw_strand(0, 0).move(40)
design.draw_strand(0, 40).move(-40)
design.draw_strand(1, 0).move(40)
design.draw_strand(1, 40).move(-40)

return design


if __name__ == '__main__':
d = create_design()
d.write_scadnano_file(directory='output_designs')
d.from_scadnano_file('output_designs/2_staple_2_helix_helixgroup_geometry.sc')
print(f'design: {d.to_json()}')
2 changes: 1 addition & 1 deletion examples/idt-plates-explicit.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ 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)
design.write_idt_plate_excel_file(directory='idt', use_default_plates=False, only_strands_with_vendor_fields=True)


if __name__ == '__main__':
Expand Down
46 changes: 46 additions & 0 deletions examples/output_designs/2_staple_2_helix_helixgroup_geometry.sc
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"version": "0.19.5",
"groups": {
"group 0": {
"position": {"x": 0, "y": 0, "z": 0},
"grid": "square"
},
"group 1": {
"position": {"x": 0, "y": 3, "z": 0},
"grid": "square",
"geometry": {
"bases_per_turn": 18
}
}
},
"helices": [
{"group": "group 0", "grid_position": [0, 0]},
{"group": "group 1", "grid_position": [0, 0]}
],
"strands": [
{
"color": "#f74308",
"domains": [
{"helix": 0, "forward": true, "start": 0, "end": 40}
]
},
{
"color": "#57bb00",
"domains": [
{"helix": 0, "forward": false, "start": 0, "end": 40}
]
},
{
"color": "#888888",
"domains": [
{"helix": 1, "forward": true, "start": 0, "end": 40}
]
},
{
"color": "#32b86c",
"domains": [
{"helix": 1, "forward": false, "start": 0, "end": 40}
]
}
]
}
Loading
Loading