plotPvalCompa: Draw an XY plot comparing two series of p-values (or...

Description Usage Arguments Details Author(s) Examples

Description

Draw an XY plot comparing two series of p-values (or corrected p-values, or e-values).

Usage

1
2
3
4
plotPvalCompa(frame.to.plot, xlab = names(frame.to.plot)[1],
  ylab = names(frame.to.plot)[2], alpha = 0.05, score.name = "p-value",
  plot.result = TRUE, plot.colors = TRUE, plot.cex = 0.7,
  legend.cex = 0.9, legend.corner = "bottomright", ...)

Arguments

frame.to.plot

A data.frame comprizing two columns, with the respective p-values (corrected or not) to plot.

...

Additional parameters are passed to plot()

xlab=names(frame.to.plot)[1]

Passed to plot()

ylab=names(frame.to.plot)[2]

Passed to plot()

alpha=0.05

Alpha threshold to select positives and compute the contingency table.

score.name="p-value"

Score name to display on the legend (e.g. "p-value", "e-value", "fdr").

plot.result=TRUE

Draw a comparison plot

plot.colors=TRUE

Use colors for the plot

plot.cex=0.7

Point size for the plot (passed to graphics::plot() function).

legend.cex=0.9

Font size factor for legend. This allows to choose separate font sizes to draw the plot itself and the legend.

legend.corner="bottomright"

Position where legend should be placed.

Details

First version: 2015-03 Last modification: 2015-03

Author(s)

Jacques van Helden (Jacques.van-Helden@univ-amu.fr)

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
################################################################
## Load dataset from DenBoer, 2009 and define two groups of interest
library(denboer2009)
group1 <- "Bo"
group2 <- "Bt"

verbose(paste("Selecting samples for groups", group1, "and", group2), 1)
selected.groups <- c(group1, group2)
selected.samples <- denboer2009.pheno$sample.labels %in% selected.groups

## Selected expression profiles
selected.probesets <- apply(denboer2009.amp == "P", 1, sum) >= 30
expr <- denboer2009.expr[selected.probesets, selected.samples]
sample.labels <- denboer2009.pheno$sample.labels[selected.samples]
verbose(paste("Expression profiles: ", nrow(expr), "probesets x", ncol(expr), "samples"), 1)
table(sample.labels)

################################################################
## Compare p-values returned by Student and Welch t-tests
student.result <- tTestPerRow(x=expr,cl = sample.labels, var.equal = TRUE)
welch.result <- tTestPerRow(x=expr,cl = sample.labels, var.equal = FALSE)
plotPvalCompa(data.frame("Student.e.value"=student.result$table$e.value,
                         "Welch.e.value"=welch.result$table$e.value),
              score.name = "e-value",
              legend.corner="bottomright")

jvanheld/stats4bioinfo documentation built on May 20, 2019, 5:16 a.m.