fdX-methods: False discovery plot augmented with X point

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Plot cumulative number of false discoveries versus top ranked features with an X point marking the location of the method's FDR (at a chosen level).

Usage

1
2
3
4
5
6
7
8
fdX(object, pval, ...)

## S4 method for signature 'SimResults,missing'
fdX(object, thresholdX=0.05, transformation = "1-x", plot=TRUE, ...)
## S4 method for signature 'missing,ANY'
fdX(pval, padj=NULL, labels, thresholdX=0.05, transformation = "1-x", plot=TRUE, ...)
## S4 method for signature 'SimResultsList,missing'
fdX(object, thresholdX=0.05, transformation = "1-x", plot=TRUE, ...)

Arguments

object

An object of SimResults.

pval

A vector or matrix containing p-values.

padj

A vector or matrix containing adjusted p-values (optional). If padj is missing, adjusted p-values are calculated using p.adjust(..,method=padjMethod). By default, padjMethod="BH"). For more details, see SimResults or help("p.adjust").

labels

A numeric vector indicating class labels (positives with 1, negatives with 0). For more details, see ?ROCR::prediction.

thresholdX

Numeric value of the adjusted p-value threshold (cutoff). (e.g., FDR = 0.05).

transformation

The transformation of pval and padj. The default setting "1-x" means 1-pval(padj). Note that another useful transformation is "-log10(x)".

plot

Logical, whether plot or not.

...

Optional arguments for plotting (see below for more details).

  • col, cex and other general graphical parameters from par can be directly used into the figure.

  • add, logical, whether the new plot added to current one or not.

  • cexX, pchX, colX, pchX are special parameters to control the plotting of the X point on the figure.

  • legend, a list or NULL, is used to add legends to plots (see details below).

Details

False discoveries are calculated according to the p-value rank (pval) and labels (from the object of SimResults). The X point displays the actual false discoveries number versus number of top ranked features given a threshold (e.g., FDR=0.05).

Most of the graphical parameters such as col, cex, pch and etc from par, can be directly passed into plot for all the subfigures. They can be set up as a vector (e.g., 'col=1') sharing the same value for all the subfigures, or a list (e.g, 'col=list(1,2,3)' for different value of different subfigure. cexX, pchX, colX, pchX are special parameters of X point. Their usage is similar to col, cex, pch.

To increase the flexibility of plots, you can use argument add. If add=TRUE, plots are added to current one combining different rocX curves together into one figure.

'legend' is a list including all the arguments from function legend (see help(legend)). If it is NULL, do not add legends to plots.

If input is an SimResultsList object, the average performance would be plotted (see example multiple results).

Value

Invisibly, an S4 object of class fdX-class.

Author(s)

Xiaobei Zhou and Mark D. Robinson

See Also

SimResults

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
data(Pickrell)
re <- SimResults(pval=Pickrell$pval, labels=Pickrell$labels)
fdX(re)
fdX(pval=Pickrell$pval, labels=Pickrell$labels)

# removing legends
fdX(re, legend=NULL)

# controlling legend location
fdX(re, legend=list("topleft",cex=2))

# combining multiple plots 
fdX(re[,1], col=1, legend=NULL)
fdX(re[,2], col=2, add=TRUE, legend=NULL)
fdX(re[,3], col=3, add=TRUE, legend=NULL)

# setting X point 
fdX(re, pchX = 1:3, lwdX =4:6)


# multiple results
data(PickrellList)
rel <- SimResultsList()
for(i in 1:5)
    rel[[i]] <- SimResults(pval=PickrellList[[i]]$pval, labels=PickrellList[[i]]$labels)
fdX(rel)

markrobinsonuzh/benchmarkR documentation built on May 21, 2019, 12:24 p.m.