Skip to content

Commit 424ac42

Browse files
committed
copilot feedback
1 parent a7e5617 commit 424ac42

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/pydna/gateway.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,28 +97,28 @@ def gateway_overlap(
9797
-------
9898
list[tuple[int, int, int]] A list of overlaps between the two sequences.
9999
"""
100-
type = "greedy" if greedy else "conservative"
101-
return recombinase_dict[reaction][type].overlap(seqx, seqy)
100+
mode = "greedy" if greedy else "conservative"
101+
return recombinase_dict[reaction][mode].overlap(seqx, seqy)
102102

103103

104104
def find_gateway_sites(
105105
seq: Dseqrecord, greedy: bool
106106
) -> dict[str, list[SimpleLocation]]:
107107
"""Find all gateway sites in a sequence and return a dictionary with the name and positions of the sites."""
108108

109-
type = "greedy" if greedy else "conservative"
109+
mode = "greedy" if greedy else "conservative"
110110
collection = RecombinaseCollection(
111-
recombinase_dict["BP"][type].recombinases
112-
+ recombinase_dict["LR"][type].recombinases
111+
recombinase_dict["BP"][mode].recombinases
112+
+ recombinase_dict["LR"][mode].recombinases
113113
)
114114
return collection.find(seq)
115115

116116

117117
def annotate_gateway_sites(seq: Dseqrecord, greedy: bool) -> Dseqrecord:
118118
"""Annotate gateway sites in a sequence."""
119-
type = "greedy" if greedy else "conservative"
119+
mode = "greedy" if greedy else "conservative"
120120
collection = RecombinaseCollection(
121-
recombinase_dict["BP"][type].recombinases
122-
+ recombinase_dict["LR"][type].recombinases
121+
recombinase_dict["BP"][mode].recombinases
122+
+ recombinase_dict["LR"][mode].recombinases
123123
)
124124
return collection.annotate(seq)

src/pydna/recombinase.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,12 +331,12 @@ def annotate(self, seq: Dseqrecord) -> Dseqrecord:
331331
Parameters
332332
----------
333333
seq : Dseqrecord
334-
Sequence to annotate (modified in place and returned).
334+
Sequence to annotate.
335335
336336
Returns
337337
-------
338338
Dseqrecord
339-
The same sequence with added features.
339+
A copy of the sequence with added features.
340340
"""
341341
out_seq = copy.deepcopy(seq)
342342
sites = self.find(out_seq)

0 commit comments

Comments
 (0)