% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/heatmapfunction.R
\name{diffr_pheatmap}
\alias{diffr_pheatmap}
\title{Function to create a heatmap from differential gene expression values}
\usage{
diffr_pheatmap(
  expr.mat,
  clinical.mat,
  scale.fl = "none",
  legend.fl = TRUE,
  row.clust = TRUE,
  col.clust = TRUE,
  biserial.fl = FALSE,
  quantile.breaks.fl = FALSE,
  signif.stars.fl = FALSE,
  cell.size = 8,
  font.size = 10,
  color.blind.pal = "PuOr",
  n.pal.cols = 11,
  color.extremes = c("#3182BD", "#E6550D"),
  palette.length = NULL,
  anno.color = NULL,
  main = NULL,
  add.main = NULL,
  filt.info = NULL
)
}
\arguments{
\item{expr.mat}{differential expression matrix in  (genes, samples) format}

\item{clinical.mat}{matrix with clinical annotation values in (clinical category, samples) format}

\item{scale.fl}{character indicating if values should be centred and scaled in either
the row direction or the column direction, or none (values %in%
("row","column","none"), default = none)}

\item{legend.fl}{logical to determine if legend should be drawn or not (default = TRUE)}

\item{row.clust}{boolean values determining if rows should be clustered}

\item{col.clust}{boolean values determining if cols should be clustered}

\item{biserial.fl}{= boolean values determining if biserial correlation is calculated
and corresponding heatmap output, assuming clinical.mat is provided}

\item{quantile.breaks.fl}{boolean values determining if quantile breaks are used to change
the colors of the heatmap, otherwise min-max breaks are used by default}

\item{signif.stars.fl}{boolean determining whether significance stars of p-values are shown in the correlogram (default = FALSE)}

\item{cell.size}{double determining the width and height of the cell and the row/col font size (default = 8)}

\item{font.size}{double determining the font size (default = 10)}

\item{color.blind.pal}{string determining the color-blind-friendly palette; must be one of
RColorBrewer's diverging palettes (default = "PuOr"); other option can be visualized with the following command:
brewer.pal.info[brewer.pal.info$colorblind,]}

\item{n.pal.cols}{desired length of the number of different colours in 'color.blind.pal'. Will also be used
as length of the numeric vector of probabilities in 'quantile_breaks()' (see ?quantile); must be within 3:11;
defaults to 11}

\item{color.extremes}{character vector of length 2 giving the two extremes of a user-defined colour palette
varying from the first hue to the second via white.}

\item{palette.length}{integer setting the desired length of the colour palette to be used in the heatmap}

\item{anno.color}{list of named character vectors giving the colours used in the heatmap annotation bars. See 'annotation_colors'
in [pheatmap()]. Automatically generated if NULL (default).}

\item{main}{\code{character}. Main plot title.}

\item{add.main}{\code{character}. Optional text added in parenthesis to the plot title.}

\item{filt.info}{\code{character}. Optional information on the filtering strategy added in parenthesis to the plot title.}
}
\value{
Returns a list of pheatmap plot objects used in the pheatmap_plots() function.
}
\description{
Function to create a heatmap from differential gene expression values
}
\details{
The plot is produced as a side effect of function 'pheatmap_plots()' by printing the individual
plot objects generated by 'diffr_pheatmap()'.
}
\examples{
\donttest{
si <- diff_expr_get_samp_info(diffwrap_samp_info, "SampleName", "Group")
counts <- diff_expr_filter_counts(diff_expr_read_counts(diffwrap_counts, si), si)
expr <- edgeR::cpm(counts, log = TRUE)[1:30, ]
clin <- data.frame(Group = si$Groups, row.names = si$SampleNames)
hm <- diffr_pheatmap(expr, clin)
}
}
\author{
Bogdan Iancu - Genevia Technologies Oy
}
