R: Whole genome association analysis

WGassociation {SNPassoc} | R Documentation

## Whole genome association analysis

### Description

This function carries out a whole genome association analysis between the SNPs and a dependent variable (phenotype) under five different genetic models (inheritance patterns): codominant, dominant, recessive, overdominant and log-additive. The phenotype may be quantitative or categorical. In the second case (e.g. case-control studies) this variable must be of class 'factor' with two levels.

### Usage

       WGassociation(formula, data, model = c("all"),
                     quantitative = is.quantitative(formula, data),
                     genotypingRate = 80, level = 0.95, ...)

### Arguments

`formula` | either a symbolic description of the model to be fited (a formula object) without the SNP or the name of response variable in the case of fitting single models (e.g. unadjusted models). It might have either a continuous variable (quantitative traits) or a factor variable (case-control studies) as the response on the left of the `~` operator and terms with additional covariates on the right of the `~` operator may be added to fit an adjusted model (e.g., `~`var1+var2+...+varN+SNP). See details
`data` | a required dataframe of class 'setupSNP' containing the variables in the model and the SNPs
`model` | a character string specifying the type of genetic model (mode of inheritance) for the SNP. This indicates how the genotypes should be collapsed. Possible values are "codominant", "dominant", "recessive", "overdominant", "log-additive" or "all". The default is "all" that fits the 5 possible genetic models. Only the first words are required, e.g "co", "do", etc.
`quantitative` | logical value indicating whether the phenotype (that which is in the left of the operator ~ in 'formula' argument) is quantitative. The function 'is.quantitative' returns FALSE when the phenotype is a variable with two categories (i.e. indicating case-control status). Thus, it is not a required argument but it may be modified by the user.
`genotypingRate` | minimum percentage of genotype rate for a given SNP to be included in the analysis. Default is 80%.
`level` | signification level for confidence intervals. Defaul 95%.
`...` | Other arguments to be passed through glm function

### Details

This function assesses the association between the response variable included in the left side in the 'formula' and the SNPs included in the 'data' argument adjusted by those variables included in the right side of the 'formula'. Different genetic models may be analyzed using 'model' argument.

### Value

An object of class 'WGassociation'.

'summary' returns a summary table by groups defined in info (genes/chromosomes).

'WGstats' returns a detailed output, similar to the produced by `association`.

'pvalues' and 'print' return a table of p-values for each genetic model for each SNP. The first column indicates whether a problem with genotyping is present.

'plot' produces a plot of p values in the -log scale. See `plot.WGassociation` for further details.

'labels' returns the names of the SNPs analyzed.

The functions 'codominat', 'dominant', 'recessive', 'overdominant' and 'additive' are used to obtain the p values under these genetic models.

See examples for further illustration about all previous issues.

### References

JR Gonzalez, L Armengol, X Sole, E Guino, JM Mercader, X Estivill, V Moreno. SNPassoc: an R package to perform whole genome association studies. Bioinformatics, 2007;23(5):654-5.

### See Also

`scanWGassociation` `getSignificantSNPs` `association` `WGstats` `setupSNP` `plot.WGassociation`

### Examples

    data(SNPs)
    datSNP<-setupSNP(SNPs,6:40,sep="")
    ansAll<-WGassociation(protein~1,data=datSNP,model="all")

    # In that case the formula is not required. You can also write:
    # ansAll<-WGassociation(protein,data=datSNP,model="all")

    #only codominant and log-additive
    ansCoAd<-WGassociation(protein~1,data=datSNP,model=c("co","log-add"))

    #for printing p values
    print(ansAll)
    print(ansCoAd)

    #for obtaining a matrix with the p palues
    pvalAll<-pvalues(ansAll)
    pvalCoAd<-pvalues(ansCoAd)

    # when all models are fitted and we are interested in obtaining
    # p values for different genetic models

    # codominant model
    pvalCod<-codominant(ansAll)

    # recessive model
    pvalRec<-recessive(ansAll)

    # and the same for additive, dominant or overdominant

    #summary
    summary(ansAll)

    #for a detailed report
    WGstats(ansAll)

    #for plotting the p values
    plot(ansAll)

    #
    # Whole genome analysis
    #

    data(HapMap)
    # Next steps may be very time consuming. So they are not executed

    #myDat<-setupSNP(HapMap, colSNPs=3:9809, sort = TRUE,
    #   info=HapMap.SNPs.pos, sep="")
    #resHapMap<-WGassociation(group~1, data=myDat, model="log")

    # However, the results are saved in the object "resHapMap"
    # to illustrate print, summary and plot functions
    summary(resHapMap)
    plot(resHapMap)
    print(resHapMap)

[Package SNPassoc version 1.9-2 Index]