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

Problems determining best_gappos #13

Closed
jeremycfd opened this issue Aug 1, 2017 · 2 comments
Closed

Problems determining best_gappos #13

jeremycfd opened this issue Aug 1, 2017 · 2 comments

Comments

@jeremycfd
Copy link
Collaborator

jeremycfd commented Aug 1, 2017

I've noticed that in some situations the align_cdr3s function in tcr_distances.py will fail to find the best_gappos, causing an error. However, re-running the same dataset, I was able to get it to succeed about 20% of the time. I was unable to find any consistency in the center_cdr3 and member_cdr3 pairing that caused this to fail. Examples include:
DVGYKL DPAGNTGKL
GEGSNNRI GYNTNTGKL
GDRYAQGL GDVDYAQGL

But in each of these cases, rerunning the code eventually resulted in getting through these cases without issue. I assume the stochasticity is introduced by the random_seend. Any thoughts on how to best address this @phbradley ?

Traceback (most recent call last):
File "/mnt/Data/TCR_Git/public_pipeline/tcr-dist/make_tall_trees.py", line 683, in
a,b = align_cdr3s( center_cdr3, member_cdr3, gap_character )
File "/mnt/Data/TCR_Git/public_pipeline/tcr-dist/tcr_distances.py", line 98, in align_cdr3s
s0 = s0[:best_gappos+1] + gap_character*lendiff + s0[best_gappos+1:]
UnboundLocalError: local variable 'best_gappos' referenced before assignment

@phbradley
Copy link
Owner

I think this could be explained at least in part by CDR3s of length 6. I've fixed that bug I believe (about to check it in), but that doesn't seem to explain the examples you give there. Hmmm... when I run align_cdr3s with those sequences I don't get an error...

@jeremycfd
Copy link
Collaborator Author

Hrm, how strange...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants