| tags: [ Genomic Data GWAS ] categories: [Coding Experiments ]

Annotating signficant GWAS hits

Introduction

The pedigree-based GWAS identified 9 heritable traits with significant hits (i.e. SNPs that pass genome-wide significance threshold, p < 1.84e-7). The number of significant hits within each trait highly varied. To identify the most robust hits, SNPs that pass the genome-wide signficance threshold would ideally have adjacent SNPs that pass the suggestive threshold. Therefore, I will attempt to filter the significant hits/loci based on the presence of significant (suggestive) SNPs.

Methods and Results

require(magrittr)
require(dplyr)
require(gaston)
require(qqman)

Load relevant data

nies_heritable_pheno <- read.csv('C:/Users/Martha/Documents/Honours/Project/honours.project/Data/nies_heritable_pheno.csv', header = T)

merged_nies_210818 <- read.bed.matrix("C:/Users/Martha/Documents/Honours/Project/honours.project/Data/merged_nies/merged_nies_geno_210818.bed")
## Reading C:/Users/Martha/Documents/Honours/Project/honours.project/Data/merged_nies/merged_nies_geno_210818.fam 
## Reading C:/Users/Martha/Documents/Honours/Project/honours.project/Data/merged_nies/merged_nies_geno_210818.bim 
## Reading C:/Users/Martha/Documents/Honours/Project/honours.project/Data/merged_nies/merged_nies_geno_210818.bed 
## ped stats and snps stats have been set. 
## 'p' has been set. 
## 'mu' and 'sigma' have been set.
merged_nies_GRM <- GRM(merged_nies_210818)
merged_nies_eiK <- eigen(merged_nies_GRM)
merged_nies_eiK$values[ merged_nies_eiK$values < 0] <- 0
merged_nies_PC <- sweep(merged_nies_eiK$vectors, 2, sqrt(merged_nies_eiK$values), "*")

1. Perform GWAS

r_kvalV_gwas <- association.test(merged_nies_210818, nies_heritable_pheno$R.K.value.V, method="lmm", test = "lrt", K = merged_nies_GRM, eigenK = merged_nies_eiK, p = 2)
r_kvalV_gwas <- na.omit(r_kvalV_gwas)
head(r_kvalV_gwas)
##   chr    pos          id A1 A2    freqA2        h2           LRT         p
## 1   1 590318   rs2808353  G  A 0.9855072 0.7605548  1.258239e-03 0.9717036
## 2   1 778897 rs138660747  A  C 0.9956522 0.7609519  1.877719e-02 0.8910072
## 3   1 783175  rs10751453  T  C 1.0000000 0.7608180  1.195986e-10 0.9999913
## 4   1 804046   rs3131973  A  G 1.0000000 0.7608180 -1.864464e-10 1.0000000
## 5   1 817186   rs3094315  G  A 0.8333333 0.7542221  6.438475e-01 0.4223210
## 6   1 833068  rs12562034  A  G 0.8695652 0.7608423  1.138512e-05 0.9973078
r_kvalV_filtered <- r_kvalV_gwas %>% filter(-log10(p)>1) %>% filter(freqA2 < 0.99)

2. Identify significant hits (passing genome-wide threshold)

r_kvalV_meff <- r_kvalV_filtered %>% filter(p < 1.84e-7)

head(r_kvalV_meff)
##   chr       pos         id A1 A2    freqA2        h2      LRT            p
## 1   1 205916931 rs60255052  C  T 0.9811594 0.6398584 34.38041 4.532633e-09
## 2   1 205920201 rs16856470  T  C 0.9811594 0.6398584 34.38041 4.532633e-09
## 3   1 205920404 rs16856473  A  G 0.9811594 0.6398584 34.38041 4.532633e-09
## 4   1 205936240  rs1473537  T  C 0.9739130 0.6448387 28.29076 1.043931e-07
## 5   4 119235738 rs78341058  A  T 0.9855072 0.6858759 28.47085 9.511997e-08
## 6   4 119240001 rs79063845  C  T 0.9855072 0.6858759 28.47085 9.511997e-08

113 SNPs pass genome-wide threshold.

3. Identify the most significant SNP per chromosome

r_kvalV_sig <- do.call(rbind, lapply(split(r_kvalV_meff,r_kvalV_meff$chr), function(x) {return(x[which.min(x$p),])}))

head(r_kvalV_sig)
##    chr       pos          id A1 A2    freqA2        h2      LRT
## 1    1 205920404  rs16856473  A  G 0.9811594 0.6398584 34.38041
## 4    4 119403429 rs112414671  A  G 0.9869565 0.6769095 30.96024
## 15  15  57746156 rs143347058  A  G 0.9898551 0.7970430 28.28088
##               p
## 1  4.532633e-09
## 4  2.633682e-08
## 15 1.049275e-07

3 SNPs are identified (chr 1, 4, 15).

4. Determine number of significant SNPs within 100kb of most significant hits

r_kvalV_res <- NULL
for (i in r_kvalV_sig$id) {
  snpID <- i
  snpCHR <- r_kvalV_filtered[r_kvalV_filtered$id == snpID,]$chr
  snpPOS <- r_kvalV_filtered[r_kvalV_filtered$id ==snpID,]$pos
  
  sig.peak <- r_kvalV_filtered %>%
    filter(chr == snpCHR) %>%
    filter(pos > snpPOS - 50000) %>%
    filter(pos < snpPOS + 50000) %>%
    filter(p < 1e-5)
  
  r_kvalV_res <- rbind(r_kvalV_res, sig.peak)
}

r_kvalV_res
##    chr       pos          id A1 A2    freqA2        h2      LRT
## 1    1 205916566  rs72752923  C  A 0.9782609 0.6943696 24.25721
## 2    1 205916729  rs16830364  G  A 0.9782609 0.6943696 24.25721
## 3    1 205916931  rs60255052  C  T 0.9811594 0.6398584 34.38041
## 4    1 205917041  rs60716530  C  T 0.9782609 0.6943696 24.25721
## 5    1 205917115  rs60644810  G  A 0.9782609 0.6943696 24.25721
## 6    1 205917248  rs35694044  A  T 0.9782609 0.6943696 24.25721
## 7    1 205917652  rs16830370  T  C 0.9782609 0.6943696 24.25721
## 8    1 205918853  rs16856462  C  T 0.9782609 0.6943696 24.25721
## 9    1 205919195  rs16856468  G  A 0.9782609 0.6943696 24.25721
## 10   1 205919303  rs60001177  T  C 0.9782609 0.6943696 24.25721
## 11   1 205919401  rs12723666  A  G 0.9782609 0.6943696 24.25721
## 12   1 205920201  rs16856470  T  C 0.9811594 0.6398584 34.38041
## 13   1 205920404  rs16856473  A  G 0.9811594 0.6398584 34.38041
## 14   1 205922403  rs68189466  G  A 0.9797101 0.6457784 26.64533
## 15   1 205922720  rs35648260  G  T 0.9797101 0.6457784 26.64533
## 16   1 205922775  rs35360452  G  T 0.9797101 0.6457784 26.64533
## 17   1 205925474  rs12727528  A  G 0.9797101 0.6457784 26.64533
## 18   1 205935183   rs1891309  G  A 0.9782609 0.6459447 23.46813
## 19   1 205935330   rs1891310  T  G 0.9782609 0.6459447 23.46813
## 20   1 205936240   rs1473537  T  C 0.9739130 0.6448387 28.29076
## 21   1 205942026  rs72752928  T  C 0.9782609 0.6459447 23.46813
## 22   1 205943691  rs66593238  T  C 0.9782609 0.6459447 23.46813
## 23   1 205944627   rs9438407  T  G 0.9782609 0.6459447 23.46813
## 24   1 205945388  rs12741299  T  C 0.9782609 0.6459447 23.46813
## 25   1 205946647  rs34265780  T  C 0.9782609 0.6459447 23.46813
## 26   4 119362510 rs112314510  A  G 0.9855072 0.6858759 28.47085
## 27   4 119362552 rs111968273  T  A 0.9855072 0.6858759 28.47085
## 28   4 119367677 rs113059419  A  G 0.9869565 0.6769095 30.96024
## 29   4 119372303 rs112760591  G  A 0.9855072 0.6858759 28.47085
## 30   4 119372480 rs111609258  C  G 0.9855072 0.6858759 28.47085
## 31   4 119378224 rs147602981  G  A 0.9855072 0.6858759 28.47085
## 32   4 119381167 rs143847948  A  C 0.9855072 0.6858759 28.47085
## 33   4 119390257 rs113224532  T  C 0.9855072 0.6858759 28.47085
## 34   4 119392279 rs117856633  C  A 0.9855072 0.6858759 28.47085
## 35   4 119398681 rs113825627  C  G 0.9855072 0.6858759 28.47085
## 36   4 119403429 rs112414671  A  G 0.9869565 0.6769095 30.96024
## 37   4 119404439 rs183181597  A  G 0.9855072 0.6858759 28.47085
## 38   4 119404927 rs113317707  C  A 0.9855072 0.6858759 28.47085
## 39   4 119408454 rs184703141  T  C 0.9855072 0.6858759 28.47085
## 40  15  57746156 rs143347058  A  G 0.9898551 0.7970430 28.28088
##               p
## 1  8.429104e-07
## 2  8.429104e-07
## 3  4.532633e-09
## 4  8.429104e-07
## 5  8.429104e-07
## 6  8.429104e-07
## 7  8.429104e-07
## 8  8.429104e-07
## 9  8.429104e-07
## 10 8.429104e-07
## 11 8.429104e-07
## 12 4.532633e-09
## 13 4.532633e-09
## 14 2.444408e-07
## 15 2.444408e-07
## 16 2.444408e-07
## 17 2.444408e-07
## 18 1.270004e-06
## 19 1.270004e-06
## 20 1.043931e-07
## 21 1.270004e-06
## 22 1.270004e-06
## 23 1.270004e-06
## 24 1.270004e-06
## 25 1.270004e-06
## 26 9.511997e-08
## 27 9.511997e-08
## 28 2.633682e-08
## 29 9.511997e-08
## 30 9.511997e-08
## 31 9.511997e-08
## 32 9.511997e-08
## 33 9.511997e-08
## 34 9.511997e-08
## 35 9.511997e-08
## 36 2.633682e-08
## 37 9.511997e-08
## 38 9.511997e-08
## 39 9.511997e-08
## 40 1.049275e-07

40 SNPs are identified. Supporting SNPs are present for peaks/index SNPs on chr 1 and 4, but not index SNP on chr 1. This suggests that “true” peak is present on chr 1 and 4, but not on chr 15.

5. Repeat filtering for 8 other significant traits

Component 8

pc8_gwas <- association.test(merged_nies_210818, nies_heritable_pheno$coord.Dim.8, method="lmm", test = "lrt", K = merged_nies_GRM, eigenK = merged_nies_eiK, p = 2)
pc8_gwas <- na.omit(pc8_gwas)
pc8_filtered <- pc8_gwas %>% filter(-log10(p)>1) %>% filter(freqA2 < 0.99)
pc8_meff <- pc8_filtered %>% filter(p < 1.84e-7)
pc8_sig <- do.call(rbind, lapply(split(pc8_meff,pc8_meff$chr), function(x) {return(x[which.min(x$p),])}))

