Learn R Programming

qtlhot (version 1.2.10)

hotperm: Conduct NL and N permutation tests

Description

This set of functions compute the permutation LOD thresholds for the NL-method and the permutation hotspot size thresholds for the N-method. The output is a list with two elements: the NL- and the N-method's threshold matrices. The NL-method output is a nN (number of spurious hotspot sizes) by nalpha (number of significance levels) threshold matrix. Note that for the NL-method we have a single "alpha" since we use the same significance level for QTL mapping and permutation significance. The N-method output is a nlod (number of LOD thresholds) by nalpha (number of significance levels) threshold matrix. Note that here we have two "alphas", one for the QTL mapping (the LOD thresholds) and one for the permutation significance (alpha levels).

Usage

hotperm(
  cross,
  n.quant,
  n.perm,
  lod.thrs,
  alpha.levels,
  drop.lod = 1.5,
  window = NULL,
  verbose = FALSE,
  init.seed = 0,
  addcovar = NULL,
  intcovar = NULL,
  ...
)

# S3 method for hotperm print(x, ...)

# S3 method for hotperm summary(object, quant.levels, ...)

# S3 method for summary.hotperm print(x, ...)

# S3 method for hotperm plot(x, probs = seq(0.9, 0.99, by = 0.01), level = 0.95, ...)

Arguments

cross

object of class cross

n.quant

maximum of s.quant

n.perm

number of permutations

lod.thrs

vector of LOD thresholds

alpha.levels

vector of significance levels

drop.lod

LOD drop amount for support intervals

window

window size for smoothed hotspot size

verbose

verbose output if TRUE

init.seed

initial seed for pseudo-random number generation

addcovar

additive covariates as vector or matrix; see scanone

intcovar

interactive covariates as vector or matrix; see scanone

...

arguments passed along to scanone

x, object

object of class hotperm or summary.hotperm

quant.levels

quantile levels, as number of traits, to show in summary; default is 1, 2, 5, 10, ... up to maximum recorded

probs

probability levels for quantiles (1-probs if all > 0.5); default is alpha.levels

level

Significance level for hotspot detection.

Author

Elias Chaibub Neto and Brian S Yandell

Examples

Run this code
ncross1 <- sim.null.cross(chr.len = rep(100, 4),
                          n.mar = 51,
                          n.ind = 100,
                          type = "bc",
                          n.phe = 1000,
                          latent.eff = 3,
                          res.var = 1,
                          init.seed = 123457)
cross1 <- include.hotspots(cross = ncross1,
                           hchr = c(2, 3, 4),
                           hpos = c(25, 75, 50),
                           hsize = c(100, 50, 20),
                           Q.eff = 2,
                           latent.eff = 3,
                           lod.range.1 = c(2.5, 2.5),
                           lod.range.2 = c(5, 8),
                           lod.range.3 = c(10, 15),
                           res.var = 1,
                           n.phe = 1000,
                           init.seed = 12345)
pt.scanone <- scanone(ncross1, method = "hk", n.perm = 1000)
alphas <- seq(0.01, 0.10, by=0.01)
lod.thrs <- summary(pt.scanone, alphas)
# This takes awhile, so we save the object.
if (FALSE) {
hotperm1 <- hotperm(cross = cross1,
                    n.quant = 300,
                    n.perm = 100,
                    lod.thrs = lod.thrs,
                    alpha.levels = alphas,
                    drop.lod = 1.5,
                    verbose = FALSE)
save(hotperm1, file = "hotperm1.RData", compress = TRUE)
# data(hotperm1) 
summary(hotperm1)
}

Run the code above in your browser using DataLab