inst/unitTests/apartSnpSelection_test.R

test_apartSnpSelection <- function() {
  chrom <- c(rep(1, 100), rep(27, 10))
  pos <- 1:length(chrom)
  res <- apartSnpSelection(chrom, pos, min.dist=10)
  checkEquals(res[101:110], rep(FALSE, 10))
  
  chrom <- c(rep(1, 100), rep(NA, 10))
  pos <- 1:length(chrom)
  res <- apartSnpSelection(chrom, pos, min.dist=10)
  checkEquals(res[101:110], rep(FALSE, 10))
}

Try the GWASTools package in your browser

Any scripts or data that you put into this service are public.

GWASTools documentation built on Nov. 8, 2020, 7:49 p.m.