From 11b1795190c7ba322b1c860fc331033913e7cc58 Mon Sep 17 00:00:00 2001 From: dudzicp <91734012+dudzicp@users.noreply.github.com> Date: Wed, 25 Oct 2023 14:08:53 +0200 Subject: [PATCH] Update schemes.py Updated smooth insertions logic as in case of cterm smoothing insertions were converted to matches causing downstream problems (e.g. in kabat alignment) --- lib/python/anarci/schemes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/python/anarci/schemes.py b/lib/python/anarci/schemes.py index 42f4216..a658d0d 100644 --- a/lib/python/anarci/schemes.py +++ b/lib/python/anarci/schemes.py @@ -177,7 +177,7 @@ def smooth_insertions(state_vector): if reg % 2: # nterm fw new_states = [enforced_patterns[reg][0]]*max( 0, len(state_buffer)-3) + enforced_patterns[reg][ max( 4-len(state_buffer), 1):] else: # cterm fw - new_states = enforced_patterns[reg][:3] + [enforced_patterns[reg][2]]*max( 0, len(state_buffer)-3) + new_states = enforced_patterns[reg][:3] + [enforced_patterns[reg][3]]*max( 0, len(state_buffer)-3) # Assign them preserving the order of the sequence. for i in range( len(state_buffer ) ): sv.append( ( new_states[i], state_buffer[i][1]) )