results_log = fread("result.assoc.txt")
dim(results_log)
head(results_log)
summary(results_log)
select = dplyr::select
d1 = results_log %>% select(Chr = chr,Marker = rs,Pos = ps,p=p_wald)
d1 = d1 %>% drop_na(p)
summary(d1)
manhattan(d1,chr="Chr",bp="Pos",p="p",snp="Marker", main = "Manhattan plot: logistic")
tiff("y1-曼哈顿图.tiff")
manhattan(d2,chr="Chr",bp="Pos",p="p",snp="Marker", main = "Manhattan plot",suggestiveline = 5.237,genomewideline = 6.538,annotatePval = 0.00000029, col = c("#F07E4A", "#3985F0"))
qq(d1$p, main = "Q-Q plot of GWAS p-values : log")
tiff("y1-QQ图.tiff")
qq(d1$p, main = "Q-Q plot of GWAS p-values : log")
dev.off()