-
Notifications
You must be signed in to change notification settings - Fork 129
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
refine: --year-bounds
has no effect
#1136
Comments
A search of public code on GitHub is not, IMO, sufficient for determining usage of Augur. I expect (justifiably, I think) that a lot of Augur usage is "dark", e.g. not publicly visible. That's not to say we can't remove |
(I realize in this case it's kinda moot because |
But also, maybe it should work, since we ourselves expected it to (and it used to)? https://github.com/neherlab/2019-krisp-nextstrain-workshop/blob/master/tb_walker/Snakefile#L71-L82 |
Hmm, I'm also not following why we'd expect an effect in the example you gave. The description of year bounds is:
but none of the dates in |
Oh, good catch. I'll update with a better example. |
I just realized that the previous example was irrelevant as |
I mentioned this in Slack and the consensus is to properly re-implement functionality. |
Previously, the value specified was unused in the code. This restores the functionality. I moved the min_max_year argument from the constructor to range() since it is only used there. Fixes #1136.
Previously, the value specified was unused in the code. This restores the functionality. I moved the min_max_year argument from the constructor to range() since it is only used there. Fixes #1136.
Previously, the value specified was unused in the code. This restores the functionality. I moved the min_max_year argument from the constructor to range() since it is only used there. Fixes #1136.
Previously, the value specified was unused in the code. This restores the functionality. I moved the min_max_year argument from the constructor to range() since it is only used there. Fixes #1136.
Previously, the value specified was unused in the code. This restores the functionality. I moved the min_max_year argument from the constructor to range() since it is only used there. Fixes #1136.
Previously, the value specified was unused in the code. This restores the functionality. I moved the min_max_year argument from the constructor to range() since it is only used there. Fixes #1136.
Current Behavior
The help text of
--year-bounds
states:However, ambiguous dates with
XX
in the year are unbounded by the value passed to this option.The value gets passed through many functions in dates.py, down to DateDisambiguator where it is left unused.
I believe this is because some old logic got lost in a refactor: 1cf41fb
Expected behavior
This option should limit the range of date inference when
XX
is in the year.How to reproduce
Setup: Create a copy of tests/functional/refine/metadata.tsv, adding partial ambiguity on the century-level (
20XX
) for the first strainPAN/CDC_259359_V1_V3/2015
.Run without
--year-bounds
. Note that--timetree
must be specified otherwise the--year-bounds
value is never used in refine.py. Observe that the inferred date for the strain is2023-01-26
.Run with
--year-bounds 1900 2000
. That should have limited the inferred date to be between 1900 and 2000, however it is still2023-01-26
.Existing usage
A simple GitHub search shows these public usages:
There may be non-public usages.
Possible solution
The text was updated successfully, but these errors were encountered: