diff --git a/crisprbact/predict.py b/crisprbact/predict.py index bb5c3975da15f2fa6d80ff0606d2c8b30ac92e5b..5609a91ea00178c08046e65962a20547e6da7d98 100644 --- a/crisprbact/predict.py +++ b/crisprbact/predict.py @@ -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):