pedHardyWeinberg {fbat}R Documentation

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

geneSetObj a geneSet object.
pedObj a list with five elements: ped, columns, markerNames, Position, and filename. 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; 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"); founderOnly indicates if using only founder info; markerNames is a vector of marker names; Position is a vector of marker positions; fileName is the pedigree file name
threshold a threshold to check if expected frequencies of genotypes are too small.
founderOnly indicates if using only founder info
quiet print intermediate results if quiet=FALSE.

Value

resMat A matrix records the following quantities for all markers (rows correspond to markers): nInfoInd (number of informative individuals, i.e. individuals whose genotypes contain no missing alleles for the specified marker), nGenotype (number of possible genotypes), nHET (number of heterozygous genotypes), nHOM (number of homozygous genotypes), nAllele (number of alleles), nMissing (number of missing alleles), chi2 (chi square test statistic), df (degree of freedom of the chi square test statistic under H0), p-value (pvalue of the test).
genotype A list of possible genotypes and their frequencies for all markers.
nGenotype.vec A vector of numbers of possible genotypes for all markers.
piVec Allele frequencies for all markers.

Author(s)

Weiliang Qiu stwxq@channing.harvard.edu, Ross Lazarus ross.lazarus@channing.harvard.edu, Gregory Warnes warnes@bst.rochester.edu, Nitin Jain 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")

[Package fbat version 1.6.0 Index]