Skip to content

Commit 73a5801

Browse files
committed
🐛 fix read_infernal replicon positions 1 one based not 0
1 parent 8c375a4 commit 73a5801

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

integron_finder/infernal.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,14 @@ def read_infernal(infile, replicon_id, replicon_size,
9494
df.index = list(range(0, len(df)))
9595
idx = (df.pos_beg_tmp > df.pos_end_tmp)
9696
df.loc[idx, "pos_beg"] = df.loc[idx].apply(lambda x: max(x["pos_end_tmp"] - (len_model_attc - x["cm_fin"]),
97-
0),
97+
1),
9898
axis=1)
9999
df.loc[idx, "pos_end"] = df.loc[idx].apply(lambda x: min(x["pos_beg_tmp"] + (x["cm_debut"] - 1),
100100
replicon_size),
101101
axis=1)
102102

103103
df.loc[~idx, "pos_beg"] = df.loc[~idx].apply(lambda x: max(x["pos_beg_tmp"] - (x["cm_debut"] - 1),
104-
0)
104+
1)
105105
, axis=1)
106106
df.loc[~idx, "pos_end"] = df.loc[~idx].apply(lambda x: min(x["pos_end_tmp"] + (len_model_attc - x["cm_fin"]),
107107
replicon_size)

0 commit comments

Comments
 (0)