mirror of
https://github.com/biopython/biopython.git
synced 2025-10-20 13:43:47 +08:00
Update Restriction.py
This commit is contained in:
committed by
Peter Cock
parent
650d3af421
commit
2149300fea
@ -119,7 +119,9 @@ DNA = Seq
|
||||
def _make_FormattedSeq_table() -> bytes:
|
||||
table = bytearray(256)
|
||||
upper_to_lower = ord("A") - ord("a")
|
||||
for c in b"ABCDEFGHIJKLMNOPQRSTUVWXYZ": # Only allow alphabetic characters
|
||||
# Only allow alphabetic characters
|
||||
# (although only ACGT are used for finding restriction sites)
|
||||
for c in b"ABCDEFGHIJKLMNOPQRSTUVWXYZ":
|
||||
table[c] = c # map uppercase to uppercase
|
||||
table[c - upper_to_lower] = c # map lowercase to uppercase
|
||||
return bytes(table)
|
||||
|
Reference in New Issue
Block a user