% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scoreBinding.R
\name{scoreBinding}
\alias{scoreBinding}
\title{Calculate binding propensity for all SEM motifs and
genomic positions provided}
\usage{
scoreBinding(x, sem, genome, nFlank = NULL, seqId = NULL, rc = TRUE)
}
\arguments{
\item{x}{\code{GRanges} object or a vector of DNA sequences}

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

\item{genome}{A \code{BSgenome} object for the genome build to use. ie.
\code{BSgenome.Hsapiens.UCSC.hg19::Hsapiens}. Required if providing a GRanges
object. Ignored if providing a vector of sequences.}

\item{nFlank}{Number of flanking nucleotides to add to provided range. By
default will add flank equal to the length of the longest motif. Ignored
if providing a vector of sequences.}

\item{seqId}{Column in \code{GRanges} object to use for unique id.
By default, ids will be generated from the \code{seqnames} and \code{ranges.}
Ignored if not providing a \code{GRanges} object.}

\item{rc}{plot the reverse complement SEMs}
}
\value{
If a \code{GRanges} object is provided, return a \code{SEMScores} object.
If a list of sequences is provided, just return the scoring table.
The scoring table will contain the following columns:
\itemize{
\item seqId: a unique identifier for the sequence scored
\item SEM: the identifier for the SEM
\item rc: the orientation of the sequence (fwd or rev)
\item score: the unnormalized SEM score
\item scoreNorm: the SEM score normalized to it's corresponding baseline
\item index: the index of the motif with the highest SEM score within the
sequence scored
\item seq: the motif sequence with the highest SEM scores within the sequence
scored
}
}
\description{
Calculate binding propensity for all SEM motifs and
genomic positions provided
}
\examples{
# load SEMs

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

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

}
