1. 根据vcf文件获取一个类似曼哈顿图的input文件,只是第4列的p value 值变为了区间的snp number
如下:
SNP CHR BP P
1 chr1 100000 1362
2 chr1 110000 1319
3 chr1 120000 1321
4 chr1 130000 1426
5 chr1 140000 1500
6 chr1 150000 1512
7 chr1 160000 1387
8 chr1 170000 1235
9 chr1 180000 1244
10 chr1 190000 1221
###########################
2. 使用R进行绘图,注意使用facet_grid
library(ggplot2)
library("RColorBrewer")
#########################################
dat <- read.table("snp_manhattan.txt",header = TRUE, sep="\t")
pdf("snp.pdf")
ggplot(dat,aes(x=BP,y=P,colour=CHR)) + facet_grid(.~CHR,scales="free_x",space="free_x") +
geom_point() + xlab("Position") + ylab("Numb