p.exact.gaussian: Exact p-values for genome-wide association analysis in inbred...

Description Usage Arguments Value Note Author(s) References See Also Examples

Description

The function imports GenABEL (gwaa.data class) data format and calculates the exact dataset-specific p-values for each variant or a given effect size and allele frequency.

Usage

1
2
p.exact.gaussian(gwaa.object = NULL, n = NULL, maf = NULL, beta,
  beta.maf = NULL, low.maf = 0.05, type = "two-sided")

Arguments

gwaa.object

An (optional) object of gwaa.data-class.

n

An (optional) integer gives the sample size, only used when gwaa.object = NULL.

maf

An (optional) vector gives minor allele frequencies across the genome, only used when gwaa.object = NULL.

beta

An vector gives the effect sizes to be tested, and beta.maf must also be given if not testing for the whole genome.

beta.maf

An (optional) vector gives the minor allele frequencies in accordance with beta, must be used together with beta. If beta.maf is missing, exact p-values will be calculated for the whole genome.

low.maf

A numeric value that givens the cut-off of the lowest minor allele frequency allowed in the analysis.

type

A string tells the statistical test type, can be 'one-sided' or 'two-sided'.

Value

The function returns a data frame of exact p-values ($p.exact) and corresponding effect sizes $beta and MAFs $MAF.

Note

None.

Author(s)

Xia Shen

References

Xia Shen (2015). Flaw or discovery? Calculating exact p-values for genome-wide association studies in inbred populations. Submitted.

See Also

qtscore, t.test

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
## loading example gwaa.data of data from Atwell et al. (2010) Nature
data(arab)

## running a regular GWA analysis for long-day flowering time
y <- qnorm((rank(phdata(arab)$X1_LD, na.last = "keep") - 0.5)/sum(!is.na(phdata(arab)$X1_LD)))
qt1 <- qtscore(y, data = arab)

## calculating all the exact p-values for the whole genome markers
exact <- p.exact.gaussian(arab, beta = qt1[,'effB'])

## End(Not run)

p.exact documentation built on May 2, 2019, 6:10 p.m.