To turn in:

  1. Import the map and ped files into R.  Find the code in Week 3 to convert the ped and map file into a gds file using the SNPRelate package.  Paste a summary of the gds output.
  2. The sixth column of your ped object is a vector of phenotypes, with 1 indicating control and 2 indicating case.  Determine the number of cases and controls in the study.
  3. Import the matrix containg the genotypes (i.e., number of alternative alleles) of the subjects at three disease SNPs.  Find and adapt the code to compute the allele frequency of each SNP.
  4. Estimate the odds ratio\[\text{OR}=\frac{P\left(\text{Allele} = 1\mid \text{Case}\right)P\left(\text{Allele} = 0\mid \text{Control}\right)}{P\left(\text{Allele} = 0\mid \text{Case}\right)P\left(\text{Allele} = 1\mid \text{Control}\right)}\]for each SNP by extracting the rows of the genotype matrix corresponding to cases and controls.
  5. From the following Manahattan plot
    Simulation Manhattan plot
    Simulation Mahattan plot
    discuss which SNPs you think were detected in the study.