Skip to content

Instantly share code, notes, and snippets.

@scientificprotocols
Last active August 29, 2015 14:20
Show Gist options
  • Save scientificprotocols/7e1ed7e532769a134707 to your computer and use it in GitHub Desktop.
Save scientificprotocols/7e1ed7e532769a134707 to your computer and use it in GitHub Desktop.
Modeling evolution of insect resistance to genetically modified crops
Authors: Bruce E. Tabashnik , David W. Crowder & Yves Carrière 

Introduction

Genetically modified crops producing insecticidal proteins from Bacillus thuringiensis (Bt) for insect control have been planted on more than 200 million ha worldwide since 1996 [1]. Evolution of resistance by insect pests threatens the continued success of Bt crops [2, 3]. To delay pest resistance, refuges of non-Bt crops are planted near Bt crops to allow survival of susceptible pests [4, 5]. We used computer simulations of a population genetic model to determine if predictions from the theory underlying the refuge strategy match outcomes in the field documented with monitoring data [6]. The computer program is called SERBt for Simulated Evolution of Resistance to Bt crops. For the six major pests modeled, the simulation results corresponded with the field data. In particular, the simulations indicated that resistance would evolve fastest in Helicoverpa zea, a major cotton pest in the U.S., and this insect was the first with documented field-evolved resistance to a Bt crop. The model can be readily modified to incorporate key biological parameters for many insects.

Equipment

Computer with Microsoft Excel.

Procedure

  1. Create a new workbook in Microsoft Excel. Rename worksheet 1 “Input” and worksheet 2 “Output.”

  2. If Microsoft Excel 2007 is used, open the Developer tab (right click on the main toolbar, select “Customize Quick Access Toolbar”, select “Popular” from menu, and check box that says “Show Developer Tab on the Ribbon”). In earlier versions of Excel, open the Visual Basic Toolbar (Tools…Customize…Visual Basic)

  3. Open the Visual Basic Editor (Button on toolbar). Insert a module to the editor. This can be done using the menus on top: Insert…Module, or by right-clicking on Microsoft Excel Objects in the directory on the left of the screen. Make sure the module (Module1 is the default) is shown as a Microsoft Excel Object.

  4. The full computer program SERBt and comments are attached in a file and listed below. Paste into the module screen the full text from the attached file (click download at bottom)or from immediately below:

Option Explicit ’ Requires all variables to be declared

’ Variable definitions

  • Dim Fss, Frs, Frr As Double ’ Frequency of three genotypes (ss, rs, rr)
  • Dim RefWss, RefWrs, RefWrr As Double ’ Fitness of three genotypes in refuge
  • Dim BtWss, BtWrs, BtWrr As Double ’ Fitness of three genotypes in Bt field
  • Dim Wss, Wrs, Wrr As Double ’ Fitness of each genotype (across both fields) Dim PRef, PBt As Double ’ Proportion of habitat planted to refuge and Bt fields
  • Dim Inits, Initr, Freqs, Freqr As Double ’ Initial frequency of alleles and frequency over time
  • Dim Wm As Double ’ Population weighted mean fitness
  • Dim Deltar As Double ’ Change in r allele frequency each generation
  • Dim GenYear As Integer ’ Number of generations per year
  • Dim GeneCrit As Double ’ Genotypic Criterion (FREQr = 0.5 is standard)
  • Dim Gen, A, Years As Integer ’ Loop Counters

’ Beginning of program code

Sub BtResistance()

Sheets(“Input”).Select ’ Input data on worksheet “Input” (Worksheet must be named “Input”)

