tests/testthat/test-subset.mpcrossRF.R

context("Test subsetting of mpcrossRF objects")
test_that("Subsetting of mpcrossRF object by lines discards rf data",
{
	map <- qtl::sim.map(len = rep(100, 2), n.mar = rep(11, 2), anchor.tel=TRUE, include.x=FALSE, eq.spacing=TRUE)
	f2Pedigree <- f2Pedigree(500)
	cross <- simulateMPCross(map=map, pedigree=f2Pedigree, mapFunction = haldane)
	rf <- estimateRF(cross)
	expect_warning(subsetted <- subset(rf, lines = lineNames(cross)[1:10]), "Discarding rf")
	expect_equivalent(class(subsetted), "mpcross")
})

Try the mpMap2 package in your browser

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

mpMap2 documentation built on Sept. 13, 2020, 5:17 p.m.