pc8_res <- NULL
for (i in pc8_sig$id) {
  snpID <- i
  snpCHR <- pc8_filtered[pc8_filtered$id == snpID,]$chr
  snpPOS <- pc8_filtered[pc8_filtered$id ==snpID,]$pos
  
  sig.peak <- pc8_filtered %>%
    filter(chr == snpCHR) %>%
    filter(pos > snpPOS - 50000) %>%
    filter(pos < snpPOS + 50000) %>%
    filter(p < 1e-5)
  
  pc8_res <- rbind(pc8_res, sig.peak)
}

pc8_res
##   chr       pos         id A1 A2    freqA2        h2      LRT            p
## 1   9 108296877 rs10979308  A  T 0.8072464 0.1474737 21.75750 3.093782e-06
## 2   9 108299426  rs1885973  T  A 0.7768116 0.1112269 27.23573 1.800994e-07
## 3   9 108300235 rs10816656  G  A 0.7826087 0.1227419 24.32919 8.119906e-07
## 4   9 108302318  rs1407849  T  A 0.8057971 0.1476383 22.09787 2.590977e-06
## 5   9 108305442 rs16912866  G  A 0.7768116 0.1112269 27.23573 1.800994e-07
## 6   9 108305644 rs16912868  G  A 0.7768116 0.1112269 27.23573 1.800994e-07
## 7   9 108306203  rs1323384  A  C 0.8086957 0.1451738 21.23098 4.071293e-06
## 8   9 108307394  rs7030371  G  A 0.7768116 0.1112269 27.23573 1.800994e-07

8 SNPs pass genome-wide significance, 1 index SNP identified (chr 9), 7 SNPs support the index.

L ACD

l_acd_gwas <- association.test(merged_nies_210818, nies_heritable_pheno$L.AC.Depth, method="lmm", test = "lrt", K = merged_nies_GRM, eigenK = merged_nies_eiK, p = 2)
l_acd_gwas <- na.omit(l_acd_gwas)
l_acd_filtered <- l_acd_gwas %>% filter(-log10(p)>1) %>% filter(freqA2 < 0.99)
l_acd_meff <- l_acd_filtered %>% filter(p < 1.84e-7)
l_acd_sig <- do.call(rbind, lapply(split(l_acd_meff,l_acd_meff$chr), function(x) {return(x[which.min(x$p),])}))

l_acd_res <- NULL
for (i in l_acd_sig$id) {
  snpID <- i
  snpCHR <- l_acd_filtered[l_acd_filtered$id == snpID,]$chr
  snpPOS <- l_acd_filtered[l_acd_filtered$id ==snpID,]$pos
  
  sig.peak <- l_acd_filtered %>%
    filter(chr == snpCHR) %>%
    filter(pos > snpPOS - 50000) %>%
    filter(pos < snpPOS + 50000) %>%
    filter(p < 1e-5)
  
  l_acd_res <- rbind(l_acd_res, sig.peak)
}

l_acd_res
##   chr      pos         id A1 A2    freqA2         h2      LRT           p
## 1  11 87921800 rs17151049  C  T 0.9362319 0.09781317 32.60941 1.12668e-08

24 SNPs pass genome-wide significance, 1 index SNP identified (chr 11), no supporting SNPs.

L CDR

l_cdr_gwas <- association.test(merged_nies_210818, nies_heritable_pheno$L.CDR, method="lmm", test = "lrt", K = merged_nies_GRM, eigenK = merged_nies_eiK, p = 2)
l_cdr_gwas <- na.omit(l_cdr_gwas)
l_cdr_filtered <- l_cdr_gwas %>% filter(-log10(p)>1) %>% filter(freqA2 < 0.99)
l_cdr_meff <- l_cdr_filtered %>% filter(p < 1.84e-7)
l_cdr_sig <- do.call(rbind, lapply(split(l_cdr_meff,l_cdr_meff$chr), function(x) {return(x[which.min(x$p),])}))

l_cdr_res <- NULL
for (i in l_cdr_sig$id) {
  snpID <- i
  snpCHR <- l_cdr_filtered[l_cdr_filtered$id == snpID,]$chr
  snpPOS <- l_cdr_filtered[l_cdr_filtered$id ==snpID,]$pos
  
  sig.peak <- l_cdr_filtered %>%
    filter(chr == snpCHR) %>%
    filter(pos > snpPOS - 50000) %>%
    filter(pos < snpPOS + 50000) %>%
    filter(p < 1e-5)
  
  l_cdr_res <- rbind(l_cdr_res, sig.peak)
}

l_cdr_res
##   chr      pos          id A1 A2    freqA2        h2      LRT            p
## 1   4 52923518 rs115266839  A  G 0.9884058 0.6932395 29.62028 5.255231e-08
## 2  17 67425699 rs191190284  T  A 0.9869565 0.7451182 29.32129 6.131843e-08

2 SNPs pass genome-wide significance, 2 index SNPs identified (chr 4, 17), no supporting peaks

L K-value H

l_KvalH_gwas <- association.test(merged_nies_210818, nies_heritable_pheno$L.K.value.H, method="lmm", test = "lrt", K = merged_nies_GRM, eigenK = merged_nies_eiK, p = 2)
l_KvalH_gwas <- na.omit(l_KvalH_gwas)
l_kvalH_filtered <- l_KvalH_gwas %>% filter(-log10(p)>1) %>% filter(freqA2 < 0.99)
l_kvalH_meff <- l_kvalH_filtered %>% filter(p < 1.84e-7)
l_kvalH_sig <- do.call(rbind, lapply(split(l_kvalH_meff,l_kvalH_meff$chr), function(x) {return(x[which.min(x$p),])}))

l_kvalH_res <- NULL
for (i in l_kvalH_sig$id) {
  snpID <- i
  snpCHR <- l_kvalH_filtered[l_kvalH_filtered$id == snpID,]$chr
  snpPOS <- l_kvalH_filtered[l_kvalH_filtered$id ==snpID,]$pos
  
  sig.peak <- l_kvalH_filtered %>%
    filter(chr == snpCHR) %>%
    filter(pos > snpPOS - 50000) %>%
    filter(pos < snpPOS + 50000) %>%
    filter(p < 1e-5)
  
  l_kvalH_res <- rbind(l_kvalH_res, sig.peak)
}

l_kvalH_res
##    chr      pos          id A1 A2    freqA2         h2      LRT
## 1    2 32321350 rs148319856  C  A 0.9826087 0.22244002 33.29515
## 2    2 32367072 rs115270434  C  A 0.9855072 0.17567169 20.65630
## 3    3 77739700   rs1163757  A  G 0.9869565 0.03021585 32.17915
## 4    6 82442490 rs114928787  T  C 0.9855072 0.00000000 43.16564
## 5    6 82442833 rs116172930  C  A 0.9855072 0.00000000 43.16564
## 6    6 82443802  rs74436554  C  T 0.9855072 0.00000000 43.16564
## 7    6 82444791  rs78056249  C  G 0.9855072 0.00000000 43.16564
## 8    6 82445716  rs77941466  C  T 0.9855072 0.00000000 43.16564
## 9    6 82447004 rs116461493  T  C 0.9855072 0.00000000 43.16564
## 10   6 82447732  rs77666578  G  A 0.9855072 0.00000000 43.16564
## 11   6 82451563  rs75189229  A  G 0.9855072 0.00000000 43.16564
## 12   6 82453938 rs117178778  A  G 0.9855072 0.00000000 43.16564
## 13   6 82454058 rs116246536  T  G 0.9855072 0.00000000 43.16564
## 14   6 82454140  rs78427866  A  G 0.9855072 0.00000000 43.16564
## 15   6 82454380 rs147257041  A  G 0.9855072 0.00000000 43.16564
## 16   6 82454449 rs140711073  T  C 0.9855072 0.00000000 43.16564
## 17   6 82454505 rs142248448  T  C 0.9855072 0.00000000 43.16564
## 18   6 82454620 rs114442506  A  G 0.9855072 0.00000000 43.16564
## 19   6 82456537 rs145558293  A  G 0.9855072 0.00000000 43.16564
## 20   6 82458393  rs77391407  C  T 0.9855072 0.00000000 43.16564
## 21   6 82458546  rs77103853  G  C 0.9855072 0.00000000 43.16564
## 22   6 82459011 rs115096710  T  C 0.9855072 0.00000000 43.16564
## 23   6 82459713  rs77245672  G  C 0.9855072 0.00000000 43.16564
## 24   6 82459810  rs77599496  T  A 0.9855072 0.00000000 43.16564
## 25   6 82459890  rs77598967  G  A 0.9855072 0.00000000 43.16564
## 26   6 82460167 rs115847999  C  G 0.9855072 0.00000000 43.16564
## 27   6 82460379 rs116730626  G  A 0.9855072 0.00000000 43.16564
## 28   6 82460650 rs149355051  G  T 0.9855072 0.00000000 43.16564
## 29   6 82462126  rs76856243  T  C 0.9855072 0.00000000 43.16564
## 30   6 82462603   rs6933239  C  T 0.9855072 0.00000000 43.16564
## 31   6 82462992   rs6911216  A  C 0.9855072 0.00000000 43.16564
## 32   6 82465617   rs6928806  A  C 0.9855072 0.00000000 43.16564
## 33   6 82466574  rs74404091  C  T 0.9855072 0.00000000 43.16564
## 34   6 82466715  rs79358384  G  A 0.9855072 0.00000000 43.16564
## 35   6 82467200  rs77721025  A  C 0.9855072 0.00000000 43.16564
## 36   6 82467706 rs116423281  A  G 0.9855072 0.00000000 43.16564
## 37   6 82467953 rs142216660  T  C 0.9855072 0.00000000 43.16564
## 38   6 82467988 rs140099919  A  G 0.9855072 0.00000000 43.16564
## 39   6 82468668  rs78941585  G  A 0.9855072 0.00000000 43.16564
## 40   6 82468774  rs75228268  A  T 0.9855072 0.00000000 43.16564
## 41   6 82469116  rs77552654  T  A 0.9855072 0.00000000 43.16564
## 42   6 82470649 rs149706908  G  T 0.9855072 0.00000000 43.16564
## 43   6 82470651 rs144623191  T  C 0.9855072 0.00000000 43.16564
## 44   6 82470859 rs192614396  C  A 0.9855072 0.00000000 43.16564
## 45   6 82471119 rs151156468  C  T 0.9855072 0.00000000 43.16564
## 46   6 82471338 rs140554533  A  G 0.9855072 0.00000000 43.16564
## 47   6 82471381 rs150446760  C  G 0.9855072 0.00000000 43.16564
## 48   6 82471679 rs138339145  T  C 0.9855072 0.00000000 43.16564
## 49   6 82472140 rs142089466  T  C 0.9855072 0.00000000 43.16564
## 50   6 82473676 rs147151928  G  C 0.9855072 0.00000000 43.16564
## 51   6 82473679 rs140298049  C  T 0.9855072 0.00000000 43.16564
## 52   6 82473688 rs149655171  A  G 0.9855072 0.00000000 43.16564
## 53   6 82474468 rs146864360  T  C 0.9855072 0.00000000 43.16564
## 54   6 82474648 rs140520501  C  T 0.9855072 0.00000000 43.16564
## 55   6 82474867 rs150394443  T  C 0.9855072 0.00000000 43.16564
## 56   6 82475320 rs143579868  A  T 0.9855072 0.00000000 43.16564
## 57   6 82475696 rs115741750  C  T 0.9855072 0.00000000 43.16564
## 58   6 82477810  rs77406497  T  C 0.9855072 0.00000000 43.16564
## 59   6 82478378 rs115813741  T  G 0.9855072 0.00000000 43.16564
## 60   6 82478650  rs78900243  G  A 0.9855072 0.00000000 43.16564
## 61   6 82478870  rs76557363  T  G 0.9855072 0.00000000 43.16564
## 62   6 82479264  rs77943130  T  G 0.9855072 0.00000000 43.16564
## 63   6 82479546 rs115245280  A  G 0.9855072 0.00000000 43.16564
## 64   6 82479664  rs75910615  A  G 0.9855072 0.00000000 43.16564
## 65   6 82480370  rs76438934  A  G 0.9855072 0.00000000 43.16564
## 66   6 82481986 rs115034961  A  C 0.9855072 0.00000000 43.16564
## 67   6 82482183  rs79967481  G  A 0.9855072 0.00000000 43.16564
## 68   6 82482254 rs116699765  T  C 0.9855072 0.00000000 43.16564
## 69   6 82483125  rs78639250  T  C 0.9855072 0.00000000 43.16564
## 70   6 82483522  rs75763492  A  G 0.9855072 0.00000000 43.16564
## 71   6 82483898  rs76617768  T  C 0.9855072 0.00000000 43.16564
## 72   6 82484287  rs76652063  C  A 0.9855072 0.00000000 43.16564
## 73   6 82484758 rs114024754  A  G 0.9855072 0.00000000 43.16564
## 74   6 82485370  rs79031996  C  G 0.9855072 0.00000000 43.16564
## 75   6 82485916  rs77517398  C  T 0.9855072 0.00000000 43.16564
## 76   6 82486863  rs80252551  A  T 0.9855072 0.00000000 43.16564
## 77   6 82488997 rs114963095  G  T 0.9855072 0.00000000 43.16564
## 78   6 82489053  rs77561386  C  T 0.9855072 0.00000000 43.16564
## 79   6 82489164  rs76602861  A  G 0.9855072 0.00000000 43.16564
## 80   6 82490178  rs79435750  A  G 0.9855072 0.00000000 43.16564
## 81   6 82490367  rs80347071  C  G 0.9855072 0.00000000 43.16564
## 82   6 82492170  rs74785531  C  T 0.9855072 0.00000000 43.16564
## 83   6 82492233  rs74361967  C  T 0.9855072 0.00000000 43.16564
## 84   6 82492321  rs75373608  A  T 0.9855072 0.00000000 43.16564
## 85  10 64099069  rs74804993  G  A 0.9826087 0.27726310 31.54649
## 86  16 13935176   rs1800067  A  G 0.9550725 0.29435196 33.85516
##               p
## 1  7.917990e-09
## 2  5.495605e-06
## 3  1.405911e-08
## 4  5.029621e-11
## 5  5.029621e-11
## 6  5.029621e-11
## 7  5.029621e-11
## 8  5.029621e-11
## 9  5.029621e-11
## 10 5.029621e-11
## 11 5.029621e-11
## 12 5.029621e-11
## 13 5.029621e-11
## 14 5.029621e-11
## 15 5.029621e-11
## 16 5.029621e-11
## 17 5.029621e-11
## 18 5.029621e-11
## 19 5.029621e-11
## 20 5.029621e-11
## 21 5.029621e-11
## 22 5.029621e-11
## 23 5.029621e-11
## 24 5.029621e-11
## 25 5.029621e-11
## 26 5.029621e-11
## 27 5.029621e-11
## 28 5.029621e-11
## 29 5.029621e-11
## 30 5.029621e-11
## 31 5.029621e-11
## 32 5.029621e-11
## 33 5.029621e-11
## 34 5.029621e-11
## 35 5.029621e-11
## 36 5.029621e-11
## 37 5.029621e-11
## 38 5.029621e-11
## 39 5.029621e-11
## 40 5.029621e-11
## 41 5.029621e-11
## 42 5.029621e-11
## 43 5.029621e-11
## 44 5.029621e-11
## 45 5.029621e-11
## 46 5.029621e-11
## 47 5.029621e-11
## 48 5.029621e-11
## 49 5.029621e-11
## 50 5.029621e-11
## 51 5.029621e-11
## 52 5.029621e-11
## 53 5.029621e-11
## 54 5.029621e-11
## 55 5.029621e-11
## 56 5.029621e-11
## 57 5.029621e-11
## 58 5.029621e-11
## 59 5.029621e-11
## 60 5.029621e-11
## 61 5.029621e-11
## 62 5.029621e-11
## 63 5.029621e-11
## 64 5.029621e-11
## 65 5.029621e-11
## 66 5.029621e-11
## 67 5.029621e-11
## 68 5.029621e-11
## 69 5.029621e-11
## 70 5.029621e-11
## 71 5.029621e-11
## 72 5.029621e-11
## 73 5.029621e-11
## 74 5.029621e-11
## 75 5.029621e-11
## 76 5.029621e-11
## 77 5.029621e-11
## 78 5.029621e-11
## 79 5.029621e-11
## 80 5.029621e-11
## 81 5.029621e-11
## 82 5.029621e-11
## 83 5.029621e-11
## 84 5.029621e-11
## 85 1.947216e-08
## 86 5.937145e-09

