filenm <- tempfile()
simulateGenotypeMatrix(ncdf.filename=filenm )
file <- NcdfGenotypeReader(filenm)
file #notice the dimensions and variables listed
genot <- getGenotype(file)
table(genot) #can see the number of missing calls
chrom <- getChromosome(file)
unique(chrom) #there are indeed 10 chromosomes, as specified in the function call
close(file)
unlink(filenm)
Run the code above in your browser using DataLab