Learn R Programming

Ravages (version 1.2.0)

multinomial.asso.freq: 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)

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.

Arguments

x

A bed matrix, only needed if burden="CAST" or burden="WSS"

pheno

The phenotype of each individual: a factor if pheno.type = "categorical", and a numeric vector if pheno.type = "continuous"

ref.level

The reference group of individuals for the estimation of the effect size, only needed if get.effect.size = T

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)

Examples

Run this code
#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)

Run the code above in your browser using DataLab