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

Codontable bugs. #386

Closed
wants to merge 6 commits into from
Closed

Codontable bugs. #386

wants to merge 6 commits into from

Conversation

Juke34
Copy link
Contributor

@Juke34 Juke34 commented Feb 16, 2024

Fix bugs in codon table:

  • table 0 was not selectable via Bio::Tools::CodonTable->new( -id => 0); but was working only by creating a codon table by default and using the id function to set the table to 0
  • table 7-8 and 17-20 was selectable while have been removed
  • Negative value was usable value while it should not

carandraug pushed a commit that referenced this pull request Apr 26, 2024
Without this extra check, negative table IDs were being counted from
the end of the tables array.
carandraug added a commit that referenced this pull request Apr 26, 2024
Codon tables are sometimes removed, e.g., codon table id=7.
Previously, instead of being handled as invalid tables, these would
return the "''" (because they were parsed from a `qw()`.  Since
a73febe the tables are parsed straight from the gc.prt, the tables
array gets a real empty string, adn are handled as invalid.

In PR #386 a test was added that the "''" was returned.  This is no
longer needed.  This commit tests that when a table is empty (id=7)
it's properly identified as invalid to avoid a regression.
@carandraug
Copy link
Member

Thank you for report and patches. I've edited them and merged. One of the changes (testing that removed tables such as id=7 was the string "''") was not needed because instead of that check the internal tables now have a real empty string. Closing as merged (with edits).

@carandraug carandraug closed this Apr 26, 2024
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

Successfully merging this pull request may close these issues.

2 participants