nextstrain / augur

Pipeline components for real-time phylodynamic analysis
https://docs.nextstrain.org/projects/augur/
GNU Affero General Public License v3.0
268 stars 128 forks source link

feat(ancestral): make --genes optional when reconstructing translations, if omitted, translate all genes in annotation #1668

Open corneliusroemer opened 2 weeks ago

corneliusroemer commented 2 weeks ago

Description of proposed changes

The most common use case (in my experience) of augur ancestral's translation reconstruction is to translate all the genes in the genome annotation and then reconstruct all of them.

Currently, one needs to explicitly list out all the genes, for no real reason. This PR makes it so that if no --genes argument is provided, all genes are translated by default.

This is not a breaking change, as currently --genes is always required when an annotation is.

Checklist

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 78.72340% with 20 lines in your changes missing coverage. Please review.

Project coverage is 72.30%. Comparing base (29188d4) to head (014314e). Report is 10 commits behind head on nextclade-compat.

Files with missing lines Patch % Lines
augur/utils.py 75.60% 9 Missing and 11 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## nextclade-compat #1668 +/- ## ==================================================== + Coverage 72.26% 72.30% +0.03% ==================================================== Files 79 79 Lines 8272 8318 +46 Branches 1691 1708 +17 ==================================================== + Hits 5978 6014 +36 - Misses 2009 2012 +3 - Partials 285 292 +7 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

corneliusroemer commented 2 weeks ago

Just skimmed through the code of these 2 commits, looks good. Instead of the first commit (bugfix) you could fix https://github.com/nextstrain/augur/pull/1664 while it's still unmerged

Done, thanks!

I won't merge this yet as I think it's best to keep it chunked. If we don't do the nextclade mode, I might rebase later but for now I care most about the nextclade compatibility mode stuff :)