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

Add to the result the biggest match between the guide and the off-target

parent 8e22bb2d
No related branches found
No related tags found
No related merge requests found
Pipeline #25961 passed
......@@ -89,7 +89,16 @@ def on_target_predict(seq, genome=None, seed_sizes=[8, 9, 10, 11, 12]):
if off_target_df is not None and not off_target_df.empty:
off_targets = off_target_df.loc[
0:,
["start", "end", "pampos", "strand", "recid", "features"],
[
"start",
"end",
"pampos",
"strand",
"recid",
"max_matching_len",
"max_matching_seq",
"features",
],
]
for j, off_t in enumerate(off_targets.values.tolist()):
off_target_dict = {
......@@ -103,12 +112,14 @@ def on_target_predict(seq, genome=None, seed_sizes=[8, 9, 10, 11, 12]):
"off_target_pampos": off_t[2],
"off_target_strand": off_t[3],
"off_target_recid": off_t[4],
"off_target_max_matching_seq": off_t[6],
"off_target_good_orientation": None,
}
index_features = 7
# Loop through features associated to an off-target position
if len(off_t[5]) > 0:
if len(off_t[index_features]) > 0:
# Loop for each feature
for feat in off_t[5]:
for feat in off_t[index_features]:
if get_strand_value(
off_target_dict["off_target_strand"]
) != get_strand_value(feat.location.strand):
......
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