% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/seqArchRplus_strand_distributions.R
\name{per_cluster_strand_dist}
\alias{per_cluster_strand_dist}
\title{Visualize as barplots how promoters in each cluster are distributed
on different chromosomes and strands}
\usage{
per_cluster_strand_dist(
  sname,
  clusts,
  info_df,
  dir_path = NULL,
  colrs = c("#FB8072", "#80B1D3"),
  txt_size = 14,
  fwidth = 20,
  fheight = 3
)
}
\arguments{
\item{sname}{The sample name}

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

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

\item{dir_path}{Specify the path to the directory on disk where plots
will be saved}

\item{colrs}{Specify colors used for two strands. By default, the fourth
and fifth color from the palette 'Set3' are used}

\item{txt_size}{Size of the text in the plots (includes plot title,
y-axis title, axis texts, legend title and text)}

\item{fwidth}{Width of the individual plots in file}

\item{fheight}{Height of the plots in file}
}
\value{
A list of plots showing the per cluster division of promoters on
chromosomes and strands. These plots are also written to disk in file named
"Per_cluster_strand_distributions.pdf"
}
\description{
Visualize as barplots how promoters in each cluster are distributed
on different chromosomes and strands
}
\examples{

library(RColorBrewer)
bed_fname <- system.file("extdata", "example_info_df.bed.gz",
         package = "seqArchRplus", mustWork = TRUE)

info_df <- read.delim(file = bed_fname,
         sep = "\t", header = TRUE,
         col.names = c("chr", "start", "end", "width",
                 "strand", "score", "nr_ctss",
                 "dominant_ctss", "domTPM",
                 "q_0.1", "q_0.9", "IQW", "tpm"))

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

pair_colrs <- RColorBrewer::brewer.pal(n = 5, name = "Set3")[4:5]
per_cl_strand_pl <- per_cluster_strand_dist(sname = "sample1",
                                            clusts = use_clusts,
                                            info_df = info_df,
                                            dir_path = tempdir(),
                                            colrs = pair_colrs
                                            )

}
\author{
Sarvesh Nikumbh
}
