Learn R Programming

enrichvs (version 0.0.3)

plot_enrichment_curve: Plot a enrichment curve for virtual screening

Description

Plot a enrichment curve for virtual screening

Usage

plot_enrichment_curve(x, y, decreasing=TRUE, nplot=100, colbarwidth=1, colorize=FALSE, add=FALSE, col="brack")

Arguments

x
a vector for scores
y
a vector for labels (0:inactive, 1:active)
decreasing
TRUE if the compounds are ranked by decreasing score
nplot
the number of plots
colbarwidth
the width of color bar (only if colorize==TRUE)
colorize
TRUE if the plot line is colorerd by the corresponding scores
add
TRUE if the plot is add to the previous plot
col
color of the plot

Value

  • call a plot

Examples

Run this code
x <- rnorm(1000)    # random scores for 1000 compounds
y <- c(rep(1,50), rep(0,950))     # activity labels for "x"
plot_enrichment_curve(x, y)

data(dud_egfr)
plot_enrichment_curve(dud_egfr[,1], dud_egfr[,2], add=TRUE, decreasing=FALSE, col="red")

Run the code above in your browser using DataLab