get_xy_lims: Accessory function for determining x and y limits for volcano...

Description Usage Arguments Details Value

View source: R/get_xy_lims.R

Description

This function determines appropriate x and y limits for volcano plots or sets of volcano plots.

Usage

1
2
3
4
5
6
7
8
9
get_xy_lims(topGenes,
            pairwise=FALSE,
            x_symmetric=TRUE,
            adjust_factor=0.01,
            y_floor_zero=TRUE,
            x_col="logFC", y_col="adj.P.Val",
            neg_log10_ycol=TRUE,
            min_x_abs=NULL,
            min_y2=NULL)

Arguments

topGenes

a data frame or list of data frame. Each data frame typically contains the output of a call to topTable. Must contain genes, log2 fold-change, and adjusted p-values.

pairwise

logical, whether topGenes contains multiple comparisons. Defaults to FALSE. If TRUE, the function finds common limits for all plots based on the most extreme values across all comparisons.

x_symmetric

logical, whether the x-axis should be made symmetric.

adjust_factor

numeric, the factor for adjusting the limits of the x- and y-axes. The returned limits will be extended by this much to allow points at the extremes of the plot to fit. Defaults to 0.01.

y_floor_zero

logical, whether to set the lower limit of y to 0. Defaults to TRUE.

x_col, y_col

character or integer, the name or number of the columns containing the data to be plotted on the x- and y-axes. Default to "logFC" and "adj.P.Val", respectively.

neg_log10_ycol

logical, whether the y-axis will be plotted as (-log10(y)). Defaults to TRUE, as the function is intended for use with p-values.

min_x_abs

numeric, the minimum absolute value for the extent of the x-axis. Defaults to NULL, which sets no default. Typically used when plotting with thresholds, to ensure that threshold value is shown.

min_y2

numeric, the minimum value for upper limit the y-axis. Defaults to NULL, which sets no default. Typically used when plotting with thresholds, to ensure that threshold value is shown.

Details

This function finds reasonable x- and y-limits for plots; it is specifically designed for use with volcano plots.

Value

A list, with vectors for x- and y-limits.


BenaroyaResearch/limmaTools documentation built on Dec. 17, 2021, 10:49 a.m.