Skip to content

Broken error handling in multithread_codonalign_build #310

Description

@revinici

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)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions