multinomial.asso.freq {Ravages} | R Documentation |
Single variant association test with categorical phenotype
Description
Performs an association test between categorical phenotypes and single variants
Usage
multinomial.asso.freq(x, pheno = x@ped$pheno, ref.level,
test = c("Genotypic", "Allelic"), get.effect.size = F,
min.maf.threshold = 0.05)
Arguments
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 |
Details
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)
Value
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.
Examples
#Import data in a bed matrix
x <- as.bed.matrix(x=LCT.matrix.bed, fam=LCT.matrix.fam, bim=LCT.snps)
#Add population
x@ped[,c("pop", "superpop")] <- LCT.matrix.pop1000G[,c("population", "super.population")]
#Select EUR superpopulation
x <- select.inds(x, superpop=="EUR")
x@ped$pop <- droplevels(x@ped$pop)
#Perform association test
x.freq.asso <- multinomial.asso.freq(x, test = "Genotypic",
pheno = x@ped$pop)