HIV dynamics: cellular automata approach correction
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
THE MODEL
As detailed in the article, see [1]:
Each cell can be in one of following states: (a) healthy; (b) infected-A1, corresponding to an infected cell that is free to spread the infection; (c) infected-A2, the final stage of an infected cell before it dies due to the action of the immune system; and, finally, (d) dead, an infected cell that was killed by the immune response.
The initial configuration is composed of healthy cells, with a small fraction, Phiv, of infected-A1 cells, representing the initial contamination by the HIV. In one time step the entire lattice is updated in a synchronized parallel way, according to the rules described below. The updated state of a cell depends on the states of its four nearest neighbors and the four next nearest neighbors, in a square lattice.
Rule 1: Update of a healthy cell: (a) If it has at least one infected-A1 neighbor, it becomes infected-A1. (b) If it has no infected-A1 neighbor but does have at least R (2 <= R <= 8) infected-A2 neighbors, it becomes infected-A1. (c) Otherwise it stays healthy. Rule 1a mimics the spread of the HIV infection by contact, before the immune system had developed its specific response against the virus. Rule 1b represents the fact that infected-A2 cells may, before dying, contaminate a healthy cell if their concentration is above some threshold.
Rule 2: An infected-A1 cell becomes infected-A2 after tao time steps. An infected-A2 cell is the one against which the immune response has developed, and hence its ability to spread the infection is reduced. Here tao represents the time required for the immune system to develop a specific response to kill an infected cell. Such a time delay is required for each infected cell since in our model we view each new infected cell as carrying a different lineage (strain) of the virus. This is the way we incorporate the mutation rate of the virus in our model. When a healthy cell is infected, the virus uses the cell's DNA in order to transcribe its RNA and replicate. During each transcription an error may occur, producing, on the average, one mutation per generation and hence a new strain of the virus is produced.
Rule 3: Infected-A2 cells become dead cells. This rule simulates the depletion of the infected cells by the immune response.
Rule 4: (a) Dead cells can be replaced by healthy cells with probability Prepl in the next time step (or remain dead with probability 1 - Prepl). (b) Each new healthy cell introduced may be replaced by an infected-A1 with probability Pinf. Rule 4a describes the replenishment of the depleted cells, mimicking the high ability of the immune system to recover from the immunosuppression generated by infection. As a consequence, it will also mimic some diffusion of the cells in the tissue. Rule 4b simulates the introduction of new infected cells in the system, either coming from other compartments of the immune system or resulting from the activation of the latent infected cells, as suggested in the literature.
NOTES
In this model, we introduce an internal fifth state: healthy but has been infected (T.), in dark green, to denote cells that have been infected and so again become actively infected (A1), with probability Pinf.
CREDITS AND REFERENCES
[1] Dynamics of HIV Infection: A Cellular Automata Approach. Rita Maria Zorzenon dos Santos, and Sérgio Coutinho. Physical Review Letters. 2001.
NetLogo implementation by Ricardo Cruz ricardo.pdm.cruz@gmail.com
Comments and Questions
; states ; T healthy ; A1 infected stage 1 ; A2 infected stage 2 ; D dead globals [ T A1 A2 D ; status colors ] patches-own [ nA1 nA2 time ] to setup clear-all set T green set A1 orange set A2 red set D black ask patches [ set pcolor T set time 0 ] ask n-of (Phiv * max-pxcor * max-pycor) patches [ set pcolor A1 ] reset-ticks end to-report rule1 ; T - initial healthy state if nA1 >= 1 or nA2 >= R [ report A1 ] report T end to-report rule2 ; A1 if time >= tao [ report A2 ] report A1 end to-report rule3 ; A2 report D end to-report rule4 ; D if random-float 1 < Prepl [ if random-float 1 < Pinf [ report A1 ] report T ] report D end to update ask patches [ let N neighbors set nA1 count N with [ pcolor = A1 ] set nA2 count N with [ pcolor = A2 ] ] ask patches [ let ncolor pcolor ifelse pcolor = T [set ncolor rule1][ ifelse pcolor = A1 [set ncolor rule2][ ifelse pcolor = A2 [set ncolor rule3][ ifelse pcolor = D [set ncolor rule4][ ]]]] ifelse ncolor != pcolor [ set pcolor ncolor set time 0 ][ set time time + 1 ] ] tick end
There is only one version of this model, created almost 11 years ago by Andreas Hillmann.
Attached files
No files
Ricardo Cruz
Corrected version
Hi Andreas, I coded the other model to get familiar with netlogo and to play a little with a HIV CA model. Thank you for fixing a bug in my implementation. I was going to delete mine (not to confuse anyone), but I see that this website links yours from mine, so people should be able to find it. By the way, I have done some more playing with HIV models, because I got a small research grant on that (it will end soon). I eventually got more into Guillespie models. You have my email.Drop me an email if you would like to share thoughts. :) Best wishes, Ricardo
Posted almost 11 years ago
Ricardo Cruz
Moore neighborhood
Just noticed a small deviation in our model from the article. The command "neighbors" should be changed to "neighbors4" because the simulations from the original article only consider the von Neumann neighborhood (not the Moore neighborhood). Interestingly, the results DO look identical though.
Posted over 10 years ago
Ricardo Cruz
Moore neighborhood 2
Actually, a retification to my previous comment. The paper says, "The updated state of a cell depends on the states of its four nearest neighbors and the four next nearest neighbors", and their following paper "Robustness of a cellular automata model for the HIV infection" reinforces that. So it is a von Neumann neighborhood of radius 2; luckily our Moore neighborhood produces similar results to those of the paper, and is easier to implement over netlogo :P We would require patch-at calls for the entire radius=2 neighboord to be faithful to the model.
Posted over 10 years ago
Ricardo Cruz
Moore neighborhood 3
Retification #3. Actually I think I misread "its four nearest neighbors and the four next nearest neighbors". I tried different neighborhood configurations, but I can only reproduce the screenshots from the paper when using Moore neighborhood. So, our code is fine as it is. Sorry for the spam. :P
Posted over 10 years ago