147 SNPs pass genome-wide significance, 5 index SNPs identified (chr 2, 3,6, 10, 16), supporting SNPs identified for index SNPs on chr 2 and 6.

Component 3

pc3_gwas <- association.test(merged_nies_210818, nies_heritable_pheno$coord.Dim.3, method="lmm", test = "lrt", K = merged_nies_GRM, eigenK = merged_nies_eiK, p = 2)
pc3_gwas <- na.omit(pc3_gwas)
pc3_filtered <- pc3_gwas %>% filter(-log10(p)>1) %>% filter(freqA2 < 0.99)
pc3_meff <- pc3_filtered %>% filter(p < 1.84e-7)
pc3_sig <- do.call(rbind, lapply(split(pc3_meff,pc3_meff$chr), function(x) {return(x[which.min(x$p),])}))

pc3_res <- NULL
for (i in pc3_sig$id) {
  snpID <- i
  snpCHR <- pc3_filtered[pc3_filtered$id == snpID,]$chr
  snpPOS <- pc3_filtered[pc3_filtered$id ==snpID,]$pos
  
  sig.peak <- pc3_filtered %>%
    filter(chr == snpCHR) %>%
    filter(pos > snpPOS - 50000) %>%
    filter(pos < snpPOS + 50000) %>%
    filter(p < 1e-5)
  
  pc3_res <- rbind(pc3_res, sig.peak)
}

