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

fix: upper case root sequence for ancestral reconstruction #1323

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

rneher
Copy link
Member

@rneher rneher commented Sep 26, 2023

I ran into this issue when the root sequence was provided as lower case. All lower-to-upper case changes were attached to the root. This should fix it, but there might be better solutions.

@corneliusroemer
Copy link
Member

Thanks! Seems like a strictly beneficial change, better solutions can be added later.

CI failing is because of monkeypox restructure, I will take mpox out of augur CI

@corneliusroemer
Copy link
Member

Merging this then CI should work again: #1324

corneliusroemer added a commit that referenced this pull request Sep 26, 2023
Makes it possible to reproduce the error and check we actually fix it and don't regress
Makes it possible to reproduce the error and check we actually fix it and don't regress
@corneliusroemer
Copy link
Member

corneliusroemer commented Sep 26, 2023

Added a test that failed before the fix so that alternative fixes are easy to test and we don't regress in the future.
5d8bc27

See: https://github.com/nextstrain/augur/actions/runs/6315326703/job/17147616573#step:9:20 for what the bug looks like

@codecov
Copy link

codecov bot commented Sep 26, 2023

Codecov Report

All modified lines are covered by tests ✅

Files Coverage Δ
augur/ancestral.py 75.72% <100.00%> (ø)

📢 Thoughts on this report? Let us know!.

@corneliusroemer corneliusroemer requested review from a team and huddlej September 26, 2023 16:42
victorlin pushed a commit that referenced this pull request Oct 12, 2023
Makes it possible to reproduce the error and check we actually fix it and don't regress
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have enough background to understand why the change is needed. Is it because, for the purpose of ancestral reconstruction, "soft-masking" in the root sequence is irrelevant and should be ignored?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know about soft vs hard masking. Indeed, we don't ever treat upper and lower case nucleotides differently anywhere in augur - at least not as far as I'm aware.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're right - at least for augur index, sequences are lowercased.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current commits on this branch are hard for me to follow. Suggested alternative, by rebasing onto latest master and switching the order around: 5aba7ec...07fa7b5

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just look at the diff vs master - I don't think commit order matters here, it's just a few line changes in general anyways

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this is nitpicky and non-blocking! Just want to elaborate on my thoughts here.

My opinion is that "diff vs master" is only applicable if doing a squash merge, where the commits from the PR branch are irrelevant. Without the squash merge, there's unnecessarily verbose commit history which describes the ad-hoc iterative process while working on the PR, rather than the changes that the PR is actually trying to make.

To draw it out, merging as-is will lead to history that looks like this:

*   3c1b5e38 (HEAD -> master) Merge branch 'fix/root-upper-case'
|\  
| * f65b47c7 (origin/fix/root-upper-case, fix/root-upper-case) Add changelog entry
| *   7d97e078 Merge branch 'failing-test-for-1323' into fix/root-upper-case
| |\  
| | * 5d8bc276 Add failing test for #1323
| * | 1c78c885 Merge branch 'disable-monkeypox-ci' into fix/root-upper-case
| |\| 
| | * d5e5dc32 Disable monkeypox CI until pathogen-repo-ci supports custom build directories See issue https://github.com/nextstrain/.github/issues/63
| * | f9c3e198 fix: upper case root sequence for ancestral reconstruction
| |/  
* | 9839199f (origin/master, origin/HEAD) Remove outdated note "we have just updated augur to v6"

My suggested alternative:

*   9003db0b (HEAD -> master) Merge branch 'pr-1323-rebased'
|\  
| * 07fa7b5a (pr-1323-rebased) Add changelog entry
| * 5ff71be0 fix: upper case root sequence for ancestral reconstruction
| * 57d0123b Add failing test for #1323
* | 9839199f (origin/master, origin/HEAD) Remove outdated note "we have just updated augur to v6"

Given that this PR's scope is small, I think a squash merge is also fine:

* 12324ead (HEAD -> master) fix: upper case root sequence for ancestral reconstruction (#1323)
* 9839199f (origin/master, origin/HEAD) Remove outdated note "we have just updated augur to v6"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Squash merge seems like the right thing to do here!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another note is that the current diff vs master (at least by the "Files changed" tab) contains d5e5dc3 which is a bit misleading. It gets dropped by squash merge since it's already in master as 5aba7ec, so that's not a problem.

PR seems good to me 👍

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.

None yet

3 participants