MGHome page

Module 6 · 8 steps

Association

Fit the additive logistic model and run the genome-wide association scan.

GWAS course

Course map

0 of 64 steps done

Start with step 0.1Install R

Saved in this browser only.

In this module

Before you start
You need the full checkpoint at step 5.7. The first code chunk checks the files that this module needs.
Where the module ends
The checkpoint at step 6.8.

The notebook is a Quarto file (.qmd). Open it in RStudio from the project folder.

At a glance

What you will do. You will test one genetic variant by hand, then test all variants with a statistical model. You will read the output, check a rare variant and save the results in a standard file.

What you will learn.

How long it takes. About 60 minutes. The slowest step is 6.4, where PLINK tests every variant.

Your progress: 0 of 8 steps done

Saved in this browser only. Nothing is sent anywhere.

Steps

  1. 6.1One variant by handCalculate a simple carrier odds ratio for one variant on an autosome (a non-sex chromosome).
  2. 6.2The additive logistic modelFit a logistic regression for one variant in R.
  3. 6.3Prepare covariatesJoin age and ten principal components (PCs) to the IDs of the retained samples.
  4. 6.4Run the association scanFit the additive logistic model, planned in advance, at every retained variant that PLINK can analyse.
  5. 6.5Read association outputFind the effect allele, the sample count, the uncertainty, the type of test and the fitting status in the output.
  6. 6.6Sparse genotypes and Firth correctionCompare an ordinary fit with a Firth fit that we force at one low-frequency autosomal variant.
  7. 6.7First look and association checkpointSummarise the valid tests.
  8. 6.8Create the summary statistics fileSave the results of the association scan in one clearly named file with standard columns.

Recap

  • You calculated a carrier odds ratio by hand and compared it with the odds ratio per allele from a logistic regression.
  • You built a covariate table for 1,811 samples with age and PC1 to PC10, and checked it.
  • You ran the association scan. The frequency check removed another 1,698 variants, which left 236,815 tests with finite p-values.
  • Eight variants had a p-value below 0.00000005. The leading regions are on chromosomes 9, 3 and 12.
  • The autosomal lambda is about 1.016.
  • You saved the results in a summary statistics file with eleven columns and a file that explains each column.

Next: Module 7 draws the QQ plot and the Manhattan plot, sets the thresholds, groups the correlated signals and reports the results.