pc3_res
##     chr       pos          id A1 A2    freqA2         h2      LRT
## 1     1 205916566  rs72752923  C  A 0.9782609 0.10018393 32.70563
## 2     1 205916729  rs16830364  G  A 0.9782609 0.10018393 32.70563
## 3     1 205916931  rs60255052  C  T 0.9811594 0.06871623 39.43647
## 4     1 205917041  rs60716530  C  T 0.9782609 0.10018393 32.70563
## 5     1 205917115  rs60644810  G  A 0.9782609 0.10018393 32.70563
## 6     1 205917248  rs35694044  A  T 0.9782609 0.10018393 32.70563
## 7     1 205917652  rs16830370  T  C 0.9782609 0.10018393 32.70563
## 8     1 205918853  rs16856462  C  T 0.9782609 0.10018393 32.70563
## 9     1 205919195  rs16856468  G  A 0.9782609 0.10018393 32.70563
## 10    1 205919303  rs60001177  T  C 0.9782609 0.10018393 32.70563
## 11    1 205919401  rs12723666  A  G 0.9782609 0.10018393 32.70563
## 12    1 205920201  rs16856470  T  C 0.9811594 0.06871623 39.43647
## 13    1 205920404  rs16856473  A  G 0.9811594 0.06871623 39.43647
## 14    1 205922403  rs68189466  G  A 0.9797101 0.07135981 40.62325
## 15    1 205922720  rs35648260  G  T 0.9797101 0.07135981 40.62325
## 16    1 205922775  rs35360452  G  T 0.9797101 0.07135981 40.62325
## 17    1 205925474  rs12727528  A  G 0.9797101 0.07135981 40.62325
## 18    1 205935183   rs1891309  G  A 0.9782609 0.06871632 34.26420
## 19    1 205935330   rs1891310  T  G 0.9782609 0.06871632 34.26420
## 20    1 205936240   rs1473537  T  C 0.9739130 0.10624855 27.50857
## 21    1 205942026  rs72752928  T  C 0.9782609 0.06871632 34.26420
## 22    1 205943691  rs66593238  T  C 0.9782609 0.06871632 34.26420
## 23    1 205944627   rs9438407  T  G 0.9782609 0.06871632 34.26420
## 24    1 205945388  rs12741299  T  C 0.9782609 0.06871632 34.26420
## 25    1 205946647  rs34265780  T  C 0.9782609 0.06871632 34.26420
## 26    2  85686354   rs6759832  C  T 0.9884058 0.14207905 36.56416
## 27    3  42006157  rs71315517  G  C 0.9869565 0.06803235 36.98345
## 28    4 119362510 rs112314510  A  G 0.9855072 0.07448922 41.35203
## 29    4 119362552 rs111968273  T  A 0.9855072 0.07448922 41.35203
## 30    4 119367677 rs113059419  A  G 0.9869565 0.04972603 45.15567
## 31    4 119372303 rs112760591  G  A 0.9855072 0.07448922 41.35203
## 32    4 119372480 rs111609258  C  G 0.9855072 0.07448922 41.35203
## 33    4 119378224 rs147602981  G  A 0.9855072 0.07448922 41.35203
## 34    4 119381167 rs143847948  A  C 0.9855072 0.07448922 41.35203
## 35    4 119390257 rs113224532  T  C 0.9855072 0.07448922 41.35203
## 36    4 119392279 rs117856633  C  A 0.9855072 0.07448922 41.35203
## 37    4 119398681 rs113825627  C  G 0.9855072 0.07448922 41.35203
## 38    4 119403429 rs112414671  A  G 0.9869565 0.04972603 45.15567
## 39    4 119403485 rs185357281  A  G 0.9869565 0.06942631 28.75451
## 40    4 119404439 rs183181597  A  G 0.9855072 0.07448922 41.35203
## 41    4 119404927 rs113317707  C  A 0.9855072 0.07448922 41.35203
## 42    4 119408454 rs184703141  T  C 0.9855072 0.07448922 41.35203
## 43    5  25293191 rs138955515  A  G 0.9855072 0.07868229 31.90296
## 44    5  25300269 rs140158697  C  T 0.9855072 0.07868229 31.90296
## 45    5  25331088 rs114133913  T  A 0.9855072 0.07868229 31.90296
## 46    8  80306741 rs111864836  G  T 0.9884058 0.10992188 30.94734
## 47    8  80306859 rs113627660  G  C 0.9884058 0.10992188 30.94734
## 48    8  80307293   rs7845792  A  G 0.9884058 0.10992188 30.94734
## 49    8  80307388   rs7845575  G  A 0.9869565 0.12264506 24.21587
## 50    8  80307700 rs114654811  C  T 0.9884058 0.10992188 30.94734
## 51    8  80307701 rs115278078  A  T 0.9884058 0.10992188 30.94734
## 52    8  80307837  rs79018076  T  C 0.9884058 0.10992188 30.94734
## 53    8  80308098 rs112501384  G  C 0.9884058 0.10992188 30.94734
## 54    8  80309305  rs11996376  A  G 0.9884058 0.10992188 30.94734
## 55    8  80309598  rs79431653  C  G 0.9884058 0.10992188 30.94734
## 56    8  80309626  rs11996450  T  C 0.9884058 0.10992188 30.94734
## 57    8  80310193  rs60741023  C  G 0.9884058 0.10992188 30.94734
## 58    8  80310485   rs7844286  C  T 0.9884058 0.10992188 30.94734
## 59    8  80310716   rs7844696  A  T 0.9884058 0.10992188 30.94734
## 60    8  80310720   rs7826434  G  A 0.9884058 0.10992188 30.94734
## 61    8  80311242  rs80031189  C  T 0.9884058 0.10992188 30.94734
## 62    8  80311252 rs113823684  A  G 0.9884058 0.10992188 30.94734
## 63    8  80311329 rs142907856  A  G 0.9884058 0.10992188 30.94734
## 64    8  80311457 rs112582272  A  G 0.9884058 0.10992188 30.94734
## 65    8  80311580 rs116773209  G  A 0.9884058 0.10992188 30.94734
## 66    8  80311736 rs113314270  G  T 0.9884058 0.10992188 30.94734
## 67    8  80311838 rs117693425  A  G 0.9884058 0.10992188 30.94734
## 68    8  80312291  rs11988873  C  T 0.9884058 0.10992188 30.94734
## 69    8  80312345  rs11988904  A  T 0.9884058 0.10992188 30.94734
## 70    8  80312623  rs36051398  A  C 0.9884058 0.10992188 30.94734
## 71    8  80313751 rs114426401  T  C 0.9884058 0.10992188 30.94734
## 72    8  80314228  rs74981396  G  A 0.9884058 0.10992188 30.94734
## 73    8  80317028  rs11998344  T  G 0.9884058 0.10992188 30.94734
## 74    8  80317208 rs113244900  C  T 0.9884058 0.10992188 30.94734
## 75    8  80318583  rs57246091  A  G 0.9884058 0.10992188 30.94734
## 76    8  80318643 rs113901603  G  A 0.9884058 0.10992188 30.94734
## 77    8  80319691 rs113718590  A  G 0.9884058 0.10992188 30.94734
## 78    8  80320713  rs11987997  A  G 0.9884058 0.10992188 30.94734
## 79    8  80321002 rs111527437  T  A 0.9884058 0.10992188 30.94734
## 80    8  80321694 rs112815920  G  C 0.9884058 0.10992188 30.94734
## 81    8  80323890  rs11998156  C  A 0.9884058 0.10992188 30.94734
## 82    8  80323964  rs16907573  G  A 0.9884058 0.10992188 30.94734
## 83    8  80324156 rs111257240  C  T 0.9884058 0.10992188 30.94734
## 84    8  80325047 rs113437388  T  C 0.9884058 0.10992188 30.94734
## 85    8  80326033 rs111370206  G  A 0.9884058 0.10992188 30.94734
## 86    8  80326935 rs147955676  A  G 0.9884058 0.10992188 30.94734
## 87    8  80327442   rs7841095  C  T 0.9884058 0.10992188 30.94734
## 88    8  80327549   rs7822828  C  A 0.9884058 0.10992188 30.94734
## 89    8  80327732   rs7823481  C  G 0.9884058 0.10992188 30.94734
## 90    8  80328450  rs11990649  A  G 0.9884058 0.10992188 30.94734
## 91    8  80329801  rs56960849  A  G 0.9884058 0.10992188 30.94734
## 92    8  80330197  rs11995624  C  T 0.9884058 0.10992188 30.94734
## 93    8  80330467   rs7837761  A  G 0.9869565 0.12264506 24.21587
## 94    8  80332180 rs113042618  T  C 0.9884058 0.10992188 30.94734
## 95    8  80332423   rs7001142  G  T 0.9884058 0.10992188 30.94734
## 96    8  80332520   rs6980915  G  A 0.9884058 0.10992188 30.94734
## 97    8  80332901   rs6473220  T  C 0.9884058 0.10992188 30.94734
## 98    8  80332907   rs6473221  A  G 0.9884058 0.10992188 30.94734
## 99    8  80333316   rs7835862  C  T 0.9884058 0.10992188 30.94734
## 100   8  80333340   rs7817696  A  G 0.9884058 0.10992188 30.94734
## 101   8  80333506   rs7817634  T  C 0.9884058 0.10992188 30.94734
## 102   8  80333599  rs57419267  C  T 0.9884058 0.10992188 30.94734
## 103   8  80333823  rs59130219  C  T 0.9884058 0.10992188 30.94734
## 104   8  80334098  rs73691385  T  A 0.9884058 0.10992188 30.94734
## 105   8  80334328   rs7840559  C  T 0.9884058 0.10992188 30.94734
## 106   8  80334334   rs7822177  G  A 0.9884058 0.10992188 30.94734
## 107   8  80334582 rs111631456  A  G 0.9884058 0.10992188 30.94734
## 108   8  80334982  rs58109903  T  C 0.9884058 0.10992188 30.94734
## 109   8  80335583  rs73691388  G  A 0.9884058 0.10992188 30.94734
## 110   8  80336124   rs7837108  T  C 0.9884058 0.10992188 30.94734
## 111   8  80336300   rs7840857  T  G 0.9884058 0.10992188 30.94734
## 112   8  80336310   rs7840861  T  G 0.9884058 0.10992188 30.94734
## 113   8  80337292 rs111888115  T  C 0.9884058 0.10992188 30.94734
## 114   8  80337308  rs56871558  T  C 0.9884058 0.10992188 30.94734
## 115   8  80337408  rs56116331  A  G 0.9884058 0.10992188 30.94734
## 116   8  80337443  rs58592997  T  C 0.9884058 0.10992188 30.94734
## 117   8  80337629  rs76783901  A  G 0.9884058 0.10992188 30.94734
## 118   8  80337634  rs74468856  G  A 0.9884058 0.10992188 30.94734
## 119   8  80337985  rs73691394  C  A 0.9884058 0.10992188 30.94734
## 120   8  80338076  rs73691395  T  C 0.9884058 0.10992188 30.94734
## 121   8  80338219  rs73691397  C  G 0.9884058 0.10992188 30.94734
## 122   8  80338255  rs73691398  G  A 0.9884058 0.10992188 30.94734
## 123   8  80338835  rs58958046  A  G 0.9884058 0.10992188 30.94734
## 124   8  80338910  rs58786240  C  T 0.9884058 0.10992188 30.94734
## 125   8  80338955  rs76867788  C  T 0.9884058 0.10992188 30.94734
## 126   8  80339017  rs73691399  T  C 0.9884058 0.10992188 30.94734
## 127   8  80339217  rs73691400  C  G 0.9884058 0.10992188 30.94734
## 128   8  80339959  rs61233095  C  A 0.9884058 0.10992188 30.94734
## 129   8  80340238  rs56408864  A  T 0.9884058 0.10992188 30.94734
## 130   8  80340749   rs7826667  A  G 0.9884058 0.10992188 30.94734
## 131   8  80341236   rs7000592  G  C 0.9884058 0.10992188 30.94734
## 132  12   5987972 rs142100550  T  G 0.9884058 0.06670431 28.13313
## 133  14  77833818 rs146124823  G  A 0.9898551 0.14932850 29.35113
##                p
## 1   1.072260e-08
## 2   1.072260e-08
## 3   3.389072e-10
## 4   1.072260e-08
## 5   1.072260e-08
## 6   1.072260e-08
## 7   1.072260e-08
## 8   1.072260e-08
## 9   1.072260e-08
## 10  1.072260e-08
## 11  1.072260e-08
## 12  3.389072e-10
## 13  3.389072e-10
## 14  1.845969e-10
## 15  1.845969e-10
## 16  1.845969e-10
## 17  1.845969e-10
## 18  4.811508e-09
## 19  4.811508e-09
## 20  1.563996e-07
## 21  4.811508e-09
## 22  4.811508e-09
## 23  4.811508e-09
## 24  4.811508e-09
## 25  4.811508e-09
## 26  1.477230e-09
## 27  1.191362e-09
## 28  1.271391e-10
## 29  1.271391e-10
## 30  1.819783e-11
## 31  1.271391e-10
## 32  1.271391e-10
## 33  1.271391e-10
## 34  1.271391e-10
## 35  1.271391e-10
## 36  1.271391e-10
## 37  1.271391e-10
## 38  1.819783e-11
## 39  8.215837e-08
## 40  1.271391e-10
## 41  1.271391e-10
## 42  1.271391e-10
## 43  1.620700e-08
## 44  1.620700e-08
## 45  1.620700e-08
## 46  2.651253e-08
## 47  2.651253e-08
## 48  2.651253e-08
## 49  8.611958e-07
## 50  2.651253e-08
## 51  2.651253e-08
## 52  2.651253e-08
## 53  2.651253e-08
## 54  2.651253e-08
## 55  2.651253e-08
## 56  2.651253e-08
## 57  2.651253e-08
## 58  2.651253e-08
## 59  2.651253e-08
## 60  2.651253e-08
## 61  2.651253e-08
## 62  2.651253e-08
## 63  2.651253e-08
## 64  2.651253e-08
## 65  2.651253e-08
## 66  2.651253e-08
## 67  2.651253e-08
## 68  2.651253e-08
## 69  2.651253e-08
## 70  2.651253e-08
## 71  2.651253e-08
## 72  2.651253e-08
## 73  2.651253e-08
## 74  2.651253e-08
## 75  2.651253e-08
## 76  2.651253e-08
## 77  2.651253e-08
## 78  2.651253e-08
## 79  2.651253e-08
## 80  2.651253e-08
## 81  2.651253e-08
## 82  2.651253e-08
## 83  2.651253e-08
## 84  2.651253e-08
## 85  2.651253e-08
## 86  2.651253e-08
## 87  2.651253e-08
## 88  2.651253e-08
## 89  2.651253e-08
## 90  2.651253e-08
## 91  2.651253e-08
## 92  2.651253e-08
## 93  8.611958e-07
## 94  2.651253e-08
## 95  2.651253e-08
## 96  2.651253e-08
## 97  2.651253e-08
## 98  2.651253e-08
## 99  2.651253e-08
## 100 2.651253e-08
## 101 2.651253e-08
## 102 2.651253e-08
## 103 2.651253e-08
## 104 2.651253e-08
## 105 2.651253e-08
## 106 2.651253e-08
## 107 2.651253e-08
## 108 2.651253e-08
## 109 2.651253e-08
## 110 2.651253e-08
## 111 2.651253e-08
## 112 2.651253e-08
## 113 2.651253e-08
## 114 2.651253e-08
## 115 2.651253e-08
## 116 2.651253e-08
## 117 2.651253e-08
## 118 2.651253e-08
## 119 2.651253e-08
## 120 2.651253e-08
## 121 2.651253e-08
## 122 2.651253e-08
## 123 2.651253e-08
## 124 2.651253e-08
## 125 2.651253e-08
## 126 2.651253e-08
## 127 2.651253e-08
## 128 2.651253e-08
## 129 2.651253e-08
## 130 2.651253e-08
## 131 2.651253e-08
## 132 1.132505e-07
## 133 6.038130e-08

245 SNPs pass genome-wide significance, 8 index SNPs identified (chr 1-5, 8, 12, 14), supporting SNPs are present for index on chr 1, 4, 5, 8.

R ACD

