# NOT RUN {
map <- data.frame(chr=c(1,1,1,1,1,2,2,2,2),pos=1:9)
geno <- matrix(sample(c(0,1,2,NA),size=10*9,replace=TRUE),nrow=10,ncol=9)
colnames(geno) <- rownames(map) <- paste("SNP",1:9,sep="")
rownames(geno) <- paste("ID",1:10+100,sep="")
gp <- create.gpData(geno=geno,map=map)
gp1 <- discard.markers(gp,rownames(map[map$chr!=1,]))
# }
# NOT RUN {
write.beagle(gp1,prefix="test")
# }
Run the code above in your browser using DataLab