summary_scan1perm: Summarize scan1perm results

Description Usage Arguments Details Value References Examples

View source: R/summary_scan1perm.R

Description

Summarize permutation test results from scan1perm(), as significance thresholds.

Usage

1
2
3
4
summary_scan1perm(object, alpha = 0.05)

## S3 method for class 'scan1perm'
summary(object, alpha = 0.05, ...)

Arguments

object

Output of scan1perm()

alpha

Vector of significance levels

...

Ignored

Details

In the case of X-chromosome-specific permutations (when scan1perm() was run with perm_Xsp=TRUE, we follow the approach of Broman et al. (2006) to get separate thresholds for the autosomes and X chromosome, using

Let L_A and L_X be total the genetic lengths of the autosomes and X chromosome, respectively, and let L_T = L_A + L_X Then in place of alpha, we use

alpha_A = 1 - (1 - alpha)^(L_A/L_T)

as the significance level for the autosomes and

alpha_x = 1 - (1 - alpha)^(LX/LT)

as the significance level for the X chromosome.

Value

An object of class summary.scan1perm. If scan1perm() was run with perm_Xsp=FALSE, this is a single matrix of significance thresholds, with rows being signicance levels and columns being the columns in the input. If scan1perm() was run with perm_Xsp=TRUE, this is a list of two matrices, with the significance thresholds for the autosomes and X chromosome, respectively.

The result has an attribute "n_perm" that has the numbers of permutation replicates (either a matrix or a list of two matrices).

References

Broman KW, Sen <c5><9a>, Owens SE, Manichaikul A, Southard-Smith EM, Churchill GA (2006) The X chromosome in quantitative trait locus mapping. Genetics 174:2151-2158

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# load qtl2geno package for data and genoprob calculation
library(qtl2geno)

# read data
iron <- read_cross2(system.file("extdata", "iron.zip", package="qtl2geno"))

# insert pseudomarkers into map
map <- insert_pseudomarkers(iron$gmap, step=1)

# calculate genotype probabilities
probs <- calc_genoprob(iron, map, error_prob=0.002)

# grab phenotypes and covariates; ensure that covariates have names attribute
pheno <- iron$pheno
covar <- match(iron$covar$sex, c("f", "m")) # make numeric
names(covar) <- rownames(iron$covar)
Xcovar <- get_x_covar(iron)

# permutations with genome scan
## Not run: 
operm <- scan1perm(probs, pheno, addcovar=covar, Xcovar=Xcovar,
                   n_perm=1000, perm_Xsp=TRUE,
                   chr_lengths=chr_lengths(iron$gmap))
## End(Not run)


summary(operm, alpha=c(0.20, 0.05))

rqtl/qtl2scan documentation built on May 28, 2019, 2:36 a.m.