8.16 GWAS of all SNPs with PLINK
Now let’s allow PLINK to run the statistical tests for all SNPs by removing the --snp
flag.
system(command = "./plink --file genotypes --linear --allow-no-sex --pheno GS451_IC50.txt --pheno-name GS451_IC50")
The plink.assoc.linear
file should now have ~260,000 lines. Load the file into R to look at the results:
results <- read.table(file = "plink.assoc.linear",
header = TRUE) %>%
# order table by lowest pvalue
arrange(P)
head(results)
## CHR SNP BP A1 TEST NMISS BETA STAT P
## 1 19 rs7257475 20372113 T ADD 88 -3.008 -6.876 9.311e-10
## 2 19 rs10413538 20370690 T ADD 86 -3.026 -6.805 1.395e-09
## 3 21 rs2826383 20844081 A ADD 166 3.031 5.866 2.392e-08
## 4 19 rs12972967 20358400 T ADD 89 -2.421 -5.939 5.760e-08
## 5 2 rs1358578 51626897 A ADD 166 2.111 5.307 3.571e-07
## 6 17 rs3094508 33137048 C ADD 89 3.532 5.230 1.156e-06