Skip to content

Commit

Permalink
Merge pull request #112 from UC-Davis-molecular-computing/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
dave-doty authored Jul 11, 2020
2 parents 7b1161b + 054a8bf commit 87997c0
Show file tree
Hide file tree
Showing 61 changed files with 1,802 additions and 139 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ __pycache__/
tests_outputs/
.vscode/
dist/
.mypy_cache/
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The scadnano Python module is a library for describing synthetic DNA nanostructu

If you find scadnano useful in a scientific project, please cite its associated paper:

> <ins>scadnano: A browser-based, scriptable tool for designing DNA nanostructures</ins>.
> scadnano: A browser-based, scriptable tool for designing DNA nanostructures.
David Doty, Benjamin L Lee, and Tristan Stérin.
DNA 2020: *Proceedings of the 26th International Conference on DNA Computing and Molecular Programming*
[ [paper](https://arxiv.org/abs/2005.11841) | [BibTeX](https://web.cs.ucdavis.edu/~doty/papers/scadnano.bib) ]
Expand Down Expand Up @@ -37,9 +37,17 @@ Please report issues in the web interface at the [scadnano web interface GitHub

## Installation

The scadnano Python package requires Python version 3.7 or later. If you do not have that version (or later) of Python installed, follow [this link](https://www.python.org/downloads/) to install it.
The scadnano Python package requires Python version 3.7 or later. If you do not have that version (or later) of Python installed, follow [this link](https://www.python.org/downloads/) to install it.

Once Python is installed, there are two ways you can install the scadnano Python package:
If you are using Python 3.6 and do not wish to upgrade, with some effort you can install a package that give the required features.
The Python 3.7 module that is not present in 3.6 is the
[dataclasses](https://docs.python.org/3/library/dataclasses.html) module.
You can install a backported library for it:
[dataclasses backport](https://pypi.org/project/dataclasses/) (this library appears to require at least Python version 3.6)

Furthermore, the [typing](https://docs.python.org/3/library/typing.html) module was present in Python 3.5, but scadnano requires at least version Python 3.6.2.

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:


1. pip (recommended)
Expand All @@ -58,7 +66,9 @@ Once Python is installed, there are two ways you can install the scadnano Python

2. download

As a simple alternative (in case you run into trouble using pip), you can download and place the following files (located in the [scadnano/](https://github.com/UC-Davis-molecular-computing/scadnano-python-package/tree/master/scadnano) subfolder) in your PYTHONPATH (e.g., in the same directory as the scripts you are running). To download them, right-click on "Raw" near the top and select (in Chrome or Firefox) "Save link as...)
*Note:* If you are reading this on the PyPI website, the links below won't work. They are relative links intended to be read on the [GitHub README page](https://github.com/UC-Davis-molecular-computing/scadnano-python-package#readme).

As a simple alternative (in case you run into trouble using pip), you can download and place the following files (located in the [scadnano/](scadnano) subfolder) in your PYTHONPATH (e.g., in the same directory as the scripts you are running). To download them, right-click on "Raw" near the top and select (in Chrome or Firefox) "Save link as...".

* *required*: [scadnano.py](scadnano/scadnano.py)
* *optional*: [modifications.py](scadnano/modifications.py); This contains some common DNA modifications such as biotin and Cy3.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def main():
scaf = sc.Strand(domains=[scaf_ss1_left, scaf_ss0, loopout, scaf_ss1_right], is_scaffold=True)

# geometry
geometry = sc.Geometry(z_step=0.2, helix_radius=1.2, inter_helix_gap=1.0)
geometry = sc.Geometry(rise_per_base_pair=0.2, helix_radius=1.2, inter_helix_gap=1.0)

# whole design
design = sc.DNADesign(helices=helices, strands=[scaf, stap_left, stap_right], grid=sc.square,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{
Expand Down
2 changes: 1 addition & 1 deletion examples/output_designs/16_helix_origami_rectangle.dna
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{"max_offset": 448, "grid_position": [0, 0]},
Expand Down
2 changes: 1 addition & 1 deletion examples/output_designs/16_helix_origami_rectangle_idt.dna
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{"max_offset": 448, "grid_position": [0, 0]},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{"max_offset": 448, "grid_position": [0, 0]},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{"max_offset": 448, "grid_position": [0, 0]},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{"max_offset": 448, "grid_position": [0, 0]},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{"max_offset": 448, "grid_position": [0, 0]},
Expand Down
2 changes: 1 addition & 1 deletion examples/output_designs/1_staple_1_helix_origami.dna
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{"grid_position": [0, 0]}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{
Expand Down
2 changes: 1 addition & 1 deletion examples/output_designs/1_staple_1_helix_origami_roll.dna
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{"grid_position": [0, 0], "roll": 90}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{"max_offset": 304, "grid_position": [0, 0]},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{"grid_position": [0, 0]},
Expand Down
38 changes: 19 additions & 19 deletions examples/output_designs/2_staple_2_helix_modifications.dna
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{"grid_position": [0, 0]},
{"grid_position": [0, 1]}
],
"modifications_in_design": {
"/5Cy5/": {
"/iCy5/": {
"display_text": "Cy5",
"idt_text": "/5Cy5/",
"idt_text": "/iCy5/",
"display_connector": false,
"location": "5'"
"location": "internal"
},
"/3Bio/": {
"/5Biosg/": {
"display_text": "B",
"idt_text": "/3Bio/",
"idt_text": "/5Biosg/",
"display_connector": false,
"location": "3'"
"location": "5'"
},
"/5Cy5/": {
"display_text": "Cy5",
"idt_text": "/5Cy5/",
"display_connector": false,
"location": "5'"
},
"/iBiodT/": {
"display_text": "B",
Expand All @@ -25,18 +31,6 @@
"location": "internal",
"allowed_bases": ["T"]
},
"/iCy5/": {
"display_text": "Cy5",
"idt_text": "/iCy5/",
"display_connector": false,
"location": "internal"
},
"/5Biosg/": {
"display_text": "B",
"idt_text": "/5Biosg/",
"display_connector": false,
"location": "5'"
},
"/iCy3/": {
"display_text": "Cy3",
"idt_text": "/iCy3/",
Expand All @@ -48,6 +42,12 @@
"idt_text": "/3Cy3Sp/",
"display_connector": false,
"location": "3'"
},
"/3Bio/": {
"display_text": "B",
"idt_text": "/3Bio/",
"display_connector": false,
"location": "3'"
}
},
"strands": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{"grid_position": [0, 0]},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{"grid_position": [0, 0]},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{"max_offset": 48, "grid_position": [0, 0]},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{"max_offset": 48, "grid_position": [0, 0]},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{"max_offset": 48, "grid_position": [0, 0]},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{"max_offset": 48, "grid_position": [0, 0]},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"geometry": {
"z_step": 0.2,
"rise_per_base_pair": 0.2,
"helix_radius": 1.2,
"inter_helix_gap": 1.0
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{"grid_position": [0, 0]},
Expand Down
2 changes: 1 addition & 1 deletion examples/output_designs/3_helix_deletions_insertions.dna
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{"max_offset": 64, "grid_position": [0, 0]},
Expand Down
2 changes: 1 addition & 1 deletion examples/output_designs/4_helix_grid_none.dna
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "none",
"helices": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "none",
"helices": [
{
Expand Down
2 changes: 1 addition & 1 deletion examples/output_designs/4_helix_min_offsets_nonzero.dna
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{"max_offset": 30, "grid_position": [0, 0]},
Expand Down
2 changes: 1 addition & 1 deletion examples/output_designs/56_helix_origami_rectangle.dna
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{"max_offset": 160, "grid_position": [0, 0]},
Expand Down
2 changes: 1 addition & 1 deletion examples/output_designs/64_helix_origami_rectangle.dna
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{"max_offset": 128, "grid_position": [0, 0]},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{"grid_position": [0, 0]},
Expand Down
2 changes: 1 addition & 1 deletion examples/output_designs/6_helix_bundle_honeycomb.dna
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "honeycomb",
"helices": [
{"max_offset": 1295, "grid_position": [1, 1, 0]},
Expand Down
2 changes: 1 addition & 1 deletion examples/output_designs/6_helix_origami_rectangle.dna
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{"max_offset": 192, "grid_position": [0, 0]},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{"max_offset": 192, "grid_position": [0, 0]},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "e",
"helices": [
{"max_offset": 304, "grid_position": [0, -3]},
Expand Down
2 changes: 1 addition & 1 deletion examples/output_designs/empty.dna
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [],
"strands": []
Expand Down
2 changes: 1 addition & 1 deletion examples/output_designs/hairpin.dna
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "square",
"helices": [
{"grid_position": [0, 0]}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "none",
"helices": [
{"max_offset": 20, "grid_position": [0, 2], "idx": 2},
Expand Down
2 changes: 1 addition & 1 deletion examples/output_designs/hex_lattice_10x10.dna
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "hex",
"helices": [
{"max_offset": 16, "grid_position": [0, 0, 0]},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "hex",
"helices": [
{"max_offset": 16, "grid_position": [-4, -4, 0]},
Expand Down
2 changes: 1 addition & 1 deletion examples/output_designs/honeycomb_lattice_10x10.dna
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.1",
"version": "0.9.9",
"grid": "honeycomb",
"helices": [
{"max_offset": 16, "grid_position": [0, 0, 0]},
Expand Down
Loading

0 comments on commit 87997c0

Please sign in to comment.