% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simulate.R
\name{simulate_sites}
\alias{simulate_sites}
\title{Simulate the shotgun sequencing of a diploid loci.}
\usage{
simulate_sites(haplotype.1, haplotype.2, coverage, error)
}
\arguments{
\item{haplotype.1}{character; the first haplotype  A, C, G or T of the locus.}

\item{haplotype.2}{character; the second haplotype A, C, G or T of the locus.}

\item{coverage}{numeric;   the average sequencing depth of the sequencing.}

\item{error}{numeric 4 x 4 matrix; the error matrix as produced by the
\code{\link{error_jc}} function}
}
\value{
a tibble with seven columns. \code{haplotype.1} and \code{haplotype.2} are both
        the true happlotypes at the given locus. \code{haplotype.1} is by convention 
        always lexicographically smaller than \code{haplotype.2}. 
        \code{coverage} the actual sequencing
        depth at that locus. It a random number drawn from a Poisson distribution
        of mean \code{coverage}. \code{A}, \code{C}, \code{G}, \code{T} 
        the simulated observation of each nucleotide after the sequencing.
}
\description{
Build a contengency table of observed nucleotide for a given site
after its sequencing.
}
\examples{
    simulate_sites(c("A","C","T"),
                   c("A","G","G"),
                   coverage=10,
                   error = error_jc(0.1))
                    
}
\seealso{
\code{\link{error_jc}}
}
\author{
Eric Coissac
}
