绘制染色体特定片段的LDheatmap
使用LDheatmap包
genetics转换数据格式
snp<-read.csv("片段截取的hmp文件",sep=",",header=T)
library(genetics)
num<-ncol(snp)
for(i in 1:num){
snp[,i]<-as.genotype(snp[,i])
# convert the columns of the original data frame into genotype objects
}