Total of 40 points
Download hapmap3 data in plink format from https://uchicago.box.com/s/84de60jj4j9nyhl7nc7lylk4fcq12eka
- (5 points) Check the population composition.
- (10 points) Test for Hardy Weinberg Equilibrium using all the populations using SNPs in chr22. Plot the qqplot.
- (10 points) Test for Hardy Weinberg Equilibrium using CEU, YRI, and CHB, ASW separately using SNPs in chr22. Plot the qqplot and interpret why they are different from 2.
- (10 points) Calculate principal components using chromosome 22.
- (5 points) Plot PC1 vs PC2 using different color for each population. Keep only CEU, YRI, ASW, and CHB before plotting.
Hint: you can borrow code with the appropriate modifications from https://hgen471.hakyimlab.org/post/2021/02/18/l6-population-structure/