\name{desMarkers}
\alias{desMarkers}
\title{Descriptive statistics for markers}
\description{
Descriptive statistics for markers.
}

\usage{
desMarkers(geneSetObj,
           founderOnly=TRUE,
           thrsh=0.05,
           HWE.method=c("simulate","exact"),
           simulate.p.value=FALSE,
           B=10000,
           markerThrsh=100,
           maxDist=5,
           LDmeasure="r2",
           plot=TRUE,
           ...)
}

\arguments{
  \item{geneSetObj}{a \code{geneSet} object.}
  \item{founderOnly}{indicates if using only founder info}
  \item{thrsh}{threshold for Hardy-Weinberg equilibrium test. If the pvalue of the HWE test for a marker is greater than \code{thrsh}, then the marker is a good marker.}
  \item{HWE.method}{method to do Hardy-Weinberg equilibrium test.}
 \item{simulate.p.value}{indicates if the pvalue of the HWE test is calculated by Monte Carlo simulation. \code{simulate.p.value=FALSE} means the pvalue is calculated from asymptotic chi-squared distribution of the test statistic. Otherwise, Monte Carlo simulation is used to calculate pvalue. For more details, please refers to the \code{R} function \code{chisq.test}.}
  \item{B}{the number of replicates used in Monte Carlo simulation to get the pvalue of HWE test. For more details, please refers to the \code{R} function \code{chisq.test}.}
  \item{markerThrsh}{if the number of markers is greater than this threshold, then 'LDdist' is called instead of 'LD'.}
  \item{maxDist}{the width of window used in 'LDdist' function.}
  \item{LDmeasure}{indicates if \code{r^2} or \code{\special{D'}} is to be plot.}
  \item{plot}{indicates if LD plot is output or not.}
  \item{...}{Other arguments that are used by HWE.chisq or HWE.exact.}
 }

\value{
 a data frame contains components: 
 \item{Name}{marker names}
 \item{Position}{marker positions}
 \item{ObsHET}{marker's observed heterozygosity (i.e., proportion of
   heterozygotes at markes). Missing alleles are excluded in the calculation.} 
 \item{PredHET}{marker's predicted heterozygosity (i.e., \code{2*MAF*(1-MAF)}). Missing alleles are excluded in the calculation.}
 \item{HWpval}{pvalues for Hardy-Weinberg test}
 \item{pGeno}{percentage of non-missing genotypes for markes}
 \item{MAF}{minor allele frequencies. missing allele are excluded from calculation}
 \item{Rating}{\code{Rating[i]=1} means that the \eqn{i}-th marker passes HW
   test (do not reject H0 that HW equilibrium holds). \code{Rating[i]=0} means
   HW equilibrum does hold for the \eqn{i}-th marker.} 
}
\author{Weiliang Qiu \email{stwxq@channing.harvard.edu}, Ross Lazarus \email{ross.lazarus@channing.harvard.edu}}
\examples{
  #data(CAMP)
  #res<-desMarkers(CAMP)
  #print(res)
}
\keyword{htest}