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

backtrans-align breaks if any dna seq length isn't a multiple of 3 #62

Open
metasoarous opened this issue Jan 20, 2017 · 0 comments
Open

Comments

@metasoarous
Copy link
Member

We get the following error message and stack trace:

% seqmagick backtrans-align sorted_aligned_inseqs_translation.fasta sorted_inseqs.fasta -o test.fa                                                                                                                  17-01-20 - 12:59:13
Traceback (most recent call last):
  File "/app/seqmagick/0.6.0/bin/seqmagick", line 9, in <module>
    load_entry_point('seqmagick==0.6.0', 'console_scripts', 'seqmagick')()
  ...
  File "/app/seqmagick/0.6.0/lib/python2.7/site-packages/seqmagick-0.6.0-py2.7.egg/seqmagick/subcommands/backtrans_align.py", line 108, in <genexpr>
    for codon in codons)
  File "/app/python2/2.7.8/lib/python2.7/site-packages/Bio/Data/CodonTable.py", line 304, in get
    return self.__getitem__(codon)
  ...
  File "/app/python2/2.7.8/lib/python2.7/site-packages/Bio/Data/CodonTable.py", line 185, in list_possible_proteins
    c1, c2, c3 = codon
ValueError: need more than 1 value to unpack

I can confirm that when I cut off the extra nucleotides, the back translation operates without error.

At the very least, it would seem to be worth presenting a more helpful error message. Better yet though, we could either do this trimming automatically (with a warning), or add a flag for triggering this behavior.

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

1 participant