tests/testthat/test_fsthudson.R

context("Fst Hudson each SNP")

test_that("calculate Fst Hudson",{

  data(example_SNP)

  idx1 <- which(sample_labels == 'pop1')
  idx2 <- which(sample_labels == 'pop2')
  fst <- fst.hudson(simsnp$snp, idx1, idx2)

  expect_equal(fst, 0.009571789)

})

Try the KRIS package in your browser

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

KRIS documentation built on Jan. 21, 2021, 5:08 p.m.