Skip to content

Commit

Permalink
Merge pull request #26 from UC-Davis-molecular-computing/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
dave-doty authored Feb 25, 2020
2 parents a53de48 + 73db806 commit b3bc36f
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions scadnano/scadnano.py
Original file line number Diff line number Diff line change
Expand Up @@ -1271,22 +1271,29 @@ class Strand(_JSONSerializable):
Two :any:`Loopout`'s cannot occur consecutively on a :any:`Strand`, nor can a :any:`Strand`
contain only a :any:`Loopout` but no :any:`Substrand`.
To give a strand the same color that
`cadnano <https://cadnano.org/>`_
uses for the scaffold,
use :any:`scadnano.default_scaffold_color` in the :any:`Strand` constructor:
One can set the strand to be a scaffold in the constructor:
.. code-block:: Python
import scadnano as sc
scaffold_substrands = [ ... ]
scaffold_strand = sc.Strand(substrands=scaffold_substrands, is_scaffold=True)
or by calling :py:meth:`Strand.set_scaffold` on the :any:`Strand` object:
.. code-block:: Python
import scadnano as sc
scaffold_substrands = [ ... ]
scaffold_strand = sc.Strand(substrands=scaffold_substrands, color=sc.default_scaffold_color)
scaffold_strand = sc.Strand(substrands=scaffold_substrands)
scaffold_strand.set_scaffold()
Alternately, one can use :any:`DNAOrigamiDesign`, which is a subclass of
:any:`DNADesign` that has one extra field representing the scaffold strand.
This class will automatically assign the color of the scaffold strand to be
:py:data:`default_scaffold_color`.
Both will give the strand the same color that
`cadnano <https://cadnano.org/>`_
uses for the scaffold.
"""

substrands: List[Union[Substrand, Loopout]]
Expand Down

0 comments on commit b3bc36f

Please sign in to comment.