CS代考计算机代写 scheme python ER 、BIOS3036 – Computer Modelling in Science: Applications AMR Model Fitting Practical
、BIOS3036 – Computer Modelling in Science: Applications AMR Model Fitting Practical
Dov Stekel
Semester 1 2020/21
Week 18 – Patch 2b
This is an assessed practical.
In this exercise, we will consider an antimicrobial resistance model for bacteria in a slurry tank of a farm.
The model is given by the equations:
dS⎛N⎞ βSR dt=r⎜⎝1−N ⎟⎠ESS−δSS− N
max
dR ⎛N⎞ βSR dt =r(1−γ)⎜⎝1−N ⎟⎠ERR−δRR+ N
max
E =1− EmaxAH
S M I C SH + A H
E =1− EmaxAH
R M I C RH + A H
S is the concentration of sensitive bacteria (CFU/l), R is the concentration of resistant bacteria and A is the concentration of antibiotic. r is the maximal growth rate, N is the total population equal to R+S, Nmax is the carrying capacity, ES and ER are the effects of antibiotic on growth of sensitive and resistant bacteria respectively, δS and δR are the death rates of sensitive and resistant bacteria respectively, β is the rate of horizontal gene transfer, γ is the fitness cost of carrying resistance genes and δA is the decay rate of antibiotics. In the E equations, Emax is the maximal antibiotic inhibition, H is a Hill coefficient equal to 2, and MICS and MICR are the minimal inhibitory concentrations of antibiotic on the sensitive and resistant strains respectively.
The data you are given are placed in the file amrdata.txt
They represent samples from the slurry tank each week. At the start of the experiment, a large volume of antibiotic is added to the tank, and the antibiotic decays in time. No further antibiotic is added. Each week, the microbiologists cultured 100 bacterial strains, and worked out how many of them are resistant to the antibiotic. The first column is the time in hours, and the second column is the number of resistant strains of the 100 isolates tested. This can be thought of as equal to:
dA = −δA A dt
100 R/(R+S)
You will need to estimate three parameter values from the data:
β, the horizontal transfer rate
γ, the fitness cost of carrying the resistance δA, the rate of decay of the antibiotic
You have the following information about these three parameters:
β is expected to be small, but could be anywhere between 10-2 and 10-11
γ must be bigger than 0 and less than 1
δA is the rate of decay (1 / mean lifetime of antibiotics).. It is thought that the mean life time is about 2-3 weeks, based on other studies, but might be outside this range in slurry as the chemical conditions are different.
For the sake of this exercise, the other parameters are fully known. They can be assumed to be:
Parameter
Value
r – maximal growth rate
0.5 h-1
Nmax – carrying capacity
107 CFU/L
δS – death rate sensitive
0.025 h-1
δR – death rate resistant
0.025 h-1
Emax – maximal inhibition
2
H – hill coefficient
2
MICS – MIC sensitive
8 μg/L
MICR – MIC resistant
2000 μg/L
S(0) – initial sensitive population
9 x 106 CFU/L
R(0) – initial resistant population
105 CFU/L
A(0) – initial antibiotic concentration
5.6 μg/L
For the Assessment
Please create a Word (or equivalent) document into which to place your write- up.
1. Implement the ODE model in Python. You can use one of the existing MCMC Python codes that I have given you as a starting point. Please copy and paste the ODE model function into your write-up.
[15%]
2. Implement the MCMC scheme and use it to find out as much as you can about the parameter values of the model. You may need to run some short simulations to optimize the proposal distributions. For your write-up, please include:
i. A description of what you have done and why ii. All your program code
iii. Suitable figures and tables showing the results of your MCMC iv. A description of what your results mean
[60%]
3. In the given model, it was assumed that the slurry tank is spatially homogeneous, i.e. the concentration is the same in all parts of the tank. In fact, the slurry tank may have different concentrations of antibiotics, sensitive and resistant bacteria in different parts of the tank.
Modify the model so that the concentration can vary in space as well as time. Include suitable equations into your write up, and an explanation for those equations.
[25%]