gdsfile <- system.file("extdata", "illumina_geno.gds", package="GWASdata")
gds <- GdsGenotypeReader(gdsfile)
sample.sel <- getScanID(gds, index=1:10)
close(gds)
regions <- data.frame("scanID"=sample.sel[1:3], "chromosome"=c(21,22,23),
"left.base"=c(14000000, 30000000, NA), "right.base"=c(28000000, 450000000, NA),
whole.chrom=c(FALSE, FALSE, TRUE))
newgds <- tempfile()
setMissingGenotypes(gdsfile, newgds, regions, file.type="gds", sample.include=sample.sel)
file.remove(newgds)
Run the code above in your browser using DataLab