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

Bug not feature in off-target

parent 463f82e5
No related branches found
No related tags found
No related merge requests found
......@@ -73,25 +73,28 @@ def on_target_predict(seq, genome=None, seed_size=7):
)
off_targets_list = []
off_targets = off_target_df.loc[
0:, ["start", "end", "pampos", "features"]
0:, ["start", "end", "pampos", "strand", "features"]
]
for index, off_t in enumerate(off_targets.values.tolist()):
off_target_dict = {
"off_target_start": off_t[0],
"off_target_end": off_t[1],
"pampos": off_t[2],
"strand": off_t[3],
}
for feat in off_t[3]:
feature_dict = {
"feat_strand": feat.location.strand,
"feat_start": feat.location.start,
"feat_end": feat.location.end,
"feat_type": feat.type,
}
for k, feat in feat.qualifiers.items():
if k != "translation":
feature_dict[k] = " :: ".join(feat)
if len(off_t[4]) > 0:
for feat in off_t[4]:
feature_dict = {
"feat_strand": feat.location.strand,
"feat_start": feat.location.start,
"feat_end": feat.location.end,
"feat_type": feat.type,
}
for k, feat in feat.qualifiers.items():
if k != "translation":
feature_dict[k] = " :: ".join(feat)
off_targets_list.append(off_target_dict)
else:
off_targets_list.append({**feature_dict, **off_target_dict})
target.update({"off_targets": off_targets_list})
else:
......
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