r_acd_gwas <- association.test(merged_nies_210818, nies_heritable_pheno$R.AC.Depth, method="lmm", test = "lrt", K = merged_nies_GRM, eigenK = merged_nies_eiK, p = 2)
r_acd_gwas <- na.omit(r_acd_gwas)
r_acd_filtered <- r_acd_gwas %>% filter(-log10(p)>1) %>% filter(freqA2 < 0.99)
r_acd_meff <- r_acd_filtered %>% filter(p < 1.84e-7)
r_acd_sig <- do.call(rbind, lapply(split(r_acd_meff,r_acd_meff$chr), function(x) {return(x[which.min(x$p),])}))

r_acd_res <- NULL
for (i in r_acd_sig$id) {
  snpID <- i
  snpCHR <- r_acd_filtered[r_acd_filtered$id == snpID,]$chr
  snpPOS <- r_acd_filtered[r_acd_filtered$id ==snpID,]$pos
  
  sig.peak <- r_acd_filtered %>%
    filter(chr == snpCHR) %>%
    filter(pos > snpPOS - 50000) %>%
    filter(pos < snpPOS + 50000) %>%
    filter(p < 1e-5)
  
  r_acd_res <- rbind(r_acd_res, sig.peak)
}

r_acd_res
##   chr      pos         id A1 A2    freqA2         h2      LRT           p
## 1  11 87921800 rs17151049  C  T 0.9362319 0.05135354 33.25732 8.07353e-09

1 SNP passed genome-wide significance, which is the index SNP, and no supporting SNPs are present.

R Cyl Pre-dilate

r_cyl_gwas <- association.test(merged_nies_210818, nies_heritable_pheno$R.Cyl..pre.dilate, method="lmm", test = "lrt", K = merged_nies_GRM, eigenK = merged_nies_eiK, p = 2)
r_cyl_gwas <- na.omit(r_cyl_gwas)
r_cyl_filtered <- r_cyl_gwas %>% filter(-log10(p)>1) %>% filter(freqA2 < 0.99)
r_cyl_meff <- r_cyl_filtered %>% filter(p < 1.84e-7)
r_cyl_sig <- do.call(rbind, lapply(split(r_cyl_meff,r_cyl_meff$chr), function(x) {return(x[which.min(x$p),])}))

r_cyl_res <- NULL
for (i in r_cyl_sig$id) {
  snpID <- i
  snpCHR <- r_cyl_filtered[r_cyl_filtered$id == snpID,]$chr
  snpPOS <- r_cyl_filtered[r_cyl_filtered$id ==snpID,]$pos
  
  sig.peak <- r_cyl_filtered %>%
    filter(chr == snpCHR) %>%
    filter(pos > snpPOS - 50000) %>%
    filter(pos < snpPOS + 50000) %>%
    filter(p < 1e-5)
  
  r_cyl_res <- rbind(r_cyl_res, sig.peak)
}

