Learn R Programming

xoi (version 0.72)

recrate2scanone: Convert recrate to scanone format

Description

Convert the result of est.recrate() to the format output by R/qtl's qtl::scanone() function.

Usage

recrate2scanone(recrate, phymap = NULL)

Value

A data frame with class "scanone", in the format output by qtl::scanone().

Arguments

recrate

A list of results from est.recrate()

phymap

A list of vectors of Mbp positions of markers

Author

Karl W Broman, broman@wisc.edu

See Also

est.recrate()

Examples

Run this code
pmap <- sim.map(100, n.mar=51, anchor=TRUE, include.x=FALSE, eq.spacing=TRUE)

# simulate cross
x <- sim.cross(pmap, type="bc", n.ind=501)

# estimate map for that cross
emap <- est.map(x)

# empirical estimate of recombination rate
rr <- est.recrate(emap[[1]], pmap[[1]], window=5)

# make it a list (one component per chromosome, but here just the one chromosome)
rr <- list("1"=rr)

# convert to scanone output and plot
rr_scanone <- recrate2scanone(rr)
plot(rr_scanone)

Run the code above in your browser using DataLab