Skip to content

Commit

Permalink
closes #216 (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
manulera authored and BjornFJohansson committed May 8, 2024
1 parent 62de1dd commit d1b52d5
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 @@ -42,6 +42,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 d1b52d5

Please sign in to comment.