For modeling, we need to identify a public health estimate for each pathogen for each MGS sample. In #133 I added check-matches.py to tell us about the cases where we were not seeing ones, and here I (a) fix the mismatches and (b) integrate check-matches.py into test.py so we don't accidentally regress.
To fix the mismatches I used a few different strategies:
For HIV and HAV I edited the pathogen file to extrapolate to future years. This makes sense because we expect these prevalences to be reasonably constant, and if they're not then the pathogen file is the right place to adjust.
For Influenza and a few others we had estimates for specific days that didn't match the specific days where we had MGS samples. I tweaked the matching to take the closest variable within two weeks. Possibly we should be fancy and interpolate, but I doubt this is needed.
In some cases (HIV) we have estimates for one county that are really for the metropolitan area. Modified the matching to understand these.
For Influenza we were estimating separately for Flu A and B, but the modeling code ignored any estimates that set a taxid. I didn't fix these, I just moved the check to choose_predictor and @dp-rice can fix (ok?)
For West Nile and Dengue I just skipped them, because we don't care about these (far too rare)
For modeling, we need to identify a public health estimate for each pathogen for each MGS sample. In #133 I added
check-matches.py
to tell us about the cases where we were not seeing ones, and here I (a) fix the mismatches and (b) integratecheck-matches.py
intotest.py
so we don't accidentally regress.To fix the mismatches I used a few different strategies:
choose_predictor
and @dp-rice can fix (ok?)