’ All input variables are drawn from worksheet “Input”. Values could be entered below directly if desired.

  • Inits = Cells(3, 1) ’ Initial frequency of s allele (Input taken from Row 3, Column A)

  • Initr = Cells(3, 2) ’ Initial frequency of r allele in (Input taken from Row 3, Column B)

  • Freqs = Inits ’ Frequency of s allele

  • Freqr = Initr ’ Frequency of r allele

  • PRef = Cells(6, 1) ’ Proportion refuge (Input taken from Row 6, Column A)

  • PBt = 1 – PRef ’ Proportion Bt

  • GenYear = Cells(6, 5) ’ Number of generations per year (Input taken from Row 6, Column E)

  • Years = Cells(6, 10) ’ Number of simulated years

  • Gen = Years * GenYear ’ Number of simulated generations

  • RefWss = Cells(3, 5) ’ Fitness of ss in refuge (Input taken from Row 3, Column E)

  • RefWrs = Cells(3, 6) ’ Fitness of rs in refuge (Input taken from Row 3, Column F)

  • RefWrr = Cells(3, 7) ’ Fitness of rr in refuge (Input taken from Row 3, Column G)

  • BtWss = Cells(3, 10) ’ Fitness of ss in Bt field (Input taken from Row 3, Column J)

  • BtWrs = Cells(3, 11) ’ Fitness of rs in Bt field (Input taken from Row 3, Column K)

  • BtWrr = Cells(3, 12) ’ Fitness of rr in Bt field (Input taken from Row 3, Column L)

’ Values of generation counter determine number of generations to run unless stop point is reached

For A = 1 To Gen

’ Calculate genotype frequencies at beginning of generation

  • Fss = Freqs * Freqs
  • Frs = 2 * Freqs * Freqr
  • Frr = Freqr * Freqr

’ Calculate fitness of each genotype and population weighted mean fitness

  • Wss = BtWss * PBt + RefWss * PRef
  • Wrs = BtWrs * PBt + RefWrs * PRef
  • Wrr = BtWrr * PBt + RefWrr * PRef

Wm = Frr * Wrr + Frs * Wrs + Fss * Wss

’ Calculate change in r allele frequency in each generation

Deltar = (Freqr * Freqs * (Freqr * (Wrr – Wrs) + Freqs * (Wrs – Wss))) / Wm

’ Calculate allele frequencies after each generation

  • Freqr = Freqr + Deltar
  • Freqs = 1 – Freqr

’ Delete old output (Requires a worksheet named “Output”)

Sheets(“Output”).Select

If (A = 1) Then

  • Cells.Select
  • Selection.ClearContents
  • Range(“A1”).Select

End If

’ Output initial conditions to Row 2, Columns A-C (Requires a worksheet named “Output”)

  • Cells(1, 1) = “Generation”
  • Cells(1, 2) = “Years”
  • Cells(1, 3) = “s Freq”
  • Cells(1, 4) = “r Freq”
  • Cells(1, 5) = “ss Freq”
  • Cells(1, 6) = “rs Freq”
  • Cells(1, 7) = “rr Freq”
  • Cells(1, 9) = “Years to Reach Genotypic Criterion”
  • Cells(1, 13) = “Dominance, h”
  • Cells(4, 9) = “Frequency of r allele in Year 20”
  • Cells(4, 13) = “Frequency of rr genotype in Year 20”
  • Cells(2, 1) = 0
  • Cells(2, 2) = 0
  • Cells(2, 3) = Inits
  • Cells(2, 4) = Initr
  • Cells(2, 5) = Inits * Inits
  • Cells(2, 6) = 2 * Inits * Initr
  • Cells(2, 7) = Initr * Initr
  • Cells(2, 13) = ((BtWrs – BtWss) / (BtWrr – BtWss))

’ Output conditions of model runs to Row 3+, Columns A-G, Worksheet “Output”

  • Cells(A + 2, 1) = A
  • Cells(A + 2, 2) = A / GenYear
  • Cells(A + 2, 3) = Freqs
  • Cells(A + 2, 4) = Freqr
  • Cells(A + 2, 5) = Freqs * Freqs
  • Cells(A + 2, 6) = 2 * Freqs * Freqr
  • Cells(A + 2, 7) = Freqr * Freqr

’ Output years in which genotypic and phenotypic criteria are reached, Worksheet “Output”

If (Cells(A + 2, 4) >= 0.5 And Cells(A + 1, 4) < 0.5) Then

Cells(2, 9) = Cells(A + 2, 2)

End If

If (A = Gen And Cells(A + 2, 4) < 0.5) Then

Cells(2, 9) = “Not Reached”

End If

’ Output r allele frequency and rr genotype frequency after simulated number of years

If (A = Gen) Then

  • Cells(5, 9) = Freqr
  • Cells(5, 13) = Frr

End If

Next A

