diff --git a/crisprbact/off_target.py b/crisprbact/off_target.py index eb5ed88f8b5c68d029dc40ad56d13541fa5edf85..39ffc9fe06eee97f33d32a3b6e6df0604b45d687 100644 --- a/crisprbact/off_target.py +++ b/crisprbact/off_target.py @@ -18,6 +18,7 @@ def get_off_target_pos(guide, recs, seed_size): # + ori offs_plus = re.finditer(guide[-seed_size:] + "[ATGC]GG", str(rec.seq)) offs = [match.span() + (match.end(), "+", rec.id) for match in offs_plus] + # TODO: comparer guide avec rec.seq[match.start():match.end()] # - ori offs_minus = re.finditer( "CC[ATGC]" + rev_comp(guide[-seed_size:]), str(rec.seq) @@ -25,6 +26,8 @@ def get_off_target_pos(guide, recs, seed_size): offs += [ match.span() + (match.start(), "-", rec.id) for match in offs_minus ] + # comparer guide avec rec.seq[match.start():match.end()].reverse_complement() + # comparer les positions identique à partir de la fin et d'affilé. offs_dict = dict( zip(["start", "end", "pampos", "strand", "recid"], zip(*offs)) )