annot <- read.table("KPGP1000_chr1_annot.txt",header = FALSE, sep = " ", quote = "",as.is = TRUE,skip=2) save(annot,file="annot.Rda") nn <- length(annot[,1]) v1 <- rep("chr1",nn) v2 <- 1:nn annotA <- cbind(v1,format(annot[,2],scientific=FALSE),format((annot[,2]+1),scientific=FALSE),format(v2,scientific=FALSE),substr(annot[,4],1,1),substr(annot[,5],1,1)) write.table(annotA,file="hg19KPGP.bed",sep = "\t", quote = FALSE,row.names = FALSE,col.names = FALSE) ./liftOver hg19KPGP.bed hg19ToHg18.over.chain hg18KPGP.bed notliftedToHg18KPGP.bed