r_cyl_res
##     chr       pos          id A1 A2    freqA2        h2      LRT
## 1     1 205916566  rs72752923  C  A 0.9782609 0.3590877 38.66094
## 2     1 205916729  rs16830364  G  A 0.9782609 0.3590877 38.66094
## 3     1 205916931  rs60255052  C  T 0.9811594 0.3024487 45.24602
## 4     1 205917041  rs60716530  C  T 0.9782609 0.3590877 38.66094
## 5     1 205917115  rs60644810  G  A 0.9782609 0.3590877 38.66094
## 6     1 205917248  rs35694044  A  T 0.9782609 0.3590877 38.66094
## 7     1 205917652  rs16830370  T  C 0.9782609 0.3590877 38.66094
## 8     1 205918853  rs16856462  C  T 0.9782609 0.3590877 38.66094
## 9     1 205919195  rs16856468  G  A 0.9782609 0.3590877 38.66094
## 10    1 205919303  rs60001177  T  C 0.9782609 0.3590877 38.66094
## 11    1 205919401  rs12723666  A  G 0.9782609 0.3590877 38.66094
## 12    1 205920201  rs16856470  T  C 0.9811594 0.3024487 45.24602
## 13    1 205920404  rs16856473  A  G 0.9811594 0.3024487 45.24602
## 14    1 205922403  rs68189466  G  A 0.9797101 0.3328177 44.03053
## 15    1 205922720  rs35648260  G  T 0.9797101 0.3328177 44.03053
## 16    1 205922775  rs35360452  G  T 0.9797101 0.3328177 44.03053
## 17    1 205925474  rs12727528  A  G 0.9797101 0.3328177 44.03053
## 18    1 205935183   rs1891309  G  A 0.9782609 0.3509032 38.14269
## 19    1 205935330   rs1891310  T  G 0.9782609 0.3509032 38.14269
## 20    1 205936240   rs1473537  T  C 0.9739130 0.3988371 31.58795
## 21    1 205942026  rs72752928  T  C 0.9782609 0.3509032 38.14269
## 22    1 205943691  rs66593238  T  C 0.9782609 0.3509032 38.14269
## 23    1 205944627   rs9438407  T  G 0.9782609 0.3509032 38.14269
## 24    1 205945388  rs12741299  T  C 0.9782609 0.3509032 38.14269
## 25    1 205946647  rs34265780  T  C 0.9782609 0.3509032 38.14269
## 26    2  22752117  rs72793052  C  T 0.9768116 0.3145422 46.82150
## 27    2  22759734  rs72793060  C  G 0.9579710 0.4074121 29.26252
## 28    2  22763823  rs72793066  T  C 0.9579710 0.4074121 29.26252
## 29    2  22764837  rs72793070  C  G 0.9579710 0.4074121 29.26252
## 30    2  22770868   rs4353679  C  T 0.9579710 0.4074121 29.26252
## 31    2  22771019   rs4343495  T  C 0.9579710 0.4074121 29.26252
## 32    2  22778013  rs72793089  A  T 0.9579710 0.4074121 29.26252
## 33    2  22780281  rs10187240  C  T 0.9579710 0.4074121 29.26252
## 34    2  22786683  rs72794813  C  T 0.9579710 0.4074121 29.26252
## 35    2  22792883   rs6719784  T  A 0.9579710 0.4074121 29.26252
## 36    3  42006157  rs71315517  G  C 0.9869565 0.3205628 32.90971
## 37    4 119362510 rs112314510  A  G 0.9855072 0.2827593 55.28065
## 38    4 119362552 rs111968273  T  A 0.9855072 0.2827593 55.28065
## 39    4 119367677 rs113059419  A  G 0.9869565 0.2209770 60.08399
## 40    4 119372303 rs112760591  G  A 0.9855072 0.2827593 55.28065
## 41    4 119372480 rs111609258  C  G 0.9855072 0.2827593 55.28065
## 42    4 119378224 rs147602981  G  A 0.9855072 0.2827593 55.28065
## 43    4 119381167 rs143847948  A  C 0.9855072 0.2827593 55.28065
## 44    4 119390257 rs113224532  T  C 0.9855072 0.2827593 55.28065
## 45    4 119392279 rs117856633  C  A 0.9855072 0.2827593 55.28065
## 46    4 119398681 rs113825627  C  G 0.9855072 0.2827593 55.28065
## 47    4 119403429 rs112414671  A  G 0.9869565 0.2209770 60.08399
## 48    4 119403485 rs185357281  A  G 0.9869565 0.3262477 34.30287
## 49    4 119404439 rs183181597  A  G 0.9855072 0.2827593 55.28065
## 50    4 119404927 rs113317707  C  A 0.9855072 0.2827593 55.28065
## 51    4 119408454 rs184703141  T  C 0.9855072 0.2827593 55.28065
## 52    5  33168945 rs113442983  T  C 0.9898551 0.4220320 61.41397
## 53    7 150609580  rs12668363  C  T 0.9869565 0.4435804 36.99348
## 54    8  80306741 rs111864836  G  T 0.9884058 0.3773594 39.14554
## 55    8  80306859 rs113627660  G  C 0.9884058 0.3773594 39.14554
## 56    8  80306990   rs7825643  G  T 0.9724638 0.5238540 19.63518
## 57    8  80307293   rs7845792  A  G 0.9884058 0.3773594 39.14554
## 58    8  80307388   rs7845575  G  A 0.9869565 0.3990852 33.19626
## 59    8  80307700 rs114654811  C  T 0.9884058 0.3773594 39.14554
## 60    8  80307701 rs115278078  A  T 0.9884058 0.3773594 39.14554
## 61    8  80307837  rs79018076  T  C 0.9884058 0.3773594 39.14554
## 62    8  80308098 rs112501384  G  C 0.9884058 0.3773594 39.14554
## 63    8  80309142  rs60539023  G  A 0.9724638 0.5238540 19.63518
## 64    8  80309305  rs11996376  A  G 0.9884058 0.3773594 39.14554
## 65    8  80309598  rs79431653  C  G 0.9884058 0.3773594 39.14554
## 66    8  80309626  rs11996450  T  C 0.9884058 0.3773594 39.14554
## 67    8  80310193  rs60741023  C  G 0.9884058 0.3773594 39.14554
## 68    8  80310485   rs7844286  C  T 0.9884058 0.3773594 39.14554
## 69    8  80310716   rs7844696  A  T 0.9884058 0.3773594 39.14554
## 70    8  80310720   rs7826434  G  A 0.9884058 0.3773594 39.14554
## 71    8  80311242  rs80031189  C  T 0.9884058 0.3773594 39.14554
## 72    8  80311252 rs113823684  A  G 0.9884058 0.3773594 39.14554
## 73    8  80311311  rs61300312  A  C 0.9724638 0.5238540 19.63518
## 74    8  80311329 rs142907856  A  G 0.9884058 0.3773594 39.14554
## 75    8  80311457 rs112582272  A  G 0.9884058 0.3773594 39.14554
## 76    8  80311580 rs116773209  G  A 0.9884058 0.3773594 39.14554
## 77    8  80311736 rs113314270  G  T 0.9884058 0.3773594 39.14554
## 78    8  80311746  rs73261635  G  A 0.9724638 0.5238540 19.63518
## 79    8  80311838 rs117693425  A  G 0.9884058 0.3773594 39.14554
## 80    8  80312291  rs11988873  C  T 0.9884058 0.3773594 39.14554
## 81    8  80312345  rs11988904  A  T 0.9884058 0.3773594 39.14554
## 82    8  80312623  rs36051398  A  C 0.9884058 0.3773594 39.14554
## 83    8  80313237  rs73261640  G  A 0.9724638 0.5238540 19.63518
## 84    8  80313751 rs114426401  T  C 0.9884058 0.3773594 39.14554
## 85    8  80314228  rs74981396  G  A 0.9884058 0.3773594 39.14554
## 86    8  80317028  rs11998344  T  G 0.9884058 0.3773594 39.14554
## 87    8  80317208 rs113244900  C  T 0.9884058 0.3773594 39.14554
## 88    8  80318583  rs57246091  A  G 0.9884058 0.3773594 39.14554
## 89    8  80318643 rs113901603  G  A 0.9884058 0.3773594 39.14554
## 90    8  80319691 rs113718590  A  G 0.9884058 0.3773594 39.14554
## 91    8  80319794 rs111833373  C  T 0.9724638 0.5238540 19.63518
## 92    8  80320713  rs11987997  A  G 0.9884058 0.3773594 39.14554
## 93    8  80321002 rs111527437  T  A 0.9884058 0.3773594 39.14554
## 94    8  80321694 rs112815920  G  C 0.9884058 0.3773594 39.14554
## 95    8  80323890  rs11998156  C  A 0.9884058 0.3773594 39.14554
## 96    8  80323964  rs16907573  G  A 0.9884058 0.3773594 39.14554
## 97    8  80324156 rs111257240  C  T 0.9884058 0.3773594 39.14554
## 98    8  80325047 rs113437388  T  C 0.9884058 0.3773594 39.14554
## 99    8  80325311  rs73261674  G  C 0.9724638 0.5238540 19.63518
## 100   8  80326033 rs111370206  G  A 0.9884058 0.3773594 39.14554
## 101   8  80326181  rs73261679  A  C 0.9724638 0.5238540 19.63518
## 102   8  80326935 rs147955676  A  G 0.9884058 0.3773594 39.14554
## 103   8  80326985  rs61039050  A  C 0.9724638 0.5238540 19.63518
## 104   8  80327347   rs7840954  C  T 0.9724638 0.5238540 19.63518
## 105   8  80327348   rs7822886  A  G 0.9724638 0.5238540 19.63518
## 106   8  80327442   rs7841095  C  T 0.9884058 0.3773594 39.14554
## 107   8  80327549   rs7822828  C  A 0.9884058 0.3773594 39.14554
## 108   8  80327674   rs7841418  C  T 0.9724638 0.5238540 19.63518
## 109   8  80327732   rs7823481  C  G 0.9884058 0.3773594 39.14554
## 110   8  80328450  rs11990649  A  G 0.9884058 0.3773594 39.14554
## 111   8  80329801  rs56960849  A  G 0.9884058 0.3773594 39.14554
## 112   8  80330197  rs11995624  C  T 0.9884058 0.3773594 39.14554
## 113   8  80330467   rs7837761  A  G 0.9869565 0.3990852 33.19626
## 114   8  80332180 rs113042618  T  C 0.9884058 0.3773594 39.14554
## 115   8  80332423   rs7001142  G  T 0.9884058 0.3773594 39.14554
## 116   8  80332520   rs6980915  G  A 0.9884058 0.3773594 39.14554
## 117   8  80332901   rs6473220  T  C 0.9884058 0.3773594 39.14554
## 118   8  80332907   rs6473221  A  G 0.9884058 0.3773594 39.14554
## 119   8  80333316   rs7835862  C  T 0.9884058 0.3773594 39.14554
## 120   8  80333340   rs7817696  A  G 0.9884058 0.3773594 39.14554
## 121   8  80333506   rs7817634  T  C 0.9884058 0.3773594 39.14554
## 122   8  80333599  rs57419267  C  T 0.9884058 0.3773594 39.14554
## 123   8  80333823  rs59130219  C  T 0.9884058 0.3773594 39.14554
## 124   8  80334098  rs73691385  T  A 0.9884058 0.3773594 39.14554
## 125   8  80334328   rs7840559  C  T 0.9884058 0.3773594 39.14554
## 126   8  80334334   rs7822177  G  A 0.9884058 0.3773594 39.14554
## 127   8  80334582 rs111631456  A  G 0.9884058 0.3773594 39.14554
## 128   8  80334982  rs58109903  T  C 0.9884058 0.3773594 39.14554
## 129   8  80335583  rs73691388  G  A 0.9884058 0.3773594 39.14554
## 130   8  80336124   rs7837108  T  C 0.9884058 0.3773594 39.14554
## 131   8  80336300   rs7840857  T  G 0.9884058 0.3773594 39.14554
## 132   8  80336310   rs7840861  T  G 0.9884058 0.3773594 39.14554
## 133   8  80337292 rs111888115  T  C 0.9884058 0.3773594 39.14554
## 134   8  80337308  rs56871558  T  C 0.9884058 0.3773594 39.14554
## 135   8  80337408  rs56116331  A  G 0.9884058 0.3773594 39.14554
## 136   8  80337443  rs58592997  T  C 0.9884058 0.3773594 39.14554
## 137   8  80337629  rs76783901  A  G 0.9884058 0.3773594 39.14554
## 138   8  80337634  rs74468856  G  A 0.9884058 0.3773594 39.14554
## 139   8  80337985  rs73691394  C  A 0.9884058 0.3773594 39.14554
## 140   8  80338076  rs73691395  T  C 0.9884058 0.3773594 39.14554
## 141   8  80338219  rs73691397  C  G 0.9884058 0.3773594 39.14554
## 142   8  80338255  rs73691398  G  A 0.9884058 0.3773594 39.14554
## 143   8  80338835  rs58958046  A  G 0.9884058 0.3773594 39.14554
## 144   8  80338910  rs58786240  C  T 0.9884058 0.3773594 39.14554
## 145   8  80338955  rs76867788  C  T 0.9884058 0.3773594 39.14554
## 146   8  80339017  rs73691399  T  C 0.9884058 0.3773594 39.14554
## 147   8  80339217  rs73691400  C  G 0.9884058 0.3773594 39.14554
## 148   8  80339959  rs61233095  C  A 0.9884058 0.3773594 39.14554
## 149   8  80340238  rs56408864  A  T 0.9884058 0.3773594 39.14554
## 150   8  80340749   rs7826667  A  G 0.9884058 0.3773594 39.14554
## 151   8  80341236   rs7000592  G  C 0.9884058 0.3773594 39.14554
## 152   9 111071527 rs140186619  C  G 0.9855072 0.4710464 21.52887
## 153   9 111075633  rs74647073  T  C 0.9884058 0.4760068 33.56573
## 154  10  90323959 rs112690545  C  T 0.9898551 0.4905849 39.14067
## 155  10  90325010 rs113836370  C  T 0.9898551 0.4905849 39.14067
## 156  10  90325072 rs111559585  G  A 0.9898551 0.4905849 39.14067
## 157  10  90325630 rs111374977  G  A 0.9898551 0.4905849 39.14067
## 158  10  90327444 rs113290534  T  C 0.9898551 0.4905849 39.14067
## 159  11 100721739 rs148096302  A  G 0.9840580 0.3338903 26.94081
## 160  11 100769446  rs78598508  G  A 0.9753623 0.2428895 42.11482
## 161  12  13790930 rs116962554  T  C 0.9898551 0.3984131 29.03841
## 162  12  13793136 rs146599464  A  G 0.9898551 0.3984131 29.03841
## 163  12  13800451 rs117584437  G  C 0.9898551 0.3984131 29.03841
## 164  12  13802357 rs113017232  C  T 0.9898551 0.3984131 29.03841
## 165  12  13802362 rs111823455  A  C 0.9898551 0.3984131 29.03841
## 166  12  13807964    rs220584  A  G 0.9898551 0.3984131 29.03841
## 167  13  94647114  rs61965613  A  C 0.9898551 0.4545725 19.71557
## 168  13  94652507  rs61965632  T  A 0.9898551 0.4545725 19.71557
## 169  13  94655446  rs61965634  T  C 0.9898551 0.4545725 19.71557
## 170  13  94679031   rs4771891  G  T 0.9594203 0.3708084 28.51995
## 171  14  77683279 rs117466773  C  T 0.9884058 0.3483513 38.95078
## 172  14  77683756 rs146875663  A  G 0.9884058 0.3483513 38.95078
## 173  14  77703768 rs140932637  G  T 0.9898551 0.3297162 45.54160
## 174  16  63440590 rs141104955  G  C 0.9898551 0.5038479 38.72335
## 175  17  78089009 rs150771315  G  C 0.9826087 0.4413037 31.38887
## 176  18  50137976  rs73430360  G  T 0.9855072 0.2151360 50.56739
## 177  19  53778042  rs56192182  C  T 0.9884058 0.3885583 28.92266
## 178  20  43955922   rs6031258  A  G 0.9855072 0.4790113 22.10547
## 179  20  43965564  rs73118275  A  G 0.9884058 0.4436936 31.73982
## 180  20  43967430  rs73118278  T  C 0.9884058 0.4436936 31.73982
## 181  20  43973892  rs67340628  T  G 0.9884058 0.4436936 31.73982
## 182  22  33116757  rs16991802  A  G 0.9768116 0.3814350 28.93202
##                p
## 1   5.041979e-10
## 2   5.041979e-10
## 3   1.737732e-11
## 4   5.041979e-10
## 5   5.041979e-10
## 6   5.041979e-10
## 7   5.041979e-10
## 8   5.041979e-10
## 9   5.041979e-10
## 10  5.041979e-10
## 11  5.041979e-10
## 12  1.737732e-11
## 13  1.737732e-11
## 14  3.232940e-11
## 15  3.232940e-11
## 16  3.232940e-11
## 17  3.232940e-11
## 18  6.575564e-10
## 19  6.575564e-10
## 20  1.906085e-08
## 21  6.575564e-10
## 22  6.575564e-10
## 23  6.575564e-10
## 24  6.575564e-10
## 25  6.575564e-10
## 26  7.775581e-12
## 27  6.320647e-08
## 28  6.320647e-08
## 29  6.320647e-08
## 30  6.320647e-08
## 31  6.320647e-08
## 32  6.320647e-08
## 33  6.320647e-08
## 34  6.320647e-08
## 35  6.320647e-08
## 36  9.653973e-09
## 37  1.044923e-13
## 38  1.044923e-13
## 39  9.089454e-15
## 40  1.044923e-13
## 41  1.044923e-13
## 42  1.044923e-13
## 43  1.044923e-13
## 44  1.044923e-13
## 45  1.044923e-13
## 46  1.044923e-13
## 47  9.089454e-15
## 48  4.716851e-09
## 49  1.044923e-13
## 50  1.044923e-13
## 51  1.044923e-13
## 52  4.625179e-15
## 53  1.185247e-09
## 54  3.933614e-10
## 55  3.933614e-10
## 56  9.372753e-06
## 57  3.933614e-10
## 58  8.331061e-09
## 59  3.933614e-10
## 60  3.933614e-10
## 61  3.933614e-10
## 62  3.933614e-10
## 63  9.372753e-06
## 64  3.933614e-10
## 65  3.933614e-10
## 66  3.933614e-10
## 67  3.933614e-10
## 68  3.933614e-10
## 69  3.933614e-10
## 70  3.933614e-10
## 71  3.933614e-10
## 72  3.933614e-10
## 73  9.372753e-06
## 74  3.933614e-10
## 75  3.933614e-10
## 76  3.933614e-10
## 77  3.933614e-10
## 78  9.372753e-06
## 79  3.933614e-10
## 80  3.933614e-10
## 81  3.933614e-10
## 82  3.933614e-10
## 83  9.372753e-06
## 84  3.933614e-10
## 85  3.933614e-10
## 86  3.933614e-10
## 87  3.933614e-10
## 88  3.933614e-10
## 89  3.933614e-10
## 90  3.933614e-10
## 91  9.372753e-06
## 92  3.933614e-10
## 93  3.933614e-10
## 94  3.933614e-10
## 95  3.933614e-10
## 96  3.933614e-10
## 97  3.933614e-10
## 98  3.933614e-10
## 99  9.372753e-06
## 100 3.933614e-10
## 101 9.372753e-06
## 102 3.933614e-10
## 103 9.372753e-06
## 104 9.372753e-06
## 105 9.372753e-06
## 106 3.933614e-10
## 107 3.933614e-10
## 108 9.372753e-06
## 109 3.933614e-10
## 110 3.933614e-10
## 111 3.933614e-10
## 112 3.933614e-10
## 113 8.331061e-09
## 114 3.933614e-10
## 115 3.933614e-10
## 116 3.933614e-10
## 117 3.933614e-10
## 118 3.933614e-10
## 119 3.933614e-10
## 120 3.933614e-10
## 121 3.933614e-10
## 122 3.933614e-10
## 123 3.933614e-10
## 124 3.933614e-10
## 125 3.933614e-10
## 126 3.933614e-10
## 127 3.933614e-10
## 128 3.933614e-10
## 129 3.933614e-10
## 130 3.933614e-10
## 131 3.933614e-10
## 132 3.933614e-10
## 133 3.933614e-10
## 134 3.933614e-10
## 135 3.933614e-10
## 136 3.933614e-10
## 137 3.933614e-10
## 138 3.933614e-10
## 139 3.933614e-10
## 140 3.933614e-10
## 141 3.933614e-10
## 142 3.933614e-10
## 143 3.933614e-10
## 144 3.933614e-10
## 145 3.933614e-10
## 146 3.933614e-10
## 147 3.933614e-10
## 148 3.933614e-10
## 149 3.933614e-10
## 150 3.933614e-10
## 151 3.933614e-10
## 152 3.485412e-06
## 153 6.889610e-09
## 154 3.943437e-10
## 155 3.943437e-10
## 156 3.943437e-10
## 157 3.943437e-10
## 158 3.943437e-10
## 159 2.097822e-07
## 160 8.606828e-11
## 161 7.095735e-08
## 162 7.095735e-08
## 163 7.095735e-08
## 164 7.095735e-08
## 165 7.095735e-08
## 166 7.095735e-08
## 167 8.986609e-06
## 168 8.986609e-06
## 169 8.986609e-06
## 170 9.273778e-08
## 171 4.346271e-10
## 172 4.346271e-10
## 173 1.494309e-11
## 174 4.883314e-10
## 175 2.111881e-08
## 176 1.151425e-12
## 177 7.532646e-08
## 178 2.580737e-06
## 179 1.762712e-08
## 180 1.762712e-08
## 181 1.762712e-08
## 182 7.496329e-08

