View source: R/multinomial.asso.freq.r
| multinomial.asso.freq | R Documentation |
Performs an association test between categorical phenotypes and single variants
multinomial.asso.freq(x, pheno = x@ped$pheno, ref.level,
test = c("Genotypic", "Allelic"), get.effect.size = F,
min.maf.threshold = 0.05)
x |
A bed matrix, only needed if |
pheno |
The phenotype of each individual: a factor if |
ref.level |
The reference group of individuals for the estimation of the effect size, only needed if |
test |
Whether to perform the test on the three genotypes ("Genotypic") or on the two alleles ("Allelic") |
get.effect.size |
TRUE/FALSE: whether to return effect sizes of the variants (OR) |
min.maf.threshold |
MAF threshold used to define a frequent variant to apply single-variant test |
This association test is based on a chi-square with the following number of df:
If test = "Genotypic", (number of groups of individuals - 1)* 2
If test = "Allelic", (number of groups of individuals - 1)
A dataframe with one row per variant and three columns: the chromosome, position and p-value of each variant.
If get.effect.size = T, a list with Asso containing the previous dataframe and OR containing the OR in each group for each variant.
#Import data in a bed matrix
x <- read.bed.matrix( system.file("extdata", "LCT.EUR.b37.bed", package="Ravages") )
#Group variants within known genes
x <- set.genomic.region(x)
#Perform association test
x.freq.asso <- multinomial.asso.freq(x, test = "Genotypic",
pheno = x@ped$population)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.