% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/qc_plots.R
\name{diff_expr_mds_plot}
\alias{diff_expr_mds_plot}
\title{Wrapper around `limma::plotMDS` to generate a MDS plot}
\usage{
diff_expr_mds_plot(
  d,
  groups,
  n = 500,
  sample.plot.names = NULL,
  analysis.name = NULL,
  do.pdf = FALSE,
  out.dir
)
}
\arguments{
\item{d}{Passed to \code{plotMDS()} (\code{x}): Any data object that can be coerced to a matrix of log-expression values,
for example an ExpressionSet or an EList. Rows represent genes or genomic features while columns represent samples.}

\item{groups}{Factor of sample groups for colouring and legend.}

\item{n}{Passed to \code{plotMDS()} (\code{top}): Integer; number of top genes used to calculate pairwise distances.}

\item{sample.plot.names}{Passed to \code{plotMDS()} (\code{labels}): character vector of sample names or labels. Defaults to colnames(d).}

\item{analysis.name}{Character used in the plot title and the output file name if the plot is saved to a PDF}

\item{do.pdf}{Logical indicating whether a PDF should be produced.}

\item{out.dir}{Character; path where to save PDF. Required; no default is used so that nothing is written to the working directory unintentionally.}
}
\value{
No return value. Called for its side effect of drawing a multidimensional scaling plot,
  optionally into a PDF file below \option{out.dir}.
}
\description{
Wrapper around `limma::plotMDS` to generate a MDS plot
}
\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)
groups <- stats::relevel(si$Groups, ref = "control")
d <- edgeR::calcNormFactors(edgeR::DGEList(counts, group = groups))
diff_expr_mds_plot(d, groups = groups, do.pdf = FALSE, out.dir = tempdir())
}
}
\seealso{
[plotMDS()]
}
