getprofile: Make a profile LOD score matrix for a given multiple QTL...

View source: R/getprofile.R

getprofileR Documentation

Make a profile LOD score matrix for a given multiple QTL model.

Description

Calculate profile LOD scores for each chromosome.

Usage

getprofile(
  cross,
  pheno.cols,
  qtl,
  chr,
  pos,
  qtl.name,
  covar = NULL,
  formula,
  method = c("hk", "imp"),
  verbose = TRUE,
  tpy = c("comb", "sep")
)

Arguments

cross

An object of class "cross". See read.cross for detail.

pheno.cols

Columns in the phenotype matrix to be used as the phenotype.

qtl

A QTL object, as produced by makeqtl, containing the positions of the QTL. Provide either qtl or the pair chr and pos.

chr

Vector indicating the chromosome for each QTL; if qtl is provided, this should not be.

pos

Vector indicating the positions for each QTL; if qtl is provided, this should not be.

qtl.name

Optional user-specified name for each QTL. If qtl is provided, this should not be.

covar

A matrix or data.frame of covariates. These must be strictly numeric.

formula

An object of class 'formula' indicating the model to be fitted. (It can also be the character string representation of a formula.) QTLs are indicated as 'Q1', 'Q2', etc. Covariates are indicated by their names in 'covar'.

method

Indicates whether to use multiple imputation or Haley-Knott regression.

verbose

If TRUE, give feedback about progress. If 'verbose' is an integer > 1, further messages from 'scanqtl' are also displayed.

tpy

type of output. If there are more QTL's in one chromosome. It plot them separately if tpy = "sep", On the other hand, it combine then in one chromosome taking maximum values of them if tpy = "comb".

Value

A "lodprofileM" or "lodprofileM2" object.

Author(s)

Il-Youp Kwak, <email: ikwak2@stat.wisc.edu>

See Also

plotprofile

Examples

data(simspal)
simspal <- calc.genoprob(simspal, step=0)


phe <- 1:nphe(simspal)


# difference between tpy = "sep" and "comb"

par(mfrow=c(1,2))
qtlslod <- makeqtl(simspal, chr = c(1, 1, 4),
               pos = c(36.6, 61, 27.8), what = "prob")
lodmat1 <- getprofile(simspal, qtl =  qtlslod, pheno.cols =phe,
                    formula = y~Q1 + Q2 + Q3 , method = "hk", tpy = "sep")
plotprofile(lodmat1, main="tpy=\"sep\"")

lodmat2 <- getprofile(simspal, qtl =  qtlslod, pheno.cols =phe,
                    formula = y~Q1 + Q2 + Q3 , method = "hk", tpy = "comb")
plotprofile(lodmat2, main="tpy=\"comb\"")

ikwak2/funqtl documentation built on April 20, 2022, 3:58 a.m.