% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/seqArchRplus_motif_heatmaps.R
\name{plot_motif_heatmaps}
\alias{plot_motif_heatmaps}
\title{Plot heatmaps of motifs occurring in seqArchR clusters}
\usage{
plot_motif_heatmaps(
  sname,
  seqs,
  flanks = c(50),
  clusts,
  use_colors = NULL,
  motifs,
  dir_path,
  fheight = 500,
  fwidth = 500,
  funits = "px",
  n_cores = 1,
  res = 150,
  dev = "png"
)
}
\arguments{
\item{sname}{The sample name}

\item{seqs}{The sequences as a DNAStringSet object}

\item{flanks}{Flank size. The same flank is used upstream and downstream.
A vector of values is also accepted when more than one flanks should be
visualized.}

\item{clusts}{List of sequence Ids in each cluster.}

\item{use_colors}{Specify colors to use}

\item{motifs}{A vector of motifs to be visualized in the sequence. This can
be any words formed by the
\href{https://www.bioinformatics.org/sms2/iupac.html}{IUPAC code}.
For example, TATAA, CG, WW, SS etc.}

\item{dir_path}{The path to the directory}

\item{fheight, fwidth, funits}{Height and width of the image file, and the units
in which they are specified. Units are inches for PDF and SVG, and pixels
for PNG and TIFF devices}

\item{n_cores}{Numeric. If you wish to parallelize,
specify the number of cores. Default is 1 (serial)}

\item{res}{Numeric. The resolution in ppi to be used for producing PNG or
TIFF files. Default is 150}

\item{dev}{Specify the device type. One of 'png', 'tiff', 'pdf', or 'svg'.
Default is 'png'}
}
\value{
Nothing. Images are written to disk using the provided filenames.
}
\description{
Plot heatmaps of motifs occurring in seqArchR clusters
}
\examples{

library(Biostrings)
raw_seqs <- Biostrings::readDNAStringSet(
                          filepath = system.file("extdata",
                            "example_promoters200.fa.gz",
                            package = "seqArchRplus",
                            mustWork = TRUE)
                        )

use_clusts <- readRDS(system.file("extdata", "example_clust_info.rds",
         package = "seqArchRplus", mustWork = TRUE))

plot_motif_heatmaps(sname = "sample1", seqs = raw_seqs,
                    flanks = c(10, 20, 50),
                    clusts = use_clusts,
                    motifs = c("WW", "SS", "TATAA", "CG", "Y"),
                    dir_path = tempdir(),
                    fheight = 800, fwidth = 2400)

}
\author{
Sarvesh Nikumbh
}
