Skip to content

Commit

Permalink
removed several docstring references to deprecated method `Design.str…
Browse files Browse the repository at this point in the history
…and`
  • Loading branch information
dave-doty committed Mar 6, 2022
1 parent 11702b2 commit 4f8c28c
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions scadnano/scadnano.py
Original file line number Diff line number Diff line change
Expand Up @@ -862,8 +862,8 @@ class Modification(_JSONSerializable, ABC):
.. code-block:: python
biotin_5p = Modification5Prime(display_text='B', idt_text='/5Biosg/')
design.strand(0, 0).move(8).with_modification_5p(biotin_5p)
design.strand(1, 0).move(8).with_modification_5p(biotin_5p)
design.draw_strand(0, 0).move(8).with_modification_5p(biotin_5p)
design.draw_strand(1, 0).move(8).with_modification_5p(biotin_5p)
"""

display_text: str
Expand Down Expand Up @@ -931,8 +931,8 @@ class Modification5Prime(Modification):
.. code-block:: python
biotin_5p = Modification5Prime(display_text='B', idt_text='/5Biosg/')
design.strand(0, 0).move(8).with_modification_5p(biotin_5p)
design.strand(1, 0).move(8).with_modification_5p(biotin_5p)
design.draw_strand(0, 0).move(8).with_modification_5p(biotin_5p)
design.draw_strand(1, 0).move(8).with_modification_5p(biotin_5p)
"""

def to_json_serializable(self, suppress_indent: bool = True, **kwargs: Any) -> Dict[str, Any]:
Expand Down Expand Up @@ -968,8 +968,8 @@ class Modification3Prime(Modification):
.. code-block:: python
biotin_3p = Modification3Prime(display_text='B', idt_text='/3Bio/')
design.strand(0, 0).move(8).with_modification_3p(biotin_3p)
design.strand(1, 0).move(8).with_modification_3p(biotin_3p)
design.draw_strand(0, 0).move(8).with_modification_3p(biotin_3p)
design.draw_strand(1, 0).move(8).with_modification_3p(biotin_3p)
"""

def to_json_serializable(self, suppress_indent: bool = True, **kwargs: Any) -> Dict[str, Any]:
Expand Down Expand Up @@ -1948,7 +1948,7 @@ class Loopout(_JSONSerializable, Generic[DomainLabel]):
import scadnano as sc
design = sc.Design(helices=[sc.Helix(max_offset=10)])
design.strand(0,0).move(10).loopout(0,5).move(-10)
design.draw_strand(0,0).move(10).loopout(0,5).move(-10)
"""

