Skip to content
Snippets Groups Projects
Commit 5964446a authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

Remove longest_perfect_match_length from dataframe

parent 3c9fed04
No related branches found
No related tags found
No related merge requests found
Pipeline #26166 passed
...@@ -47,8 +47,7 @@ def get_off_target_pos(guide, records, seed_size): ...@@ -47,8 +47,7 @@ def get_off_target_pos(guide, records, seed_size):
"pampos", "pampos",
"strand", "strand",
"recid", "recid",
"max_matching_len", "longest_perfect_match",
"max_matching_seq",
"pam_seq", "pam_seq",
], ],
zip(*offs), zip(*offs),
...@@ -81,12 +80,12 @@ def gen_extract_off_target_strand_plus( ...@@ -81,12 +80,12 @@ def gen_extract_off_target_strand_plus(
sub_sequence_to_match = sequence_string[start_pos_seq:end_pos_seq][::-1] sub_sequence_to_match = sequence_string[start_pos_seq:end_pos_seq][::-1]
matching_chars = list(common_start(sub_sequence_to_match, guide_subseq)) matching_chars = list(common_start(sub_sequence_to_match, guide_subseq))
matching_substr = "".join(matching_chars) matching_substr = "".join(matching_chars)
longest_perfect_match = matching_substr[::-1] + match.group(0)[:-3]
yield match.span() + ( yield match.span() + (
match.end(), match.end(),
"+", "+",
seqid, seqid,
seed_size + len(matching_chars), longest_perfect_match,
matching_substr[::-1] + match.group(0)[:-3],
match.group(0)[-3:], match.group(0)[-3:],
) )
...@@ -114,12 +113,13 @@ def gen_extract_off_target_strand_minus( ...@@ -114,12 +113,13 @@ def gen_extract_off_target_strand_minus(
guide_subseq = rev_comp(guide[: 20 - seed_size]) guide_subseq = rev_comp(guide[: 20 - seed_size])
matching_chars = list(common_start(sub_sequence_to_match, guide_subseq)) matching_chars = list(common_start(sub_sequence_to_match, guide_subseq))
matching_substr = "".join(matching_chars) matching_substr = "".join(matching_chars)
longest_perfect_match = match.group(0)[3:] + matching_substr
yield match.span() + ( yield match.span() + (
match.start(), match.start(),
"-", "-",
seqid, seqid,
seed_size + len(matching_chars), longest_perfect_match,
match.group(0)[3:] + matching_substr,
match.group(0)[:3], match.group(0)[:3],
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment