3.5 Multiple Mutations, Elements and Regions

So far, we have looked at simulations where we only have one mutation type, one genomic element type, and one genomic region. Now, let’s look at how to create multiple mutation types and genomic regions.

Here is a simulation that creates three mutation types, each with their own fitness effects

initialize(){
    initializeMutationRate(1e-7);
    
    // Create mutation types
    initializeMutationType("m1", 1.0, "f", 0.0); // Neutral mutation
    initializeMutationType("m2", 1.0, "f", 0.02); // favorable mutation
    initializeMutationType("m3", 1.0, "f", -0.01); // Deleterious mutation  
    
    // Create Types of DNA 
    initializeGenomicElementType("g1", c(m1, m2, m3), c(50, 1, 10)); 
    initializeGenomicElementType("g2", m1, 1); 
    
    // Arrange DNA into a genome
    initializeGenomicElement(g1, 0, 9999);
    initializeGenomicElement(g2, 10000, 15000);
    initializeGenomicElement(g1, 15001, 25000);
    
    initializeRecombinationRate(1e-8);
}

1 early(){
    sim.addSubpop("p1", 500);
}

10000 early()
{
  sim.outputFixedMutations();
} 

3.5.1 Making multiple mutations

We can make multiple mutation types using repeated calls to the initializeMutationType() statement. From the script above:

initializeMutationType("m1", 1.0, "f", 0.0); // Neutral mutation
initializeMutationType("m2", 1.0, "f", 0.02); // favorable mutation
initializeMutationType("m3", 1.0, "f", -0.01); // Deleterious mutation  

Notice that each mutation type has its own name. The three mutations represent neutral, favorable, and deleterious mutations, respectively. These effects are controlled by the fourth argument (0.0, 0.0, -0.01).

3.5.2 Genomic Elements with multiple mutations

We can create a genomic element with multiple mutation types. Consider the line below:

initializeGenomicElementType("g1", c(m1, m2, m3), c(50, 1, 10));

Notice that for the mutation type, we can provide multiple mutation types using the syntax: c(m1, m2, m3). Likewise, we now set the ratio of how often they appear in the third argument, c(50, 1, 10).

This essentially says that:

  • Genomic element "g1" can have mutations of type m1, m2, and m3
  • The chance of an m1 mutation is 50/61. The chance of an m2 mutation is 1/61. The chance of an m3 mutation is 10/61.

Note that the order of mutation types within c(m1, m2, m3) is arbitrary, but it needs to match the order of their frequencies in c(50, 1, 10). The following two lines would work identically:

initializeGenomicElementType("g1", c(m1, m2, m3), c(50, 1, 10)); initializeGenomicElementType("g1", c(m3, m1, m2), c(10, 50, 1));

3.5.3 Multiple Genomic Elements Types

We can create multiple genomic element types with multiple uses of initializeGenomicElementType(). From the script above:

initializeGenomicElementType("g1", c(m1, m2, m3), c(50, 1, 10)); 
initializeGenomicElementType("g2", m1, 1); 

Note that "g2" type genomic elements can only have mutations of type m1, despite multiple mutation types being defined.

3.5.4 Multiple Genomic Elements

Now that we have defined multiple genomic element types, we can initialize multiple genomic elements with repeated uses of initializeGenomicElement():

initializeGenomicElement(g1, 0, 9999);
initializeGenomicElement(g2, 10000, 15000);
initializeGenomicElement(g1, 15001, 25000);

This creates a genome consisting of a stretch of 10,000 base long stretch of g1-type DNA, a 5,000 base long stretch of g2-type DNA, and a second 10,000 base stretch of g1-type DNA again.

To summarize:

  • We have defined three types of mutations with three different fitness effects
  • We have defined two types of DNA. One of them can have mutations of type m1, m2, and m3. The other can only have mutations of type m1
  • We have arranged the two types of DNA into a genome, in the order g1, g2, g1

3.5.5 SLiM GUI

A few interesting things to note about the SLiM GUI in this simulation:

genomic region view.

Looking at the genomic region viewer, it is now color-coded to reflect the arrangement of multiple genomic regions of different types (dark and light blue).

Looking at the mutation tracker, we can see different mutation types color-coded by their fitness effects - yellow for neutral mutations, green for favorable mutations, and red for deleterious mutations. Note that in the dark blue region (g2), there are only neutral mutations. This agrees with our setup of the genome, as g2 can only have mutations of type m1.