Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accounting for the possibility of a delete-state in function check_for_j. #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/python/anarci/anarci.py
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,11 @@ def check_for_j( sequences, alignments, scheme ):
# Sandwich the presumed CDR3 region between the V and J regions.

vRegion = ali[:cys_ai+1]
jRegion = [ (state, index+cys_si+1) for state, index in re_states[0] if state[0] >= 117 ]
# jRegion = [ (state, index+cys_si+1) for state, index in re_states[0] if state[0] >= 117 ]
# HMM may assign a "delete" state (see function _hmm_alignment_to_states), in which case the
# position index is None and the expression index+cys_si+1 will fail. A good solution seems
# to skip such states, because they do not correspond to a position in the sequence anyway.
jRegion = [ (state, index+cys_si+1) for state, index in re_states[0] if (state[0] >= 117) and (index is not None) ]
cdrRegion = []
next = 105
for si in range( cys_si+1, jRegion[0][1] ):
Expand Down