length: int
Expand Down Expand Up @@ -2150,7 +2150,7 @@ class StrandBuilder(Generic[StrandLabel, DomainLabel]):
.. code-block:: Python
design.strand(0, 0).to(10).cross(1).to(5).with_modification_5p(mod.biotin_5p).as_scaffold()
design.draw_strand(0, 0).to(10).cross(1).to(5).with_modification_5p(mod.biotin_5p).as_scaffold()
:any:`StrandBuilder` should generally not be created directly.
Although it is convenient to use chained method calls, it is also sometimes useful to assign the
Expand All @@ -2159,7 +2159,7 @@ class StrandBuilder(Generic[StrandLabel, DomainLabel]):
.. code-block:: Python
strand_builder = design.strand(0, 0)
strand_builder = design.draw_strand(0, 0)
strand_builder.to(10)
strand_builder.cross(1)
strand_builder.to(5)
Expand Down Expand Up @@ -2456,7 +2456,7 @@ def with_sequence(self, sequence: str, assign_complement: bool = True) \
.. code-block:: Python
design.strand(0, 0).to(10).cross(1).to(5).with_sequence('AAAAAAAAAACGCGC')
design.draw_strand(0, 0).to(10).cross(1).to(5).with_sequence('AAAAAAAAAACGCGC')
:param sequence: the DNA sequence to assign to the :any:`Strand`
:param assign_complement: whether to automatically assign the complement to existing :any:`Strand`'s
Expand All @@ -2483,7 +2483,7 @@ def with_domain_sequence(self, sequence: str, assign_complement: bool = True) \
.. code-block:: Python
design.strand(0, 5).to(8).with_domain_sequence('AAA')\\
design.draw_strand(0, 5).to(8).with_domain_sequence('AAA')\\
.cross(1).to(5).with_domain_sequence('TTT')\\
.loopout(2, 4).with_domain_sequence('CCCC')\\
.to(10).with_domain_sequence('GGGGG')
Expand All @@ -2508,7 +2508,7 @@ def with_name(self, name: str) -> 'StrandBuilder[StrandLabel, DomainLabel]':
.. code-block:: Python
design.strand(0, 0).to(10).cross(1).to(5).with_name('scaffold')
design.draw_strand(0, 0).to(10).cross(1).to(5).with_name('scaffold')
:param name: name to assign to the :any:`Strand`
:return: self
Expand All @@ -2525,7 +2525,7 @@ def with_label(self, label: StrandLabel) -> 'StrandBuilder[StrandLabel, DomainLa
.. code-block:: Python
design.strand(0, 0).to(10).cross(1).to(5).with_label('scaffold')
design.draw_strand(0, 0).to(10).cross(1).to(5).with_label('scaffold')
:param label: label to assign to the :any:`Strand`
:return: self
Expand All @@ -2548,7 +2548,7 @@ def with_domain_name(self, name: str) -> 'StrandBuilder[StrandLabel, DomainLabel
.. code-block:: Python
design.strand(0, 0).to(10).with_domain_name('dom1*').cross(1).to(5).with_domain_name('dom1')
design.draw_strand(0, 0).to(10).with_domain_name('dom1*').cross(1).to(5).with_domain_name('dom1')
:param name: name to assign to the most recently created :any:`Domain` or :any:`Loopout`
:return: self
Expand All @@ -2572,7 +2572,7 @@ def with_domain_label(self, label: DomainLabel) -> 'StrandBuilder[StrandLabel, D
.. code-block:: Python
design.strand(0, 5).to(8).with_domain_label('domain 1')\\
design.draw_strand(0, 5).to(8).with_domain_label('domain 1')\\
.cross(1).to(5).with_domain_label('domain 2')\\
.loopout(2, 4).with_domain_label('domain 3')\\
.to(10).with_domain_label('domain 4')
Expand Down Expand Up @@ -3925,7 +3925,7 @@ def __init__(self, *,
grid_for_group = group.grid
group.helices_view_order = _check_helices_view_order_and_return(helices_view_order_for_group,
helix_idxs_in_group)

if grid_for_group is None:
raise AssertionError()
group.grid = grid_for_group
Expand Down Expand Up @@ -4394,7 +4394,7 @@ def idx_of(helix: Helix, order: int) -> int:

for idx, helix in helices.items():
helix.idx = idx

return helices

@staticmethod
Expand Down Expand Up @@ -4788,7 +4788,6 @@ def _plate_map_markdown(self, plate_name: str, strands_in_plate: List[Strand],
for strand in strands_in_plate:
well_to_strand[strand.idt.well] = strand


num_rows = len(plate_type.rows())
num_cols = len(plate_type.cols())
header = [' '] + [str(col) for col in plate_type.cols()]
Expand Down Expand Up @@ -4896,7 +4895,7 @@ def draw_strand(self, helix: int, offset: int) -> StrandBuilder:
]))
Each call to
:py:meth:`Design.strand`,
:py:meth:`Design.draw_strand`,
:py:meth:`StrandBuilder.cross`,
:py:meth:`StrandBuilder.loopout`,
:py:meth:`StrandBuilder.to`
Expand Down

0 comments on commit 4f8c28c

Please sign in to comment.