scanWGassociation: Whole genome association analysis

Description Usage Arguments Value References See Also Examples


This function also performs a whole genome association analysis as the function WGassociation but only computes the p values for each SNP corresponding to likelihood ratio test.


scanWGassociation(formula, data, model = c("all"), nperm,
   quantitative = is.quantitative(formula, data), genotypingRate = 80)



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 ~. Currently only is possible to write ~1 (that is, non-adjusted analysis). See WGassociation if you are interested in including additional covariates.


a required dataframe of class 'setupSNP' containing the variables in the model and the SNPs


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.


number of permutations to simulate the null hypotesis (e.g OR=1), conditioning on the empirical correlation structure. Only required to perform a permutation test. Currently this test is only available for binary traits.


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.


minimum percentage of genotype rate for a given SNP to be included in the analysis. Default is 80%.


An object of class 'WGassociation'.

The function 'print' is used to print the results. The p values are saved in the attribute 'pvalues' as a matrix. They may be obtained using attr(,"pvalues") (see examples). The first column indicates whether a problem with genotyping is present.

The function 'plot' is used to obtain a plot of p values in the -log scale. See plot.WGassociation for further details


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

WGassociation getSignificantSNPs association setupSNP plot.WGassociation permTest


# Next steps may be very time consuming. So they are not executed

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

isglobal-brge/SNPassoc documentation built on April 7, 2018, 1:11 p.m.