get_manhattanplots: get_manhattanplots

Description Usage Arguments Details Value Note Author(s)

View source: R/get_manhattanplots.R

Description

Function to generate Manhattan plots.

Usage

1
2
3
4
get_manhattanplots(xvec, yvec, up_or_down, maintext = "", ythresh = 0.05,
y2thresh=NA, ylab, xlab, colorvec = c("darkgreen", "firebrick1"),
col_seq = c("brown", "chocolate3", "orange3", "coral", "pink", "skyblue",
"blue", "darkblue", "purple", "violet"), xincrement = 150, yincrement = 1)

Arguments

xvec

Vector with values for the x-axis. eg: m/z or retention time values

yvec

Vector with values for the y-axis. eg: (-)Log10 of p-values, VIP, loadings, regression coefficients, etc.

up_or_down

Vector indicating directionality of change. eg: Fold change values

maintext

Text for the plot title

ythresh

Y-axis threshold for significance or differential expression. eg: 3 for p=0.001; y=(-1)*log10(0.001) or 2 for VIP from PLS

y2thresh

Secondary Y-axis threshold for significance or differential expression. eg: 1.3 for p=0.05; y=(-1)*log10(0.05) or 1 for VIP from PLS

ylab

Y-axis label

xlab

X-axis label

colorvec

Vector of colors for representing up-regulation and down-regulation. eg: c("darkgreen", "firebrick1") In this case, features that are up-regulated in class A will have "darkgreen" color, and features that are up-regulated in class B will have "firebrick1" color.

col_seq

Vector of colors for plotting different segments of the x-axis

xincrement

Window size for breaking the x-axis into different segments for visualization purposes. eg: 150

yincrement

Window size for breaking the y-axis into different segments for visualization purposes. eg: 1

Details

This function can be used to generate Type 1 Manhattan plots: signficance vs m/z Type 2 Manhattan plots: significance vs retention time Type 3 Manhattan plots: significance vs intensity

Value

Manhattan plots

Note

#Example pdf("Manhattanplot.pdf") get_manhattanplots(...) #pass arguments dev.off()

Author(s)

Karan Uppal


kuppal2/xmsPANDA documentation built on May 15, 2021, 5:48 a.m.