Repository navigation
R GWAS II: Install packages and software
- Go to https://www.cog-genomics.org/plink2 and download PLINK. It is an executable file so you don’t need to install it.
- Get a copy of the dataset gwas-data.ped, gwas-data.map and covs.txt from the USB stick provided at the exercise. Alternatively, get the bed/bim/fam files, they are smaller and contain the same information but in binary format. You can use PLINK to recode the binary files to the ped/map format later using the --recode command.
The example data includes SNP data from 168 individuals and about 730.000 SNPs.
The file gwas-data.map contains information about the SNP locations. Map-files always have the same structure:
- Chromosome in the first column
- SNP name in the second column
- Genetic distance (in centimorgan) in the third column
- Base pair position in the fourth column.
In GWAS the genetic distance can be set to 0 for all SNPs. In this case it is actually provided.
The gwas-data.ped stores all the genotypes (this file is big so don’t try to open it). The columns are:
- Family ID
- Individual ID
- Paternal ID
- Maternal II
- Sex (1=male, 2=Female)
- Phenotype
- Genotypes in the following columns (2 columns per SNP)
The file covs.txt stores two alternative phenotypes: a disease (categorical) trait c and a continuous (quantative) trait q. And some covariates. Open it in a text editor and see whats there.
To make the rest of the exercise a bit easier to work with you can copy the executable plink file into the folder where you store your data.
If you chose to copy the bed/bim/fam files from the USB you can get the ped/map files by running the command:
plink --bfile gwas-data --recode --out gwas-data
at the command line.