pca_batch: PCA Plot with batch information

Description Usage Arguments

View source: R/pca_batch.R

Description

Plots the first two principal components for all the samples of a gene expression dataset along with the batch information

Usage

1
2
3
4
5
6
7
8
9
pca_batch(
  exprData,
  batch.info,
  batch,
  NameString = "",
  cond = "",
  when = "",
  return.plot = FALSE
)

Arguments

exprData

A matrix containing gene expression data. Row names should be samples and column names should be genes.

batch.info

A data frame containing the samples names and details of the batch they belong to.

batch

Title of the batch the data is being corrected for.

NameString

string that will be appear in all output filenames. Default="" (empty string)

cond

The column name in the batch.info data which denotes biological condition, if there are any to be considered for PCA plots, i.e. do you want different shapes for cancer and normal samples? If you don't need the conditions or have the dataset with one kind of samples, no need to add this argument.

when

String indicating for which dataset is the PCA plot being created

return.plot

Should the plot be returned as an object to the environment? If FALSE, plot is saved to a pdf file, if TRUE, plot is returned to the environment. Default = FALSE

@import grDevices @import stats @import graphics


jankinsan/BatchEC documentation built on Sept. 9, 2021, 8:12 p.m.