Description Usage Arguments Value Author(s) Examples

View source: R/plot_enrichment_curve.R

Function to plot a enrichment curve for virtual screening

1 2 | ```
plot_enrichment_curve(x, y, decreasing=TRUE, npoint=100,
colbarwidth=1, colorize=FALSE, add=FALSE, col="black", lwd=2)
``` |

`x` |
a vector for scores |

`y` |
a vector for labels (0:inactive, 1:active) |

`decreasing` |
TRUE if the compounds are ranked by decreasing score |

`npoint` |
the number of points to plot the curve |

`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 |

`lwd` |
line width of the plot |

call a plot

Hiroaki YABUUCHI

1 2 3 4 5 6 7 8 9 | ```
data(dud_egfr)
x <- rnorm( 88888 ) # virtual scores for 1000 compounds
y <- c(rep(1,88), rep(0,88800)) # activity labels for "x"
plot_enrichment_curve(x, y, col="blue")
plot_enrichment_curve(dud_egfr$energy, dud_egfr$label,
add=TRUE, decreasing=FALSE, col="red") # Add a plot
legend("bottomrigh", legend = c("ideal", "random", "score1", "score2"),
lty=c(2,3,1,1), col=c("black", "grey", "blue", "red"), bty="n")
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.