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

Stop storing an unused "weight" property from tip frequencies #1471

Merged
merged 1 commit into from
Feb 23, 2022

Conversation

tsibley
Copy link
Member

@tsibley tsibley commented Feb 15, 2022

This property was introduced with the original frequencies work¹ as an
anticipated need², but it was never used. Omit it for now to avoid
carrying around unnecessary baggage; it can be added back in the future
easily if its time comes.

I uncovered this while authoring a JSON Schema for the tip-frequencies
format.³

¹ In PR #497 as a7bda1e.
² nextstrain/augur#83 (comment)
³ nextstrain/augur#852

This property was introduced with the original frequencies work¹ as an
anticipated need², but it was never used.  Omit it for now to avoid
carrying around unnecessary baggage; it can be added back in the future
easily if its time comes.

I uncovered this while authoring a JSON Schema for the tip-frequencies
format.³

¹ In PR #497 as a7bda1e.
² nextstrain/augur#83 (comment)
³ nextstrain/augur#852
@nextstrain-bot nextstrain-bot temporarily deployed to auspice-trs-remove-unus-ixubjq February 15, 2022 19:06 Inactive
@tsibley tsibley requested a review from a team February 15, 2022 19:06
@trvrb
Copy link
Member

trvrb commented Feb 15, 2022

I do think it's highly relevant to work to properly include "weights" even if we haven't done so up to this point. For example, we could be weighting tips based on case counts relative to sequencing intensity to get a better picture of frequencies.

That said, if it's not implemented, it's not implemented and can be safely removed.

We had been "weighting" regions in the seasonal flu build, but just recently turned this off: nextstrain/seasonal-flu@40f850b

However, I think that even including --weights in augur frequencies was not producing a tip-frequencies.json with a weights attribute and instead was directly modifying the area under the curve of each tip kernel. @huddlej: Does this sound correct?

In this case, maybe we just continue this direction and plan rely on this built-in weighting in Augur rather than doing something on the fly in Auspice?

@tsibley
Copy link
Member Author

tsibley commented Feb 15, 2022

+1 for handling weights one way or another. @huddlej and @jameshadfield likely have the most input here?

However, I think that even including --weights in augur frequencies was not producing a tip-frequencies.json with a weights attribute

Yep, that's my understanding having recently read through this code and looked at output files.

When I ran my tip-frequencies schema in nextstrain/augur#852 against all s3://nextstrain-data/*frequencies.json, only one file fell out as not validating because it had this weight attribute for each node:

https://data.nextstrain.org/flu_seasonal_h1n1pdm_na_pandemic_tip-frequencies.json

This file was last modified on 12 May 2018 and all the weights are 1.0.

That said, if it's not implemented, it's not implemented and can be safely removed.

AFAICT with some careful grepping and looking, it's not used. However, I would appreciate @jameshadfield's confirmation that I didn't miss some spot.

@huddlej
Copy link
Contributor

huddlej commented Feb 16, 2022

Just confirming all the comments so far; the weighting in augur frequencies changes the kernels of the KDEs internally. We never used the weights in the JSON.

Copy link
Member

@jameshadfield jameshadfield left a comment

Choose a reason for hiding this comment

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

Yes, my memory is that this was included to future proof auspice but never actually used, and the code seems to back this up!

@jameshadfield jameshadfield merged commit cc997d2 into master Feb 23, 2022
@jameshadfield jameshadfield deleted the trs/remove-unused-tip-frequencies-weight branch February 23, 2022 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

5 participants