scan_qtl2_to_qtl: Convert scan1 results to the scanone format

View source: R/scan_qtl2_to_qtl.R

scan_qtl2_to_qtlR Documentation

Convert scan1 results to the scanone format

Description

Convert the results of qtl2::scan1() to the form used by the R/qtl function qtl::scanone().

Usage

scan_qtl2_to_qtl(scan1_output, map)

Arguments

scan1_output

Matrix of LOD scores, as calculated by qtl2::scan1().

map

Map of markers/pseudomarkers (as a list of vectors).

Value

A data frame with class "scanone", containing chromosome and position columns followed by the LOD scores in scan1_output.

See Also

scan_qtl2_to_qtl()

Examples

library(qtl2)
iron <- read_cross2(system.file("extdata", "iron.zip", package="qtl2"))
map <- insert_pseudomarkers(iron$gmap, step=1)
probs <- calc_genoprob(iron, map, error_prob=0.002)
pheno <- iron$pheno
covar <- match(iron$covar$sex, c("f", "m")) # make numeric
names(covar) <- rownames(iron$covar)
Xcovar <- get_x_covar(iron)
out <- scan1(probs, pheno, addcovar=covar, Xcovar=Xcovar)

out_rev <- scan_qtl2_to_qtl(out, map)


qtl2convert documentation built on July 11, 2022, 5:08 p.m.