\name{homozygote}

\alias{homozygote}
\alias{homozygote.geneSet}
\alias{heterozygote}
\alias{heterozygote.geneSet}
\alias{carrier}
\alias{carrier.geneSet}
\alias{dominant}
\alias{dominant.geneSet}
\alias{recessive}
\alias{recessive.geneSet}

\title{Flag observations with specific allele patterns}
\description{
 \describe{
  \item{homozygote}{Flag observatsions with identical alleles}
  \item{heterozygote}{Flag observations with discordant alleles}
  \item{carrier}{Flag observations containing a specified allele}
  \item{dominant}{Flag observations containing one or more of the 
    specified alleles.}
  \item{recessive}{Flag observations containing only the 
                      specified alleles.}
 }
}

\usage{
homozygote(object, ...)
homozygote.geneSet(object, allele.names, marker, ...)

heterozygote(object, ...)
heterozygote.geneSet(object, allele.names, marker, ...)

carrier(object, ...)
carrier.geneSet(object, allele.names, marker, ...)

dominant(object, ...)
dominant.geneSet(object, allele.names, marker, ...)

recessive(object, ...)
recessive.geneSet(object, allele.names, marker, ...)

}
\arguments{
  \item{object}{ \code{geneSet} object }
  \item{allele.names}{ (optional) allele names.}
  \item{marker}{ (optional) marker names }
  \item{\dots}{ (optional) additional arguments supplied}
}
\value{

  matrix of logicals.
}
\author{Gregory R. Warnes \email{warnes@bst.rochester.edu}
         and Nitin Jain \email{nitin.jain@pfizer.com} }
\seealso{
  \code{\link{geneSet}},
  \code{\link{extractAlleles}}
}
\examples{

data(CAMP)
lCAMP <- CAMP[,1:10] # 10 observations

# see the genotypes
genotypes(lCAMP)

# which ones are homozygotes?
homozygote(lCAMP)

# which ones are carriers  for allele "2"?
carrier(lCAMP, allele.names="2")

# which markers are heterozygotes for marker m709
heterozygote(lCAMP, marker="m709")

# if '1' is dominant, which ones will show the
# '1' phenotype for marker m47?
dominant(lCAMP, allele.names="1", marker="m47")

# if '2' is recessive, which ones will show the
# '2' phenotype for marker m523?
recessive(lCAMP, allele.names="2", marker="p523")

}
\keyword{misc }