% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/enrichSEMs.R
\name{enrichSEMs}
\alias{enrichSEMs}
\title{Calculates binding enrichment for motif(s)}
\usage{
enrichSEMs(x, sem, background = NULL, seqs = NULL, nFlank = 0, genome = NULL)
}
\arguments{
\item{x}{The scoring table produced by \code{scoreBinding}}

\item{sem}{A \code{SNPEffectMatrix} or \code{SNPEffectMatrixCollection} object}

\item{background}{A \code{GRanges} object or a list of DNA sequences to use as a
background set for the binomial test. The length of each sequence must match
the length of sequences in \code{x}. By default, will scramble the provided
sequences.}

\item{seqs}{The sequences scored in \code{scoreBinding}}

\item{nFlank}{Number of flanking nucleotides added to the sequences. Defaults
to the length of the longest motif. If no flanks were added (ie, sequences
were scored rather than a \code{GRanges}), use \code{nFlank = 0}.}

\item{genome}{A \code{BSGenome} object. Requried if background isn't specified.}
}
\value{
a \code{list} of matrices
}
\description{
Perform a binomial test to determine if SNP Effect Matrices are bound more
often than expected.
}
\examples{

# load SEMs

# note that this is a small example for demonstration purposes
# in actual enrichment analyses sets of 100+ ranges are recommended

# create a GRanges object
gr <- GenomicRanges::GRanges(
    seqnames = "chr12",
    ranges = 94136009
)

# calculate binding propensity
sb <- scoreBinding(gr, SEMC, BSgenome.Hsapiens.UCSC.hg19::Hsapiens)

enrichSEMs(sb, SEMC)

}
