For some reason there was an IndexError when running the method below, but since the variable codon_alignment was never initialized there was a UnboundLocalError raised as well claiming: local variable 'codon_alignment' referenced before assignment
I am not sure why there was an index error, but can this method be updated so that it gracefully continues? I will have to run the code with the problem inputs in the debugger to investigate the index error.
I am using panaroo version 1.5.
|
def multithread_codonalign_build(dna, protein, name): |
|
try: |
|
codon_alignment = codonalign.build(dna, protein) |
|
except RuntimeError as e: |
|
print(e) |
|
print(name) |
|
print(dna) |
|
print(protein) |
|
except IndexError as e: |
|
print(e) |
|
print(name) |
|
print(dna) |
|
print(protein) |
|
return(name, codon_alignment) |
For some reason there was an IndexError when running the method below, but since the variable
codon_alignmentwas never initialized there was a UnboundLocalError raised as well claiming: local variable 'codon_alignment' referenced before assignmentI am not sure why there was an index error, but can this method be updated so that it gracefully continues? I will have to run the code with the problem inputs in the debugger to investigate the index error.
I am using panaroo version 1.5.
panaroo/panaroo/generate_alignments.py
Lines 324 to 337 in e928a7a