volcanoStatsTable: Extracts x and y axis values from objects to create input for...

Description Usage Arguments Details Value Examples

View source: R/volcano_plot.R

Description

You can, in theory, create a volcano plot from a number of different parts of a MultiGSEAResult() object. Most often you want to create a volcano plot from the differential expressino results, but you could imagine building a volcan plot where each point is a geneset. In this case, you would extract the pvalues from the method you like in the MultiGSEAResult() object using the stats parameter.

Usage

1
2
3
4
5
6
7
8
9
volcanoStatsTable(
  x,
  stats = "dge",
  xaxis = "logFC",
  yaxis = "pval",
  idx = "idx",
  xtfrm = identity,
  ytfrm = function(vals) -log10(vals)
)

Arguments

x

A MultiGSEAResult object, or a data.frame

stats

One of "dge" or resultNames(x)

xaxis, yaxis

the column of the the provided (or extracted) data.frame to use for the xaxis and yaxis of the volcano

idx

The column of the data.frame to use as the identifier for the element in the row. You probably don't want to mess with this

xtfrm

A function that transforms the xaxis column to an appropriate scale for the x-axis. This is the identity function by default, because most often the logFC is plotted as is.

ytfrm

A function that transforms the yaxis column to an appropriate scale for the y-axis. This is the -log10(yval) function by default, because this is how we most often plot the y-axis.

Details

Like the volcanoPlot() function, this is mostly used by the multiGSEA.shiny package.

Value

a data.frame with .xv, .xy, .xvt and .xvy columns that represent the xvalues, yvalues, transformed xvalues, and transformed yvalues, respectively

Examples

1
2
3
mg <- exampleMultiGSEAResult()
v.dge <- volcanoStatsTable(mg)
v.camera <- volcanoStatsTable(mg, 'camera')

lianos/multiGSEA documentation built on Nov. 17, 2020, 1:26 p.m.