DGCA (version 1.0.1)

plotCors: Plot gene pair correlations in multiple conditions.

Description

Takes the original input matrix, a design matrix, and two gene symbols to plot the corelation in the conditions specified.

Usage

plotCors(inputMat, design, compare, corrType = "pearson", geneA, geneB,
  oneRow = FALSE, smooth = TRUE, log = FALSE, ylab = NULL,
  xlab = NULL)

Arguments

inputMat

The matrix (or data.frame) of values (e.g., gene expression values from an RNA-seq or microarray study) that you are interested in analyzing. The rownames of this matrix should correspond to the identifiers whose correlations and differential correlations you are interested in analyzing, while the columns should correspond to the rows of the design matrix and should be separable into your groups.

design

A standard model.matrix created design matrix. Rows correspond to samples and colnames refer to the names of the conditions that you are interested in analyzing. Only 0's or 1's are allowed in the design matrix. Please see vignettes for more information.

compare

Vector of two character strings, each corresponding to one group name in the design matrix, that should be compared.

corrType

The correlation type of the analysis, limited to "pearson" or "spearman". Default = "pearson".

geneA

The first gene symbol.

geneB

The second gene symbol.

oneRow

Coerce all of the conditions to be plotted on the same row (as opposed to wrapping to multiple rows; relevant if there are >3 conditions).

smooth

Whether to perform lm-based smoothing of the trend in each condition and add this to the plot.

log

Logical, indicating whether the data should be log2-transformed prior to plotting (after adding a small constant of 0.5 to avoid problems with the log transform).

ylab

Override the y-axis label to one of your choice.

xlab

Override the x-axis label to one of your choice.

Value

A ggplot2 object that can be plotted, further modified, and/or saved.