Skip to content

Commit

Permalink
added strand() method to class Extension to get parent strand
Browse files Browse the repository at this point in the history
  • Loading branch information
dave-doty committed Dec 20, 2023
1 parent 999c493 commit 5a590ea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scadnano/scadnano.py
Original file line number Diff line number Diff line change
Expand Up @@ -2716,6 +2716,14 @@ def dna_length(self) -> int:
"""Length of this :any:`Extension`; same as field :data:`Extension.num_bases`."""
return self.num_bases

def strand(self) -> Strand:
"""
:return: The :any:`Strand` that contains this :any:`Extension`.
"""
if self._parent_strand is None:
raise ValueError('_parent_strand has not yet been set')
return self._parent_strand

def vendor_dna_sequence(self) -> Optional[str]:
"""
:return:
Expand Down

0 comments on commit 5a590ea

Please sign in to comment.