Introduction

Population genetics is the study of genetic composition of the population and forces that cause changes in this composition. Simply, it is also the study of forces like mutation, migration, selection and drift. Before diving into details, there are some key concepts that we need to learn.

Allele: It is a variant form of a gene e.g. Avr3a gene in plant pathogen Phytophthora infestans have either E or K amino acid at position xx and either M or I at position xx. Isolates which have KI genotype initiate a hypersensitive response in R3a plants where isolates with EM genotype evade this recognition and cause disease on R3a plants. You can also say that, population genetics is about the alleles in the populations.

Locus (plural loci): Position in a genome where one or more alleles are segregating.

Genotype: Genotype is the combination of the alleles at a particular locus.

Di-allelic model: Model which assumes that there is only two alleles.

If an individual has same allele at a locus, we call that homozyogous individual e.g AA or aa If an individual has different allele at a locus, we call that heterozygous individual e.g Aa

Allele frequency: Frequency of copies of the allele in the population divided by total number of gene copies in the population.

Genotype frequency: Number of individuals of certain genotype divided by total number of individuals.

Problem 1

e.g. Lets look at a locus that carries two alleles, A and B. In diploids, we would observed three possible genotypes, two homozygous (AA and BB), and one heterozygous (AB). Lets say we found following genotype count, AA=38, AB=16, BB = 46. Calculate genotype frequency and allele frequency.**

first lets look at genotype freq

AA <-  38
AB <- 16
BB <- 46
N <- AA+AB+BB
  
AA_freq <- AA/N
AA_freq
## [1] 0.38
BB_freq <- BB/N
BB_freq
## [1] 0.46
AB_freq <- AB/N
AB_freq
## [1] 0.16

Now lets calculate allele freq

remember allele freq is frequency of copies of the allele in the population divided by total number of gene copies in the population.

For allele A and B

A <- 2*38 + 16
B <- 2*46 + 16
Gene_copies <- 200 ## why is this 200

allele_freq_A <- A/Gene_copies
allele_freq_B <- B/Gene_copies

allele_freq_A
## [1] 0.46
allele_freq_B
## [1] 0.54

Remember, we said that population genetics is about studying the changes in the allele frequency. Now if you ask, how these allele frequencies are going to change overtime, then you are in right path.