Skip to content

Commit

Permalink
Merge pull request #105 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 9, 2020
2 parents c3739f1 + 85d0f9d commit abf52d5
Show file tree
Hide file tree
Showing 7 changed files with 7,242 additions and 226 deletions.
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @dave-doty
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ If you find scadnano useful in a scientific project, please cite its associated

> <ins>scadnano: A browser-based, scriptable tool for designing DNA nanostructures</ins>.
David Doty, Benjamin L Lee, and Tristan Stérin.
DNA 2020: *Proceedings of the 26th International Conference on DNA Computing and Molecular Programming*
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 @@ -58,13 +58,12 @@ 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):
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...)

* *required*: [scadnano.py](https://raw.githubusercontent.com/UC-Davis-molecular-computing/scadnano-python-package/master/scadnano/scadnano.py)
* *optional*: [modifications.py](https://raw.githubusercontent.com/UC-Davis-molecular-computing/scadnano-python-package/master/scadnano/modifications.py); This contains some common DNA modifications such as biotin and Cy3.
* *optional*: [origami_rectangle.py](https://raw.githubusercontent.com/UC-Davis-molecular-computing/scadnano-python-package/master/scadnano/origami_rectangle.py); This can help create origami rectangles, but it is not necessary to use scadnano.
* *optional*: [_version.py](https://raw.githubusercontent.com/UC-Davis-molecular-computing/scadnano-python-package/master/scadnano/_version.py) This ensures that the current version number is written into any `.dna` files written by the library; otherwise it may be out of date. (Which should not matter for the most part.)
* *required*: [scadnano.py](scadnano/scadnano.py)
* *optional*: [modifications.py](scadnano/modifications.py); This contains some common DNA modifications such as biotin and Cy3.
* *optional*: [origami_rectangle.py](scadnano/origami_rectangle.py); This can help create origami rectangles, but it is not necessary to use scadnano.
* *optional*: [_version.py](scadnano/_version.py) This ensures that the current version number is written into any `.dna` files written by the library; otherwise it may be out of date. (Which should not matter for the most part.)
The scadnano package uses the Python package [xlwt](https://pypi.org/project/xlwt/) to write Excel files, so in order to call the method [`DNADesign.write_idt_plate_excel_file()`](https://scadnano-python-package.readthedocs.io/#scadnano.DNADesign.write_idt_plate_excel_file) to export an Excel file with DNA sequences, xlwt must be installed. To install, type `pip install xlwt` at the command line.

Expand Down Expand Up @@ -161,7 +160,7 @@ def main():
design.add_insertion(helix=0, offset=26, length=2)

# also assigns complement to strands other than scaf bound to it
design.assign_dna(scaf, 'AACGT' * 18)
design.assign_dna(design.scaffold, 'AACGT' * 18)

return design

Expand Down
217 changes: 0 additions & 217 deletions doc/requirements.txt

This file was deleted.

7,216 changes: 7,216 additions & 0 deletions examples/output_designs/very_large_origami.dna

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions examples/very_large_origami.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import origami_rectangle as rect
import scadnano as sc


def main():
# this is a very large origami (taking ~25,000 bases). It is useful for testing the performance of
# rendering code, since at the time it was created, it is very janky to update, particularly for
# things that edit strands such as adding a strand or adding a nick in a strand
design = rect.create(num_helices=40, num_cols=40)
return design


if not sc.in_browser() and __name__ == '__main__':
design = main()
design.write_scadnano_file(directory='output_designs')
2 changes: 2 additions & 0 deletions scadnano/origami_rectangle.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ def create(*, num_helices: int, num_cols: int, assign_seq: bool = True, seam_lef
f'greater than the 7249 available in standard M13.')
if seam_left_column < 0:
seam_left_column = num_cols // 2 - 1
if seam_left_column % 2 == 1:
seam_left_column += 1
if seam_left_column % 2 == 1:
raise ValueError(f'seam_left_column must be even but is {seam_left_column}')

Expand Down
2 changes: 1 addition & 1 deletion scadnano/scadnano.py
Original file line number Diff line number Diff line change
Expand Up @@ -2741,7 +2741,7 @@ class Geometry(_JSONSerializable):
"""Parameters controlling some geometric visualization/physical aspects of Design."""

rise_per_base_pair: float = 0.332
"""The distance in nanometers between two adjacent base pairs along the length of a DNA double helix."""
"""Distance in nanometers between two adjacent base pairs along the length of a DNA double helix."""

helix_radius: float = 1.0
"""Radius of a DNA helix in nanometers."""
Expand Down

0 comments on commit abf52d5

Please sign in to comment.