% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotEnrich.R
\name{plotEnrich}
\alias{plotEnrich}
\title{Plot the results of \code{enrichSEMs}}
\usage{
plotEnrich(
  e,
  sem,
  label = "transcription_factor",
  method = "WPCC",
  threshold = 0.05,
  lineWidth = 0.5,
  textCols = c("darkgrey", "black"),
  textCex = 1,
  heatmapCols = c("white", "red"),
  pvalRange = c(0, 20)
)
}
\arguments{
\item{e}{The resulting data.table from \code{enrichSEMs}}

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

\item{label}{Column in semData(sem) to use for tree labels}

\item{method}{Method to use for SEM comparison.
See ?universalmotif::compare_motifs for options.}

\item{threshold}{The adjusted p-value threshold for coloring SEMs}

\item{lineWidth}{A numeric specifying the dendrogram line width}

\item{textCols}{A vector of two colors to label non-significant and
significant SEMs respectively.}

\item{textCex}{Text size of SEM labels.}

\item{heatmapCols}{A vector of two colors to use for the heatmap, ordered
low to high \code{-log10(padj)}.}

\item{pvalRange}{A vector of 2 numerics to use as the scale range for the
heatmap of \code{-log10(padj)}.}
}
\value{
a \code{ggtree} object
}
\description{
Generates a circular dendrogram, clustering SNP Effect Matrices on
similarity and a heatmap representing the -log10 transformed
adjusted p-value of a SEMPLR enrichment.
}
\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)

e <- enrichSEMs(sb, SEMC)
plotEnrich(e, SEMC)

}
