注意:最新版的qqman程序包是基于R 3.2.5版本开发的,所以使用该程序包之前注意更新R软件到最新版本,同时安装最新版的qqman程序包。虽然以前版本的R也能运行相关程序,但是部分功能显示不够完善。
以下内容因为格式问题将源网页内容稍加调整
Intro to the qqman package
The qqman package includes functions for creating manhattan plots and q-q plots from GWAS results. ThegwasResults data.frame included with the package has simulated results for 16,470 SNPs on 22 chromosomes. Take a look at the data:
> str(gwasResults)
'data.frame': 16470 obs. of 5 variables:
$ SNP : chr "rs1" "rs2" "rs3" "rs4" ...
$ CHR : int 1 1 1 1 1 1 1 1 1 1 ...
$ BP : int 1 2 3 4 5 6 7 8 9 10 ...
$ P : num 0.915 0.937 0.286 0.83 0.642 ...
$ zscore: num 0.107 0.0789 1.0666 0.2141 0.4653 ...复制代码
How many SNPs on each chromosome?
> as.data.frame(table(gwasResults$CHR))
Var1 Freq
1 1