-
Notifications
You must be signed in to change notification settings - Fork 9
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
malaria hiv interactions #1101
malaria hiv interactions #1101
Conversation
# Conflicts: # resources/ResourceFile_HIV.xlsx # resources/ResourceFile_TB.xlsx
make test for linear model harder - set whole population to be at risk of clinical/severe malaria and allow iptp to have protective effect
make test for linear model harder - set whole population to be at risk of clinical/severe malaria and allow iptp to have protective effect
Tests are failing on this one. Investigating.... ..... One problem is that ... pushing a quick fix for that, to see if that solves everything magically! |
Wow. It did! |
Ah great thanks Tim. |
@tbhallett I'm just working on this - in another branch - where I'm decoupling malaria from HIV and TB. Any conditions which are reliant on properties set by module Hiv now have checks, so you can run malaria with or without Hiv Update: This is now committed to this branch. |
Allow malaria to run without HIV (which also requires TB)
Thanks. So this is ready for review and merging? |
Yes please |
@@ -2534,13 +2541,15 @@ def do_at_initiation(self, person_id): | |||
df = self.sim.population.props | |||
person = df.loc[person_id] | |||
|
|||
# Check if drugs are available, and provide drugs: | |||
# Check if drugs are available, and provide drugs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be safer for this to be dict or named tuple so that we don't have to remember the special ordering.
Ie for example return
{"art": True, "contrim": False}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've changed this
src/tlo/methods/malaria.py
Outdated
) | ||
|
||
# prevalence of malaria in HIV population | ||
prev_malaria_in_hiv_population = coinfection_num / hiv_infected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Careful about division of values than could be 0. Use safety around this: eg
X if y > 0 else 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
src/tlo/methods/malaria.py
Outdated
df[df.is_alive & (df.ma_inf_type != 'none')] | ||
) | ||
|
||
prop_malaria_cases_with_hiv = coinfection_num / malaria_infected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above and elsewhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed here and wherever appropriate
@tbhallett the suggested changes have been made and this is ready for final review. Thanks very much! |
Thanks @tdm32 --- there's a conflict on this branch now. (ResourceFile_malaria.xlsx ... so it's hard for me to work out which version to choose). Please could you resolve through merging-in |
add missing parameter to Malaria module
Hi @tbhallett, I've merged in master this morning. The conflict arose I think because the file location moved. The correct version is in this branch. |
This branch incorporates interactions between malaria and HIV.
Specific changes are:
Plots below are small population (2000) and show some stochastic noise but are within reasonable tolerance of reported data.