Host-parasite simulation

This is a simple simulation of malaria population dynamics over a two-dimensional geographic space. Points in the left panel show humans (they have either a 'red' or a 'blue' genotype). There are also mosquitos, who spend their time biting humans. To illustrate this, the biting radius of one of these mosquitos is shown by the green points.

At the start of the simulation, hosts and mosquitos are randomly initialised to have a single parasite each and each mosquito settles on a random human. We then let mosquitos bite and transmit parasites according to the following steps:

  1. Each current human infection is terminated (the infection is cleared) with a given probability Pt.
  2. Each mosquito chooses one or more nearby humans to bite. Each bite involves flying to a nearby person (possible biting targets for one mosquito are shown in green) and infecting it with the current set of sporozoites. For each bite, the humans are infected with the parasite types the mosquito carries.
  3. The mosquito is assumed to draw sexual-stage parasites from all the infections of individuals it has bitten. If meiosis is turned off, these are assumed to form the sporozoite genotypes for the next round of biting. If meiosis is turned on, then pairs randomly fuse and generate meiosis products which form the sporozoites in the next round of biting.
  4. For each new infection of a human, we test to see whether the infection successfully incubates into a genuine blood stage infection. This is done according the the Incubation success probability (which sets how likely parasites are to incubate in individuals with an existing infection). Parasites are lost if they do not successfully incubate.
  5. Finally statistics are recorded and the display is updated.

Parasites are assumed to have a genotype at one of a small number of bi-allelic genetic variants (controlled by the selector). Up to 5 variants (i.e. 32 parasite genotypes) are currently modelled. These variants are either assumed to be i. completely linked (i.e. no recombination between them) or ii. completely unlinked (as if they lie on different chromosomes) depending on whether meiosis is turned on.

The graph on the top right shows the number of infected individuals, and the number of individuals with mixed infections at the parasite variants considered. The graph on the bottom right shows the allele frequencies of each parasite genotype among all infected individuals.

Each human and mosquito can be infected with anywhere from zero to all of the parasite types. If bitten by an infected mosquito, humans become infected according to the 'Incubation success' probability (p). Co-infection and super-infection of humans is further controlled by the co/super-infection probability (q). A parasite infecting a host that is already infected with d parasite types, succeeds with probability p × qd.

Values of q near zero produce Wright-Fisher like dynamics (co/super-infection never occurs and so the allele frequencies sum to one. This produces strong competition between the alleles such that an increase in the frequency of one allele implies a decrease in frequency of the ohters.

On the other hand values of q near one produce no between-allele competition at all. In this case all alleles reach their own equilibrium frequencies essentially independently of the others.