End Sub

  1. The values of the several variables are input to the program from the worksheet “Input”. The values can be entered directly into the program code, but we find it is easier to manipulate the variables on the spreadsheet. The best way to do this is to format the Input Screen as Follows (corresponds with code above):
  • Row 3, Column A: Initial s allele frequency (Value from 0 to 1)

  • Row 3, Column B: Initial r allele frequency (Value from 0 to 1; 1 – Initial s)

  • Row 3, Column E: Fitness of ss genotype in refuge (Value from 0 to 1)

  • Row 3, Column F: Fitness of rs genotype in refuge (Value from 0 to 1)

  • Row 3, Column G: Fitness of rr genotype in refuge (Value from 0 to 1)

  • Row 3, Column J: Fitness of ss genotype in Bt field (Value from 0 to 1)

  • Row 3, Column K: Fitness of rs genotype in Bt field (Value from 0 to 1)

  • Row 3, Column L: Fitness of rr genotype in Bt field (Value from 0 to 1)

  • Row 6, Column A: Proportion Refuge (Value from 0 to 1)

  • Row 6, Column E: Number of generations per year (Integer greater than or equal to 1)

  • Row 6, Column J: Number of simulated years (Integer greater than or equal to 1)

We used Rows 1, 2, and 5 of the worksheet “Input” to label the variables. No values from these rows are used as inputs to the program, but they are helpful for reference.

  1. To run the program in Microsoft Excel 2007, click on Macros (Button on developer tab). BtResistance should be highlighted. Click on run. In earlier versions of excel, click on Run macro (Button on Visual Basic Toolbar). Bt resistance should be highlighted. Click on run. All output of the program is displayed on the worksheet “Output”. Note: the program automatically replaces old output. If you are in design mode the program will not work. You can exit design mode using button on Visual Basic Toolbar.

  2. On future use of the program, when you open Excel, it will ask you about Macros. Click “Enable Macros” upon opening Excel to use the program.

Troubleshooting

The most likely causes of errors are forgetting to include a variable in the worksheet “Input” or inputting values for variables that are out of range. The program will give an error message if population weighted mean fitness = 0, or if (BtWrr – BtWss) = 0 because this will result in division by 0.

Anticipated Results

Test the program by inputting values from Table 1 Supplementary Material of Tabashnik et al. [6] and comparing your output to the results in Fig. 2 of that paper. In general, expect resistance to evolve faster with increases in dominance of resistance (the fitness of heterozygotes on Bt crops; BtWrs) and the proportion of habitat occupied by Bt crops (PBt).

References

  1. James, C. Global status of commercialized biotech/GM crops: 2007. ISAAA Brief No. 37, International Service for the Acquisition of Agri-Biotech Applications, Ithaca, NY, USA (2007).
  • Tabashnik, B.E. Evolution of resistance to Bacillus thuringiensis. Annu. Rev. Entomol. 39, 47-94 (1994).
  • Tabashnik, B. E. et al. 2003. Insect resistance to transgenic Bt crops: lessons from the laboratory and field. J. Econ. Entomol. 96, 1031-1038 (2003).
  • Gould, F. Sustainability of transgenic insecticidal cultivars: integrating pest genetics and ecology. Annu. Rev. Entomol. 43, 701-726 (1998).
  • U.S. Environmental Protection Agency, The Environmental Protection Agency’s White Paper on Bt Plant-Pesticide Resistance Management (EPA Publication 739-S-98-001, 1998; www.epa.gov/EPA-PEST/1998/January/Day-14/paper.pdf
  • Tabashnik, B. E., Gassmann, A.J., Crowder, D.W. & Carrière, Y. Insect resistance to Bt crops: evidence versus theory. Nat. Biotech. 26, 199-202 (2008).

Acknowledgements

This work was supported by NRI, CSREES, USDA grant 2006-35302-17365.

Associated Publications

Insect resistance to Bt crops: evidence versus theory, Bruce E Tabashnik, Aaron J Gassmann, David W Crowder, and Yves Carriére, Nature Biotechnology 26 (2) 199 - 202 doi:10.1038/nbt1382

Author information

Bruce E. Tabashnik , David W. Crowder & Yves Carrière, Department of Entomology, University of Arizona

Correspondence to: Bruce E. Tabashnik ([email protected])

Source: Protocol Exchange (2008) doi:10.1038/nprot.2008.125. Originally published online 19 June 2008.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment