From fb249d8181dff1b9fe81b6d52953f39a7540e2d5 Mon Sep 17 00:00:00 2001 From: David Doty Date: Thu, 14 Jan 2021 12:19:55 -0800 Subject: [PATCH 1/5] bumped version to 0.15.1 --- scadnano/scadnano.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scadnano/scadnano.py b/scadnano/scadnano.py index b12d7e83..cca72207 100644 --- a/scadnano/scadnano.py +++ b/scadnano/scadnano.py @@ -50,7 +50,7 @@ # commented out for now to support Py3.6, which does not support this feature # from __future__ import annotations -__version__ = "0.15.0" # version line; WARNING: do not remove or change this line or comment +__version__ = "0.15.1" # version line; WARNING: do not remove or change this line or comment import dataclasses from abc import abstractmethod, ABC, ABCMeta From 6ce55c277c956efbf280ba770f67ff7670afaef1 Mon Sep 17 00:00:00 2001 From: David Doty Date: Thu, 14 Jan 2021 18:42:00 -0800 Subject: [PATCH 2/5] added to README note clarifying difference between scadnano and cadnano, and table of contents --- README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fa7360d3..12daf9f3 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ The scadnano Python package ([source code repository here](https://github.com/UC-Davis-molecular-computing/scadnano-python-package)) is a library for programmatically creating and editing these nanostructures. +The scadnano project is developed and maintained by the UC Davis Molecular Computing group. +Note that [cadnano](https://cadnano.org) is a separate project, developed and maintained by the [Douglas lab](https://bionano.ucsf.edu/) at UCSF. If you find scadnano useful in a scientific project, please cite its associated paper: @@ -16,6 +18,18 @@ If you find scadnano useful in a scientific project, please cite its associated [ [paper](https://doi.org/10.4230/LIPIcs.DNA.2020.9) | [BibTeX](https://web.cs.ucdavis.edu/~doty/papers/scadnano.bib) ] +## Table of contents + +* [Overview](#overview) +* [Reporting issues](#reporting-issues) +* [Installation](#installation) +* [Example](#example) +* [Abbreviated syntax with chained methods](#abbreviated-syntax-with-chained-methods) +* [Tutorial](#tutorial) +* [API documentation](#api-documentation) +* [Other examples](#other-examples) +* [Contributing](#contributing) + ## Overview This package is used to write Python scripts outputting `.sc` files readable by [scadnano](https://scadnano.org), a web application useful for displaying and manually editing these structures. The purpose of this module is to help automate some of the task of creating DNA designs, as well as making large-scale changes to them that are easier to describe programmatically than to do by hand in the scadnano web interface. @@ -199,7 +213,7 @@ if __name__ == '__main__': Running the code above produces a `.sc` file that, if loaded into scadnano, should appear as in the screenshot above. The [web interface README](https://github.com/UC-Davis-molecular-computing/scadnano/blob/master/README.md#terminology) explains many of the terms used in the code (domain, helix, loopout, insertion, etc.). -## abbreviated syntax with chained methods +## Abbreviated syntax with chained methods Instead of explicitly creating variables and objects representing each domain in each strand, there is a shorter syntax using chained method calls. Instead of the above, create only the helices first, then create the Design. Then strands can be added using a shorter syntax, to describe how to draw the strand starting at the 5' end and moving to the 3' end. The following is a modified version of the above script using these chained methods ```python From cb09bfadc2352be0418ac57c925a6f6728b6008e Mon Sep 17 00:00:00 2001 From: David Doty Date: Thu, 14 Jan 2021 18:42:14 -0800 Subject: [PATCH 3/5] added to API documentation note clarifying difference between scadnano and cadnano --- scadnano/scadnano.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scadnano/scadnano.py b/scadnano/scadnano.py index cca72207..de014773 100644 --- a/scadnano/scadnano.py +++ b/scadnano/scadnano.py @@ -2,7 +2,11 @@ The :mod:`scadnano` Python module is a library for describing synthetic DNA nanostructures (e.g., DNA origami). Installation instructions are at the -`GitHub repository `_. +`GitHub repository `_. + +The scadnano project is developed and maintained by the UC Davis Molecular Computing group. +Note that `cadnano `_ is a separate project, +developed and maintained by the `Douglas lab `_ at UCSF. This module is used to write Python scripts creating files readable by `scadnano `_, a web application useful for displaying @@ -2493,7 +2497,7 @@ class Strand(_JSONSerializable, Generic[StrandLabel, DomainLabel]): scaffold_strand.set_scaffold() Both will give the strand the same color that - `cadnano `_ + `cadnano `_ uses for the scaffold. """ From bed7b3c40807d786e6bc7c2c7fad3f9ebee85e7a Mon Sep 17 00:00:00 2001 From: David Doty Date: Thu, 14 Jan 2021 18:42:22 -0800 Subject: [PATCH 4/5] Update tutorial.md --- tutorial/tutorial.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorial/tutorial.md b/tutorial/tutorial.md index c05d6da6..59c10391 100644 --- a/tutorial/tutorial.md +++ b/tutorial/tutorial.md @@ -220,7 +220,7 @@ We do this by creating a "precursor" design, which is not the final design, and The scaffold is a good starting point. It is one long strand, but we won't specify it as such. Instead, we will specify it by drawing one strand on each helix, spanning the full length, and then modifying these strands with crossovers, eventually joining them into one long strand. -We can use the function [Design.strand](https://scadnano-python-package.readthedocs.io/en/latest/#scadnano.Design.strand) to draw strands. It takes two integer arguments: a helix and an offset, and uses "chained method calls" to give a short syntax for specifying strands. In this case, depending on the helix, we either want the strand (in order from 5' end to 3' end) to start at offset 0 and move forward (right) 288, or start at offset 288 and move in reverse by 288 (i.e., move by -288). The bottommost helix, 23, is an exception, where we want the "nick" to be, so we actually want to draw two strands, with a break between them at the halfway point 144: +We can use the function [Design.strand](https://scadnano-python-package.readthedocs.io/en/latest/#scadnano.Design.strand) to draw strands. It takes two integer arguments: a helix and an offset, and uses "chained method calls" to give a short syntax for specifying strands. In this case, depending on the helix, we either want the strand (in order from 5' end to 3' end) to start at offset 0 and move forward (right) by 288, or start at offset 288 and move in reverse by 288 (i.e., move by -288). The bottommost helix, 23, is an exception, where we want the "nick" to be, so we actually want to draw two strands, with a break between them at the halfway point 144: ```python @@ -554,7 +554,7 @@ Finally, you will want to export the DNA sequences of the staples. One way to do ```python for strand in design.strands: - if strand != design.scaffold: + if not strand.is_scaffold: print(strand.dna_sequence) ``` From 05e76b95c845f59a2ab23960ec525002ced5b354 Mon Sep 17 00:00:00 2001 From: David Doty Date: Fri, 15 Jan 2021 08:45:35 -0800 Subject: [PATCH 5/5] updated API docs to link from assign_m13_to_scaffold method to M13Variant enumerated type --- scadnano/scadnano.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scadnano/scadnano.py b/scadnano/scadnano.py index de014773..25641192 100644 --- a/scadnano/scadnano.py +++ b/scadnano/scadnano.py @@ -413,11 +413,11 @@ class M13Variant(enum.Enum): p7249 = "p7249" """"Standard" variant of M13mp18; 7249 bases long, available from, for example + https://www.tilibit.com/collections/scaffold-dna/products/single-stranded-scaffold-dna-type-p7249 + https://www.neb.com/products/n4040-m13mp18-single-stranded-dna http://www.bayoubiolabs.com/biochemicat/vectors/pUCM13/ - - https://www.tilibit.com/collections/scaffold-dna/products/single-stranded-scaffold-dna-type-p7249 """ p7560 = "p7560" @@ -443,9 +443,9 @@ def m13(rotation: int = 5587, variant: M13Variant = M13Variant.p7249) -> str: `GenBank `_. By default, returns the "standard" variant of consisting of 7249 bases, sold by companies such as - `New England Biolabs `_ - and `Tilibit `_. + and + `New England Biolabs `_ The actual M13 DNA strand itself is circular, so assigning this sequence to the scaffold :any:`Strand` in a :any:`Design` @@ -4346,7 +4346,8 @@ def strand(self, helix: int, offset: int) -> StrandBuilder: return StrandBuilder(self, helix, offset) def assign_m13_to_scaffold(self, rotation: int = 5587, variant: M13Variant = M13Variant.p7249) -> None: - """Assigns the scaffold to be the sequence of M13: :py:func:`m13` with the given `rotation`. + """Assigns the scaffold to be the sequence of M13: :py:func:`m13` with the given `rotation` + and :any:`M13Variant`. Raises :any:`IllegalDesignError` if the number of scaffolds is not exactly 1. """