From 25fc9f57622fe05527e5826eea956fc3aa3b8a20 Mon Sep 17 00:00:00 2001 From: Manuel Lera-Ramirez Date: Thu, 25 Apr 2024 15:17:47 +0100 Subject: [PATCH] closes #216 (2) --- src/pydna/crispr.py | 3 ++- tests/test_module_crispr.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pydna/crispr.py b/src/pydna/crispr.py index 28d21de3..b3a14ab1 100644 --- a/src/pydna/crispr.py +++ b/src/pydna/crispr.py @@ -29,7 +29,8 @@ class _cas(ABC): def __init__(self, protospacer): self.protospacer = protospacer.upper() self.compsite = re.compile( - f"(?=(?P{protospacer}{self.pam}))|(?=(?P{rc(self.pam)}{rc(protospacer)}))", re.UNICODE + f"(?=(?P{self.protospacer}{self.pam}))|(?=(?P{rc(self.pam)}{rc(self.protospacer)}))", + re.UNICODE, ) @abstractmethod diff --git a/tests/test_module_crispr.py b/tests/test_module_crispr.py index 62349323..af8c6408 100644 --- a/tests/test_module_crispr.py +++ b/tests/test_module_crispr.py @@ -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"])