% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/seqArchRplus_cluster_seqlogos.R
\name{per_cluster_seqlogos}
\alias{per_cluster_seqlogos}
\title{Plot per cluster sequence logos}
\usage{
per_cluster_seqlogos(
  sname,
  seqs = NULL,
  clusts,
  pos_lab = NULL,
  bits_yax = "max",
  strand_sep = FALSE,
  one_plot = TRUE,
  info_df = NULL,
  txt_size = 12,
  save_png = FALSE,
  dir_path = NULL
)
}
\arguments{
\item{sname}{The sample name}

\item{seqs}{The raw sequences as a \code{\link[Biostrings]{DNAStringSet}}.
These are also available as part of the seqArchR result object.}

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

\item{pos_lab}{The position labels}

\item{bits_yax}{The yaxis limits. Possible values are "full", and "auto".
See argument in \code{\link[seqArchR]{plot_ggseqlogo_of_seqs}} for more
details}

\item{strand_sep}{Logical. Whether sequences are to be separated by strand.}

\item{one_plot}{Logical. Whether all sequence logos should be combined
into one grid (with ncol = 1)?}

\item{info_df}{The information data.frame}

\item{txt_size}{The font size for text}

\item{save_png}{Logical. Set TRUE if you would like to save the
architectures sequence logos as PNG files}

\item{dir_path}{The /path/to/the/directory where plot will be saved. Default
is NULL}
}
\value{
If `one_plot` is TRUE, one plot as a grid of all sequence logos is
returned.

If `one_plot` is FALSE, a set of ggplot2-based sequence logos for all
clusters is saved to disk with the default filename
`Architectures_0-max.pdf` in the location provided by `dir_path`. This is
a multi-page PDF document with the sequence logo for each cluster on a
separate page. Also, the list of plots is returned.

With `strand_sep = TRUE`, the `one_plot` option is not available. In other
words, only a list of plots is returned. When `dir_path` is not NULL, the
default filename used is `Architectures_0-max_strand_separated.pdf`.
}
\description{
Plot per cluster sequence logos
}
\details{
Plots the sequence logos of all clusters
}
\examples{

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

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

seqlogo_pl <- per_cluster_seqlogos(sname = "sample1",
                                   seqs = raw_seqs,
                                   clusts = use_clusts,
                                   pos_lab = -45:45,
                                   bits_yax = "auto",
                                   strand_sep = FALSE,
                                   one_plot = TRUE,
                                   dir_path = tempdir(),
                                   txt_size = 14)

}
\author{
Sarvesh Nikumbh
}