394 SNPs pass genome-wide significance, 19 index SNPs identified (chr 1-5, 7-14, 16-20, 22), supporting SNPs present for index on chr 1, 2, 4, 8, 9, 10, 11, 12, 13, 14, 20.

UVAF

uvaf_gwas <- association.test(merged_nies_210818, nies_heritable_pheno$totaluvafmm, method="lmm", test = "lrt", K = merged_nies_GRM, eigenK = merged_nies_eiK, p = 2)
uvaf_gwas <- na.omit(uvaf_gwas)
uvaf_filtered <- uvaf_gwas %>% filter(-log10(p)>1) %>% filter(freqA2 < 0.99)
uvaf_meff <- uvaf_filtered %>% filter(p < 1.84e-7)
uvaf_sig <- do.call(rbind, lapply(split(uvaf_meff,uvaf_meff$chr), function(x) {return(x[which.min(x$p),])}))

uvaf_res <- NULL
for (i in uvaf_sig$id) {
  snpID <- i
  snpCHR <- uvaf_filtered[uvaf_filtered$id == snpID,]$chr
  snpPOS <- uvaf_filtered[uvaf_filtered$id ==snpID,]$pos
  
  sig.peak <- uvaf_filtered %>%
    filter(chr == snpCHR) %>%
    filter(pos > snpPOS - 50000) %>%
    filter(pos < snpPOS + 50000) %>%
    filter(p < 1e-5)
  
  uvaf_res <- rbind(uvaf_res, sig.peak)
}

uvaf_res
##    chr       pos          id A1 A2    freqA2        h2      LRT
## 1    7 107578936 rs191522213  G  C 0.9884058 0.3552125 37.34589
## 2    8  34731289 rs116937259  C  T 0.9884058 0.3505130 33.58738
## 3    8  34738629 rs141115618  C  G 0.9898551 0.3528903 26.03643
## 4    8  34743083 rs192922472  T  C 0.9884058 0.3505130 33.58738
## 5    9  68580538   rs6560237  C  T 0.9753623 0.3167411 25.77905
## 6    9  68581265   rs7048633  T  C 0.9753623 0.3167411 25.77905
## 7    9  68583308  rs71501771  T  A 0.9753623 0.3167411 25.77905
## 8    9  68586048  rs35551873  T  C 0.9753623 0.3167411 25.77905
## 9    9  68586254   rs7045561  G  A 0.9753623 0.3167411 25.77905
## 10   9  68587181  rs13288798  G  T 0.9753623 0.3167411 25.77905
## 11   9  68587313  rs13284137  G  A 0.9753623 0.3167411 25.77905
## 12   9  68588522 rs139047286  C  T 0.9753623 0.3167411 25.77905
## 13   9  68588999   rs7859065  C  T 0.9753623 0.3167411 25.77905
## 14   9  68594362  rs13290124  A  G 0.9753623 0.3167411 25.77905
## 15   9  68595978  rs10511959  A  G 0.9753623 0.3167411 25.77905
## 16   9  68597806  rs34412731  T  C 0.9753623 0.3167411 25.77905
## 17   9  68599834  rs12004993  G  A 0.9753623 0.3167411 25.77905
## 18   9  68605388  rs76930250  G  C 0.9753623 0.3167411 25.77905
## 19   9  68605806  rs13287094  A  G 0.9753623 0.3167411 25.77905
## 20   9  68608085  rs34921768  G  A 0.9753623 0.3167411 25.77905
## 21   9  68608420  rs13299492  A  G 0.9753623 0.3167411 25.77905
## 22   9  68612655  rs34344868  A  G 0.9753623 0.3167411 25.77905
## 23   9  68615281  rs34805084  A  G 0.9739130 0.3101203 21.49526
## 24   9  68618011  rs71501772  G  C 0.9739130 0.3101203 21.49526
## 25   9  68618330  rs34763246  T  C 0.9739130 0.3101203 21.49526
## 26   9  68619315  rs34436601  T  C 0.9739130 0.3101203 21.49526
## 27   9  68621728  rs13289515  C  G 0.9739130 0.3101203 21.49526
## 28   9  68624185 rs117741244  T  C 0.9811594 0.2846828 34.07407
## 29   9  68629924 rs117987088  T  C 0.9811594 0.2846828 34.07407
## 30  10 103760600  rs56309638  C  T 0.9478261 0.2710545 20.68595
## 31  10 103760666  rs56275413  T  C 0.9478261 0.2710545 20.68595
## 32  10 103762582   rs4918047  T  C 0.9478261 0.2710545 20.68595
## 33  10 103763262  rs55760245  T  C 0.9478261 0.2710545 20.68595
## 34  10 103763409  rs56178332  G  C 0.9478261 0.2710545 20.68595
## 35  10 103764487   rs9665617  C  T 0.9478261 0.2710545 20.68595
## 36  10 103764550   rs9665618  A  T 0.9478261 0.2710545 20.68595
## 37  10 103765222  rs56030972  T  C 0.9478261 0.2710545 20.68595
## 38  10 103767403  rs55909417  C  A 0.9463768 0.2526346 25.21397
## 39  10 103768946  rs72817647  T  C 0.9463768 0.2526346 25.21397
## 40  10 103769861   rs4917399  G  A 0.9463768 0.2526346 25.21397
## 41  10 103769986  rs17115934  T  C 0.9463768 0.2526346 25.21397
## 42  10 103771232    rs911546  A  C 0.9463768 0.2526346 25.21397
## 43  10 103771521  rs11191800  A  G 0.9463768 0.2526346 25.21397
## 44  10 103771634   rs2013456  T  C 0.9478261 0.2739220 28.28936
## 45  10 103771936    rs911544  A  G 0.9463768 0.2526346 25.21397
## 46  10 103773143 rs112836951  A  G 0.9478261 0.2710545 20.68595
## 47  10 103773216 rs112995165  T  C 0.9478261 0.2558203 27.64235
## 48  10 103774251  rs55908118  G  A 0.9478261 0.2710545 20.68595
## 49  10 103775289  rs11191803  C  T 0.9463768 0.2526346 25.21397
##               p
## 1  9.892938e-10
## 2  6.813328e-09
## 3  3.350354e-07
## 4  6.813328e-09
## 5  3.828208e-07
## 6  3.828208e-07
## 7  3.828208e-07
## 8  3.828208e-07
## 9  3.828208e-07
## 10 3.828208e-07
## 11 3.828208e-07
## 12 3.828208e-07
## 13 3.828208e-07
## 14 3.828208e-07
## 15 3.828208e-07
## 16 3.828208e-07
## 17 3.828208e-07
## 18 3.828208e-07
## 19 3.828208e-07
## 20 3.828208e-07
## 21 3.828208e-07
## 22 3.828208e-07
## 23 3.547037e-06
## 24 3.547037e-06
## 25 3.547037e-06
## 26 3.547037e-06
## 27 3.547037e-06
## 28 5.305342e-09
## 29 5.305342e-09
## 30 5.411148e-06
## 31 5.411148e-06
## 32 5.411148e-06
## 33 5.411148e-06
## 34 5.411148e-06
## 35 5.411148e-06
## 36 5.411148e-06
## 37 5.411148e-06
## 38 5.130912e-07
## 39 5.130912e-07
## 40 5.130912e-07
## 41 5.130912e-07
## 42 5.130912e-07
## 43 5.130912e-07
## 44 1.044685e-07
## 45 5.130912e-07
## 46 5.411148e-06
## 47 1.459481e-07
## 48 5.411148e-06
## 49 5.130912e-07
write.csv(uvaf_res, 'C:/Users/Martha/Documents/Honours/Project/honours.project/Data/gwas_filter/uvaf_res.csv')

7 SNPs pass genome-wide significance, 4 index SNPs identified (chr 7, 8, 9, 10), supporting SNPs present for index on chr 8, 9, 10.

By identifying the index SNPs that have supporting SNPs passing the suggestive line (p < 1e-5), I eliminated three traits: L ACD, L CDR, and R ACD. Evidently, even in the other traits, not all index SNPs have supporting SNPs. Although the lack of supporting SNPs does not necessarily mean that they are false positives, their presence indicates robustness of the signigicant SNPs. And for the scope of this project, we do not have the capacity to determine whether any of the other significant hits without supporting SNPs are true. Therefore, I am only reporting the index SNPs that are well-supported.

l_KvalH_gwas <- association.test(merged_nies_210818, nies_heritable_pheno$L.K.value.H, method="lm", test = "wald", K = merged_nies_GRM, eigenK = merged_nies_eiK, p = 2)
l_KvalH_gwas <- na.omit(l_KvalH_gwas)
l_kvalH_filtered <- l_KvalH_gwas %>% filter(-log10(p)>1) %>% filter(freqA2 < 0.99)
l_kvalH_meff <- l_kvalH_filtered %>% filter(p < 1.84e-7)
l_kvalH_sig <- do.call(rbind, lapply(split(l_kvalH_meff,l_kvalH_meff$chr), function(x) {return(x[which.min(x$p),])}))

l_kvalH_res <- NULL
for (i in l_kvalH_sig$id) {
  snpID <- i
  snpCHR <- l_kvalH_filtered[l_kvalH_filtered$id == snpID,]$chr
  snpPOS <- l_kvalH_filtered[l_kvalH_filtered$id ==snpID,]$pos
  
  sig.peak <- l_kvalH_filtered %>%
    filter(chr == snpCHR) %>%
    filter(pos > snpPOS - 50000) %>%
    filter(pos < snpPOS + 50000) %>%
    filter(p < 1e-5)
  
  l_kvalH_res <- rbind(l_kvalH_res, sig.peak)
}

