volcano2GB: Volcano with more control

Description Usage Arguments Examples

View source: R/volcano2G.R

Description

Volcano with more control

Usage

1
2
3
4
5
volcano2GB(dataX, foldchange = "log2FC", pvalue = "q.mod",
  labels = "names", pthresh = 0.1, log2FCThresh = 0.5, main = NULL,
  xlab = "log2 FC", ylab = "-log10(Q Value)", repel.text.size = 1,
  repel.segment.size = 0.5, repel.segement.alpha = 0.5,
  pseudo = NULL, maxNrOfSignificantText = 20)

Arguments

dataX

dataX frame

foldchange

column name with fold change plotted on X

pvalue

column with pvalue or qvalue plotted as -log10 on y axes

labels

column containing lables

pthresh

horizontal abline

log2FCThresh

vertical abline

main

main plot title

xlab

xlab

ylab

ylab

repel.text.size

ggrepel parameter

repel.segment.size

ggrepel parameter

repel.segement.alpha

ggrepel parameter

pseudo

add pseudo fold changes

maxNrOfSignificantText

numeric - how many text labels to display - default = 20.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
rm(list=ls())
library(tidyverse)
library(ggrepel)
library(quantable)
foldchange <- rnorm(1000)
pvals <-rexp(1000)
names <- sample(colors(),1000,replace=TRUE)

dataX <- data.frame(q.mod = pvals,
 log2FC = foldchange,
  names = names )
colnames(dataX)
b <- volcano2GB(dataX, pthresh=0.1, log2FCThresh=0.5 ,
main='test', repel.segment.size=0.3,repel.text.size=2)
b
dataX <- data.frame(a.q.mod = pvals,
 log2FC = foldchange,
  names = names )
b <- volcano2GB(dataX,
               pvalue = "a.q.mod",
               pthresh=0.1,
               log2FCThresh=0.5 ,
               main='test',
               repel.segment.size=0.3,
               repel.text.size=2)
b
b <- volcano2GB(dataX,
               pvalue = "a.q.mod",
               pthresh=0.1,
               log2FCThresh=0.5 ,
               main='test',
               repel.segment.size=0.3,
               repel.text.size=2,
               maxNrOfSignificantText=1000
               )
b

wolski/quantable documentation built on Nov. 26, 2021, 9:58 a.m.