Skip to content

Conversation

@victorlin
Copy link
Member

@victorlin victorlin commented Oct 7, 2025

Note

Based on #1907

Description of proposed changes

… instead of warning and padding with N to translate to 'X'. A protein coding sequence with 1 or 2 extra bases indicates a problem with the data. It doesn't make sense to end the translation with 'X' which implies 3 bases.

Related issue(s)

Closes #1895

Review threads

Checklist

  • Automated checks pass (docs failure is unrelated)
  • Check if you need to add a changelog message
  • Check if you need to add tests
  • Check if you need to update docs

@victorlin victorlin self-assigned this Oct 7, 2025
The check is applicable to all load_features calls, not just for VCF
inputs in augur translate. Moved into a validation function to be
improved in future commits.

The calculation has been updated to use the length of feat.location.
@victorlin victorlin force-pushed the victorlin/fix-translate branch 2 times, most recently from b6d4069 to 64bf925 Compare October 10, 2025 18:01
@victorlin
Copy link
Member Author

victorlin commented Oct 10, 2025

@victorlin victorlin changed the title translate: Error when reference gene length is indivisible by 3 ancestral, translate: Error when reference gene length is indivisible by 3 Oct 10, 2025
@codecov
Copy link

codecov bot commented Oct 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.13%. Comparing base (cd5e959) to head (8490941).
⚠️ Report is 12 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1901      +/-   ##
==========================================
+ Coverage   74.08%   74.13%   +0.05%     
==========================================
  Files          82       82              
  Lines        8968     8978      +10     
  Branches     1822     1825       +3     
==========================================
+ Hits         6644     6656      +12     
+ Misses       2019     2018       -1     
+ Partials      305      304       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@victorlin victorlin mentioned this pull request Oct 10, 2025
4 tasks
@victorlin victorlin changed the base branch from master to victorlin/translate-refactor October 10, 2025 18:56
@victorlin victorlin force-pushed the victorlin/fix-translate branch from 7c34a61 to ed742f7 Compare October 13, 2025 18:55
@victorlin victorlin force-pushed the victorlin/fix-translate branch from ed742f7 to ea8c7e4 Compare October 13, 2025 22:36
@victorlin victorlin added the breaking Makes a backwards incompatible change and should wait for major release label Oct 13, 2025
… instead of warning and padding with N to translate to 'X'. A protein
coding sequence with 1 or 2 extra bases indicates a problem with the
data. It doesn't make sense to end the translation with 'X' which
implies 3 bases.
@victorlin victorlin force-pushed the victorlin/fix-translate branch from ea8c7e4 to 8490941 Compare October 13, 2025 23:38
Base automatically changed from victorlin/translate-refactor to master October 21, 2025 20:10
@victorlin victorlin merged commit 4be3d1e into master Oct 21, 2025
42 of 43 checks passed
@victorlin victorlin deleted the victorlin/fix-translate branch October 21, 2025 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Makes a backwards incompatible change and should wait for major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

augur translate doesn't complain about genes of lengths indivisible by 3

4 participants