l_kvalH_res
##    chr       pos          id A1 A2    freqA2     beta        sd
## 1    2 176830012  rs72940750  C  T 0.9898551 3.681223 0.6028117
## 2    2 176831387   rs7576095  A  G 0.9898551 3.681223 0.6028117
## 3    2 176832679   rs6758571  G  A 0.9898551 3.681223 0.6028117
## 4    2 176833429 rs139727961  G  A 0.9898551 3.681223 0.6028117
## 5    2 176839936  rs72940766  A  T 0.9898551 3.681223 0.6028117
## 6    2 176840625  rs72940776  T  C 0.9898551 3.681223 0.6028117
## 7    2 176840683  rs72940781  C  G 0.9898551 3.681223 0.6028117
## 8    2 176841189   rs6715723  T  A 0.9898551 3.681223 0.6028117
## 9    3  77739700   rs1163757  A  G 0.9869565 3.221804 0.5333681
## 10   6  82425908  rs73481987  C  T 0.9753623 1.917424 0.4054810
## 11   6  82442490 rs114928787  T  C 0.9855072 3.173559 0.4545536
## 12   6  82442833 rs116172930  C  A 0.9855072 3.173559 0.4545536
## 13   6  82443802  rs74436554  C  T 0.9855072 3.173559 0.4545536
## 14   6  82444791  rs78056249  C  G 0.9855072 3.173559 0.4545536
## 15   6  82445716  rs77941466  C  T 0.9855072 3.173559 0.4545536
## 16   6  82447004 rs116461493  T  C 0.9855072 3.173559 0.4545536
## 17   6  82447732  rs77666578  G  A 0.9855072 3.173559 0.4545536
## 18   6  82451563  rs75189229  A  G 0.9855072 3.173559 0.4545536
## 19   6  82453938 rs117178778  A  G 0.9855072 3.173559 0.4545536
## 20   6  82454058 rs116246536  T  G 0.9855072 3.173559 0.4545536
## 21   6  82454140  rs78427866  A  G 0.9855072 3.173559 0.4545536
## 22   6  82454380 rs147257041  A  G 0.9855072 3.173559 0.4545536
## 23   6  82454449 rs140711073  T  C 0.9855072 3.173559 0.4545536
## 24   6  82454505 rs142248448  T  C 0.9855072 3.173559 0.4545536
## 25   6  82454620 rs114442506  A  G 0.9855072 3.173559 0.4545536
## 26   6  82456537 rs145558293  A  G 0.9855072 3.173559 0.4545536
## 27   6  82458393  rs77391407  C  T 0.9855072 3.173559 0.4545536
## 28   6  82458546  rs77103853  G  C 0.9855072 3.173559 0.4545536
## 29   6  82459011 rs115096710  T  C 0.9855072 3.173559 0.4545536
## 30   6  82459713  rs77245672  G  C 0.9855072 3.173559 0.4545536
## 31   6  82459810  rs77599496  T  A 0.9855072 3.173559 0.4545536
## 32   6  82459890  rs77598967  G  A 0.9855072 3.173559 0.4545536
## 33   6  82460167 rs115847999  C  G 0.9855072 3.173559 0.4545536
## 34   6  82460379 rs116730626  G  A 0.9855072 3.173559 0.4545536
## 35   6  82460650 rs149355051  G  T 0.9855072 3.173559 0.4545536
## 36   6  82462126  rs76856243  T  C 0.9855072 3.173559 0.4545536
## 37   6  82462603   rs6933239  C  T 0.9855072 3.173559 0.4545536
## 38   6  82462992   rs6911216  A  C 0.9855072 3.173559 0.4545536
## 39   6  82465617   rs6928806  A  C 0.9855072 3.173559 0.4545536
## 40   6  82466574  rs74404091  C  T 0.9855072 3.173559 0.4545536
## 41   6  82466715  rs79358384  G  A 0.9855072 3.173559 0.4545536
## 42   6  82467200  rs77721025  A  C 0.9855072 3.173559 0.4545536
## 43   6  82467706 rs116423281  A  G 0.9855072 3.173559 0.4545536
## 44   6  82467953 rs142216660  T  C 0.9855072 3.173559 0.4545536
## 45   6  82467988 rs140099919  A  G 0.9855072 3.173559 0.4545536
## 46   6  82468668  rs78941585  G  A 0.9855072 3.173559 0.4545536
## 47   6  82468774  rs75228268  A  T 0.9855072 3.173559 0.4545536
## 48   6  82469116  rs77552654  T  A 0.9855072 3.173559 0.4545536
## 49   6  82470649 rs149706908  G  T 0.9855072 3.173559 0.4545536
## 50   6  82470651 rs144623191  T  C 0.9855072 3.173559 0.4545536
## 51   6  82470859 rs192614396  C  A 0.9855072 3.173559 0.4545536
## 52   6  82471119 rs151156468  C  T 0.9855072 3.173559 0.4545536
## 53   6  82471338 rs140554533  A  G 0.9855072 3.173559 0.4545536
## 54   6  82471381 rs150446760  C  G 0.9855072 3.173559 0.4545536
## 55   6  82471679 rs138339145  T  C 0.9855072 3.173559 0.4545536
## 56   6  82472140 rs142089466  T  C 0.9855072 3.173559 0.4545536
## 57   6  82473676 rs147151928  G  C 0.9855072 3.173559 0.4545536
## 58   6  82473679 rs140298049  C  T 0.9855072 3.173559 0.4545536
## 59   6  82473688 rs149655171  A  G 0.9855072 3.173559 0.4545536
## 60   6  82474468 rs146864360  T  C 0.9855072 3.173559 0.4545536
## 61   6  82474648 rs140520501  C  T 0.9855072 3.173559 0.4545536
## 62   6  82474867 rs150394443  T  C 0.9855072 3.173559 0.4545536
## 63   6  82475320 rs143579868  A  T 0.9855072 3.173559 0.4545536
## 64   6  82475696 rs115741750  C  T 0.9855072 3.173559 0.4545536
## 65   6  82477810  rs77406497  T  C 0.9855072 3.173559 0.4545536
## 66   6  82478378 rs115813741  T  G 0.9855072 3.173559 0.4545536
## 67   6  82478650  rs78900243  G  A 0.9855072 3.173559 0.4545536
## 68   6  82478870  rs76557363  T  G 0.9855072 3.173559 0.4545536
## 69   6  82479264  rs77943130  T  G 0.9855072 3.173559 0.4545536
## 70   6  82479546 rs115245280  A  G 0.9855072 3.173559 0.4545536
## 71   6  82479664  rs75910615  A  G 0.9855072 3.173559 0.4545536
## 72   6  82480370  rs76438934  A  G 0.9855072 3.173559 0.4545536
## 73   6  82481986 rs115034961  A  C 0.9855072 3.173559 0.4545536
## 74   6  82482183  rs79967481  G  A 0.9855072 3.173559 0.4545536
## 75   6  82482254 rs116699765  T  C 0.9855072 3.173559 0.4545536
## 76   6  82483125  rs78639250  T  C 0.9855072 3.173559 0.4545536
## 77   6  82483522  rs75763492  A  G 0.9855072 3.173559 0.4545536
## 78   6  82483898  rs76617768  T  C 0.9855072 3.173559 0.4545536
## 79   6  82484287  rs76652063  C  A 0.9855072 3.173559 0.4545536
## 80   6  82484758 rs114024754  A  G 0.9855072 3.173559 0.4545536
## 81   6  82485370  rs79031996  C  G 0.9855072 3.173559 0.4545536
## 82   6  82485916  rs77517398  C  T 0.9855072 3.173559 0.4545536
## 83   6  82486863  rs80252551  A  T 0.9855072 3.173559 0.4545536
## 84   6  82488997 rs114963095  G  T 0.9855072 3.173559 0.4545536
## 85   6  82489053  rs77561386  C  T 0.9855072 3.173559 0.4545536
## 86   6  82489164  rs76602861  A  G 0.9855072 3.173559 0.4545536
## 87   6  82490178  rs79435750  A  G 0.9855072 3.173559 0.4545536
## 88   6  82490367  rs80347071  C  G 0.9855072 3.173559 0.4545536
## 89   6  82492170  rs74785531  C  T 0.9855072 3.173559 0.4545536
## 90   6  82492233  rs74361967  C  T 0.9855072 3.173559 0.4545536
## 91   6  82492321  rs75373608  A  T 0.9855072 3.173559 0.4545536
## 92  10  64099069  rs74804993  G  A 0.9826087 2.637507 0.4654519
## 93  16  13935176   rs1800067  A  G 0.9550725 1.635103 0.2819104
##               p
## 1  2.769829e-09
## 2  2.769829e-09
## 3  2.769829e-09
## 4  2.769829e-09
## 5  2.769829e-09
## 6  2.769829e-09
## 7  2.769829e-09
## 8  2.769829e-09
## 9  4.020056e-09
## 10 3.311531e-06
## 11 1.530777e-11
## 12 1.530777e-11
## 13 1.530777e-11
## 14 1.530777e-11
## 15 1.530777e-11
## 16 1.530777e-11
## 17 1.530777e-11
## 18 1.530777e-11
## 19 1.530777e-11
## 20 1.530777e-11
## 21 1.530777e-11
## 22 1.530777e-11
## 23 1.530777e-11
## 24 1.530777e-11
## 25 1.530777e-11
## 26 1.530777e-11
## 27 1.530777e-11
## 28 1.530777e-11
## 29 1.530777e-11
## 30 1.530777e-11
## 31 1.530777e-11
## 32 1.530777e-11
## 33 1.530777e-11
## 34 1.530777e-11
## 35 1.530777e-11
## 36 1.530777e-11
## 37 1.530777e-11
## 38 1.530777e-11
## 39 1.530777e-11
## 40 1.530777e-11
## 41 1.530777e-11
## 42 1.530777e-11
## 43 1.530777e-11
## 44 1.530777e-11
## 45 1.530777e-11
## 46 1.530777e-11
## 47 1.530777e-11
## 48 1.530777e-11
## 49 1.530777e-11
## 50 1.530777e-11
## 51 1.530777e-11
## 52 1.530777e-11
## 53 1.530777e-11
## 54 1.530777e-11
## 55 1.530777e-11
## 56 1.530777e-11
## 57 1.530777e-11
## 58 1.530777e-11
## 59 1.530777e-11
## 60 1.530777e-11
## 61 1.530777e-11
## 62 1.530777e-11
## 63 1.530777e-11
## 64 1.530777e-11
## 65 1.530777e-11
## 66 1.530777e-11
## 67 1.530777e-11
## 68 1.530777e-11
## 69 1.530777e-11
## 70 1.530777e-11
## 71 1.530777e-11
## 72 1.530777e-11
## 73 1.530777e-11
## 74 1.530777e-11
## 75 1.530777e-11
## 76 1.530777e-11
## 77 1.530777e-11
## 78 1.530777e-11
## 79 1.530777e-11
## 80 1.530777e-11
## 81 1.530777e-11
## 82 1.530777e-11
## 83 1.530777e-11
## 84 1.530777e-11
## 85 1.530777e-11
## 86 1.530777e-11
## 87 1.530777e-11
## 88 1.530777e-11
## 89 1.530777e-11
## 90 1.530777e-11
## 91 1.530777e-11
## 92 3.102948e-08
## 93 1.512997e-08