Skip to content

Commit e550a6a

Browse files
committed
only lowercase columns if at least one column affected, fixes #327
1 parent 92c5d6f commit e550a6a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

evcouplings/align/protocol.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -943,10 +943,11 @@ def modify_alignment(focus_ali, target_seq_index, target_seq_id, region_start, *
943943
min_col_cov /= 100
944944

945945
lc_cols = ali.count(ali._match_gap, axis="pos") > 1 - min_col_cov
946-
ali = ali.lowercase_columns(lc_cols)
947946

948-
# if we remove columns, we have to update list of positions
949-
pos_list = pos_list[~lc_cols]
947+
if lc_cols.sum() > 0:
948+
ali = ali.lowercase_columns(lc_cols)
949+
# if we remove columns, we have to update list of positions
950+
pos_list = pos_list[~lc_cols]
950951
else:
951952
lc_cols = None
952953

0 commit comments

Comments
 (0)