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

Interesting and probably unwanted behaviour for strain_interaction_to_cross_immunity #186

Open
kokbent opened this issue Jul 5, 2024 · 6 comments
Labels
wontfix This will not be worked on

Comments

@kokbent
Copy link
Collaborator

kokbent commented Jul 5, 2024

The utils function to convert strain interaction to cross immunity can produce some counterintuitive cross immunity matrix.

import numpy as np
from utils import strain_interaction_to_cross_immunity

interact = np.array([[0.6, 1.0], [0.3, 1.0]])

strain_interaction_to_cross_immunity(2, interact)
# Array([[0. , 0.6, 1. , 0.6],
#        [0. , 0.3, 1. , 1. ]], dtype=float32)

So in this case, if we say that the "interaction" for:

  1. challenging strain 1 to a strain 1 infected is 0.6, and
  2. challenging strain 1 to strain 2 infected is 1.0

A person who is infected by strain 2 only has cross immunity of 1.0 towards challenging strain 1, but if they are infected by both strain 1 & 2, their cross immunity drops to 0.6 towards challenging strain 1.

@SamuelBrand1
Copy link
Contributor

Two things:
1.

interact = np.array([[0.6, 1.0], [0.3, 1.0]])

seems a bit weird? Is that saying getting infected with strain 1 gives more protection against strain 2?

https://github.com/cdcent/cfa-scenarios-model/blob/12a76646b61fdcdd4b75b038e80cbe4062a3b042/mechanistic_model/utils.py#L906

But I don't think you have "most recent strain" as a concept in the history?

@SamuelBrand1
Copy link
Contributor

Maybe easiest sensible solution is to use the maximum immunity over pre-infected strains.

@arik-shurygin
Copy link
Collaborator

Your strain interactions matrix is a bit confusing here though.
The strain interactions matrix you provide looks like this:
[0.6, 1.0]
[0.3, 1.0].

In every case thus far we have always had a 1.0 diagonal across the strain interactions matrix. what this 0.6 says here is that strain 0 vs strain 0 is not a perfect match which does not exactly make sense to me.

@arik-shurygin
Copy link
Collaborator

As Ben pointed out in verbal discussion, the 1.0 diagonal is usually enforced, however during strain definition collapse (between epochs when we combine strains into the ancestral one) this can occur. This should be the primary focus of this GH issue, either always enforcing a 1.0 diagonal and patching the bug with strain combination, or allowing the user to pass nonsense if they so wish.

@arik-shurygin
Copy link
Collaborator

Had a discussion with Tom, he is not convinced that this behavior is entirely unfounded. If you combine strain definitions, they are still different strains in reality, so there may not be perfect protection between them (diagonal = 1). For example, if we combine BA2/4/5 all together, a challenge from this combined strain is not necessarily met with perfect protection. An individual may have been infected with BA2, is now being met with BA5, but these are now marked as the same strain... Tabling this issue for a future discussion but noting the points for now.

@arik-shurygin arik-shurygin added the wontfix This will not be worked on label Oct 17, 2024
@arik-shurygin
Copy link
Collaborator

labeling wontfix for now since this is something that should be on our radar but is not actively going to be worked on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants