Description Usage Arguments Value Note Author(s) References See Also Examples
The function imports GenABEL (gwaa.data class) data format and calculates the exact dataset-specific p-values of a case-control phenotype for each variant or a given odds ratio and allele frequency.
1 2 3 | p.exact.binary(pheno, gwaa.object, or = NULL, or.maf = NULL,
low.maf = 0.05, high.ld = 1, method = "logOR", type = "two-sided",
con.table = NULL)
|
pheno |
A string that gives the binary phenotype name in |
gwaa.object |
An object of |
or |
An (optional) vector gives the odds ratios to be tested, and |
or.maf |
An (optional) vector gives the minor allele frequencies in accordance with
|
low.maf |
A numeric value that gives the cut-off of the lowest minor allele frequency allowed in the analysis. |
high.ld |
A numeric value that gives the cut-off of the highest linkage disequilibrium R-square allowed in the analysis, i.e. LD pruning. |
method |
A string tells the method used, currently only "logOR" is available. |
type |
A string tells the statistical test type, can be |
con.table |
Genome-wide contingency tables. If |
The function returns a data frame of exact p-values ($p.exact
) and corresponding odds
ratios $or
and MAFs $MAF
.
None.
Xia Shen
Xia Shen (2015). Flaw or discovery? Calculating exact p-values for genome-wide association studies in inbred populations. Submitted.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
## loading example gwaa.data of data from Atwell et al. (2010) Nature
data(arab)
## running a regular GWA analysis for AvrRPM1
cc1 <- ccfast('X33_.i.avrRpm1..i.', data = arab)
## check the top finding using the exact p-value
## con.table is calculated when running the first time
## rerunning for checking other markers will be fast
top <- which.min(cc1[,'P1df'])
ctab <- table(phdata(arab)$X33_.i.avrRpm1..i., as.double(arab[,top]))
ctab[ctab == 0] <- ctab[ctab == 0] + .5
or <- ctab[1,1]*ctab[2,2]/ctab[2,1]/ctab[1,2]
f <- summary(arab[,top])$Q.2
maf <- min(f, 1 - f)
exact <- p.exact.binary(pheno = 'X33_.i.avrRpm1..i.', gwaa.object = arab,
or = or, or.maf = maf, con.table = 'tab.AvrRPM1.RData')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.