\name{pedHardyWeinberg} \alias{pedHardyWeinberg} \alias{pedHardyWeinberg.default} \title{Test Hardy-Weinberg equilibrium for each marker based on parental data} \description{ Test Hardy-Weinberg equilibrium for each marker based on parental data. } \usage{ pedHardyWeinberg(geneSetObj, threshold=3, founderOnly=TRUE, quiet=FALSE) pedHardyWeinberg.default(pedObj, threshold=3, founderOnly=TRUE, quiet=FALSE) } \arguments{ \item{geneSetObj}{a \code{geneSet} object.} \item{pedObj}{a list with five elements: \code{ped}, \code{columns}, \code{markerNames}, \code{Position}, and \code{filename}. \code{ped} is a pedigree data frame whose first 6 columns are family (pedigree id), pid (patient id), father (father id), mother (mother id), sex, affected (affection status). The remaining columns are pairs of marker alleles. Each row corresponds to an individual; \code{columns} are the names of the first 5 (or 6) columns of ped file. It should be either equal to c("family","pid","father","mother","sex","affected") or equal to c("family","pid","father","mother","sex"); \code{founderOnly} indicates if using only founder info; \code{markerNames} is a vector of marker names; \code{Position} is a vector of marker positions; \code{fileName} is the pedigree file name} \item{threshold}{a threshold to check if expected frequencies of genotypes are too small.} \item{founderOnly}{indicates if using only founder info} \item{quiet}{print intermediate results if \code{quiet=FALSE}.} } \value{ \item{resMat}{A matrix records the following quantities for all markers (rows correspond to markers): \code{nInfoInd} (number of informative individuals, i.e. individuals whose genotypes contain no missing alleles for the specified marker), \code{nGenotype} (number of possible genotypes), \code{nHET} (number of heterozygous genotypes), \code{nHOM} (number of homozygous genotypes), \code{nAllele} (number of alleles), \code{nMissing} (number of missing alleles), \code{chi2} (chi square test statistic), \code{df} (degree of freedom of the chi square test statistic under H0), \code{p-value} (pvalue of the test).} \item{genotype}{A list of possible genotypes and their frequencies for all markers.} \item{nGenotype.vec}{A vector of numbers of possible genotypes for all markers.} \item{piVec}{Allele frequencies for all markers.} } \author{ Weiliang Qiu \email{stwxq@channing.harvard.edu}, Ross Lazarus \email{ross.lazarus@channing.harvard.edu}, Gregory Warnes \email{warnes@bst.rochester.edu}, Nitin Jain \email{nitin.jain@pfizer.com} } \examples{ data(CAMP) res<-pedHardyWeinberg(CAMP) viewHW(res, "m709") viewHW(res, "m654") viewHW(res, "m47") viewHW(res, "p46") viewHW(res, "p79") viewHW(res, "p252") viewHW(res, "p491") viewHW(res, "p523") } \keyword{htest}