Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

replaceqtl

Replace a QTL in a qtl object with a different position


Description

This function replaces a QTL or QTLs in a qtl object with a different position.

Usage

replaceqtl(cross, qtl, index, chr, pos, qtl.name, drop.lod.profile=TRUE)

Arguments

cross

An object of class cross. See read.cross for details.

qtl

A qtl object, as created by makeqtl.

index

Numeric index indicating the QTL to be replaced.

chr

Vector (of same length as index) indicating the chromosomes for the new QTL.

pos

Vector (of same length as index) indicating the positions for the new QTL. If there is no marker or pseudomarker at a position, the nearest position is used.

qtl.name

Optional vector (of same length as index) of user-specified names for each new QTL, used in the drop-one-term ANOVA table in fitqtl. If unspecified, the names will be of the form "Chr1@10" for a QTL on Chromsome 1 at 10 cM.

drop.lod.profile

If TRUE, remove any LOD profiles from the object.

Value

The input qtl object, but with some QTL replaced by new ones. See makeqtl for details on the format.

Author(s)

Karl W Broman, broman@wisc.edu

See Also

Examples

data(fake.f2)

# take out several QTLs and make QTL object
qc <- c(1, 6, 13)
qp <- c(25.8, 33.6, 18.63)
fake.f2 <- subset(fake.f2, chr=qc)

fake.f2 <- calc.genoprob(fake.f2, step=2, err=0.001)
qtl <- makeqtl(fake.f2, qc, qp, what="prob")

qtl <- replaceqtl(fake.f2, qtl, 2, 6, 48.1)

qtl

Tools for Analyzing QTL Experiments

v1.48-1
GPL-3
Authors
Karl W Broman <broman@wisc.edu> and Hao Wu, with ideas from Gary Churchill and Saunak Sen and contributions from Danny Arends, Robert Corty, Timothee Flutre, Ritsert Jansen, Pjotr Prins, Lars Ronnegard, Rohan Shah, Laura Shannon, Quoc Tran, Aaron Wolen, Brian Yandell, and R Core Team
Initial release
2021-03-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.