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

HIV Transmission Code including Resistance Transmission #154

Open
3 tasks
Tracked by #62
mmcleod89 opened this issue Oct 20, 2023 · 4 comments
Open
3 tasks
Tracked by #62

HIV Transmission Code including Resistance Transmission #154

mmcleod89 opened this issue Oct 20, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request model-question
Projects

Comments

@mmcleod89
Copy link
Collaborator

mmcleod89 commented Oct 20, 2023

Currently there is some (simplified & heavily dummied) transmission code

  • viral load groups for partners are just randomised currently; they should be calculated from the population statistically

  • We need to include considerations for:

  • Primary infection (first three months)

  • Undetectable

  • STIs

  • Updating tests

  • Add resistance tranmission: the model here should be confirmed with the HIV group based on our probability discussions earlier.

Useful info:

  • risk_nippnp means "risk of new infected partner per new partner" i.e. the risk that any given new partner is infected.
@mmcleod89 mmcleod89 added enhancement New feature or request model-question labels Oct 20, 2023
@mmcleod89 mmcleod89 self-assigned this Oct 20, 2023
@mmcleod89 mmcleod89 added this to To do in HIVpy via automation Oct 20, 2023
@mmcleod89 mmcleod89 moved this from To do to In progress in HIVpy Oct 26, 2023
@mmcleod89 mmcleod89 mentioned this issue Oct 26, 2023
2 tasks
@mmcleod89
Copy link
Collaborator Author

mmcleod89 commented Oct 26, 2023

STI Code:

  • Rate STI = 0.05 (this should probably go in a data file)

  • Rate persistance of STI = 0.2

  • Initial STI chances at the beginning of simultion = rate_sti * number of STPs (short term partners)

  • This needs to initialise AFTER sex behaviour has initialised

  • Place this in the sex behaviour init after new partners have been initialised

  • Update for someone without an STI: BEFORE num partners update (i.e. last timestep's partners: rate_sti * num STPs

  • Update for someone with an STI: probability of still having STI = rate_persist_STI * num STPs

Undetectable Viral Load:

  • We have a rate of transmission for undetectable HIV which is sampled at the beginning of the simulation: %sample(tr_rate_undetec_vl, 0.0000 0.0001 0.0010, 0.7 0.2 0.1);

Probability of Viral Load Group for STP

  • First check the proportion of people in that sex & age group who are in each viral load category
  • If there are no infected people in the age and sex group, calculate the proportion of people in that sex (ignoring age) in each viral load group
  • Map(sex, age, vl) -> Probability
  • Map(sex, age) -> [Probability List]
  • Update this map for the population each timestep at the beginning of HIV transmission code
  • For individual transmissions, just look up the values

Transmission rate

  • fold_tr: transmission factor, sampled at the beginning of the simulation %sample_uniform(fold_tr, 1/1.5 1 1.5);
  • Additionally, new parter transmission factor: fold_tr_newp; %sample_uniform(fold_tr_newp, 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1/0.8 1/0.6 1/0.4);
  • We have a set of 6 base tranmission rates, one for each viral load group (note that viral load groups are in increasing order until the last group which is for primary infection):
  1. tr_rate_undetec_vl*fold_tr_newp
  2. 0.01fold_trfold_tr_newp
  3. 0.03fold_trfold_tr_newp
  4. 0.06fold_trfold_tr_newp
  5. 0.10fold_trfold_tr_newp
  6. tr_rate_primary*fold_tr_newp
  • these values can be calculated at the setup of the HIV transmission module

  • If tranmission occurs we should note the viral load group of the person who infected them

  • risk_nip is the probability of transmission from infected short term partners

  • Initially set by VL group, but modified by e.g. STI, mutations/prep etc.

  • So mutations need to be calculated before tranmission event

@mmcleod89
Copy link
Collaborator Author

Starting from * probability of infection from infected new partner; in SAS code:

  • Calculate viral load group probabilities (in setup)
  • Transmission risk based on VL group (base transmission risk + random factor which is indivually sampled)
  • Presence of mutations (@andrew-phillips-1 should we mimic the SAS code or use sampling methods we discussed in previous meeting?)
  • risk changes for STI / mutation / prep etc. (ignore pop_wide_tld section) Adding a small prep module is helpful here to hold / sample relevant values
  • HIV tranmission: record some things for useful stats

@mmcleod89
Copy link
Collaborator Author

SAS code assumed all STPs for a given person have the same age group. For now, HIVpy allows each of these STPs to have their own age group. This will have an impact on their VL group probabilities etc.

@andrew-phillips-1
Copy link

@mmcleod89 Hi Michael I would like you to introduce any enhancements that you suggest and which we agree on. That means we might expect model results to differ from our SAS version, but I think that is a price worth paying for enhancing the model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request model-question
Projects
Status: In progress
HIVpy
In progress
Development

No branches or pull requests

3 participants