赞
踩
BiocManager::install("SNPlocs.Hsapiens.dbSNP144.GRCh37")
library(SNPlocs.Hsapiens.dbSNP144.GRCh37)
snps<-SNPlocs.Hsapiens.dbSNP144.GRCh37
for (i in unique(BMI2$Chr)){
my_pos<-BMI2$Position[BMI2$Chr==i]
chr_snps<-snpsBySeqname(snps, as.character(i))
idx<-match(my_pos,pos(chr_snps))
rsids<-mcols(chr_snps)$RefSNP_id[idx]
BMI2$rsid[BMI2$Chr==i]<-rsids
print(paste(as.character(i),"is ok"))
}
37/38自主选择
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。