% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getBackgroundBins.R
\name{sampleBackgroundPeaks}
\alias{sampleBackgroundPeaks}
\title{sampleBackgroundPeaks}
\usage{
sampleBackgroundPeaks(background, niterations = 50)
}
\arguments{
\item{background}{A \code{bcvBackground} produced by
\code{\link{getBackgroundBins}}.}

\item{niterations}{Number of background peaks to sample for each target peak.}
}
\value{
A peaks x niterations matrix of integers representing the indices of
the sampled background peaks.
}
\description{
Given a background generated by \code{\link{getBackgroundBins}}, samples
background peaks for each input peak.
}
\details{
This function is not used by \code{\link{betterChromVAR}}, which is
deterministic, but for other applications requiring an outputs similar to
that of the original \code{\link[chromVAR]{getBackgroundPeaks}}.
}
\examples{
counts_se <- getDummyData()$counts
background <- getBackgroundBins(counts_se)
bg_peaks <- sampleBackgroundPeaks(background, niterations=20)
}
