Skip to content

Commit

Permalink
closes #216 (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
manulera committed Apr 25, 2024
1 parent 989e76e commit 25fc9f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pydna/crispr.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ class _cas(ABC):
def __init__(self, protospacer):
self.protospacer = protospacer.upper()
self.compsite = re.compile(
f"(?=(?P<watson>{protospacer}{self.pam}))|(?=(?P<crick>{rc(self.pam)}{rc(protospacer)}))", re.UNICODE
f"(?=(?P<watson>{self.protospacer}{self.pam}))|(?=(?P<crick>{rc(self.pam)}{rc(self.protospacer)}))",
re.UNICODE,
)

@abstractmethod
Expand Down
2 changes: 2 additions & 0 deletions tests/test_module_crispr.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ def test_crispr():
a.rc(),
]

assert target.cut(cas9("GTTACTTTACCCGACGTCCC")) == target.cut(cas9("GTTACTTTACCCGACGTCCC".lower()))


if __name__ == "__main__":
pytest.main([__file__, "-vv", "-s"])

0 comments on commit 25fc9f5

Please sign in to comment.