tests/testthat/test-mapfunc.R

context("map functions")

test_that("map functions are giving the invertible", {

    mapfunc <- c("haldane", "kosambi", "c-f", "morgan")

    d <- seq(0, 200, by=10)
    for(m in mapfunc) {
        if(m == "morgan") d <- d[d <= 50]

        expect_equal(imf(mf(d, m), m), d)
    }

    r <- seq(0, 0.5, by=0.5)
    for(m in mapfunc)
        expect_equal(imf(mf(r, m), m), r)

})

Try the qtl2 package in your browser

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

qtl2 documentation built on April 22, 2023, 1:10 a.m.