Skip to content

Commit 4ed9cec

Browse files
committed
changed name of wc function to rc
1 parent a7a097c commit 4ed9cec

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

examples/16_helix_origami_barrel_from_algoSST_paper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def add_angle_inducing_insertions_deletions(design) -> None:
234234
# above is in order from right to left on helix 1, followed by left to right on helix 18
235235

236236
def assign_dna_to_unzipper_toeholds(design: sc.Design) -> None:
237-
uz_toes = [sc.wc(seq) for seq in uz_toes_wc]
237+
uz_toes = [sc.rc(seq) for seq in uz_toes_wc]
238238

239239
strands_h1 = design.strands_starting_on_helix(1)
240240
strands_h1.sort(key=lambda _strand: _strand.first_domain().offset_5p())

scadnano/scadnano.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2821,18 +2821,18 @@ def _add_key_value_to_json_map_if_not_default(
28212821
# Default Extension object to allow for access to default extension values. num_bases is a dummy.
28222822
_default_extension: Extension = Extension(num_bases=5)
28232823

2824-
_wctable = str.maketrans('ACGTacgt', 'TGCAtgca')
2824+
_rctable = str.maketrans('ACGTacgt', 'TGCAtgca')
28252825

28262826

2827-
def wc(seq: str) -> str:
2827+
def rc(seq: str) -> str:
28282828
"""
2829-
Return reverse Watson-Crick complement of `seq`.
2829+
Return reverse complement of `seq`.
28302830
For example, ``wc('AACCTG')`` returns ``'CAGGTT'``.
28312831
28322832
:param seq: a DNA sequence
2833-
:return: reverse Watson-Crick complement of `seq`.
2833+
:return: reverse complement of `seq`.
28342834
"""
2835-
return seq.translate(_wctable)[::-1]
2835+
return seq.translate(_rctable)[::-1]
28362836

28372837

28382838
@dataclass
@@ -4279,7 +4279,7 @@ def assign_dna_complement_from(self, other: Strand) -> None:
42794279
other_seq = domain_other.dna_sequence_in(overlap_left, overlap_right - 1)
42804280
if other_seq is None:
42814281
raise ValueError(f'no DNA sequence has been assigned to strand {other}')
4282-
overlap_complement = wc(other_seq)
4282+
overlap_complement = rc(other_seq)
42834283
domain_complement_builder.append(wildcards)
42844284
domain_complement_builder.append(overlap_complement)
42854285
start_idx = overlap_right
@@ -7959,7 +7959,7 @@ def to_oxview_json(self, warn_duplicate_strand_names: bool = True,
79597959
(sc_strand2.dna_sequence is not None) and
79607960
(sc_strand1.dna_sequence[d1] != DNA_base_wildcard) and
79617961
(sc_strand2.dna_sequence[d2] != DNA_base_wildcard) and
7962-
(wc(sc_strand1.dna_sequence[d1]) != sc_strand2.dna_sequence[d2])):
7962+
(rc(sc_strand1.dna_sequence[d1]) != sc_strand2.dna_sequence[d2])):
79637963
continue
79647964

79657965
oxv_strand1['monomers'][d1]['bp'] = s2_nuc_idx + d2

0 commit comments

Comments
 (0)