Description Usage Arguments Value Examples
Volcano plot
1 2 3 4 5 6 7 8 9 10 11 12 |
data |
A dataframe. |
log2FoldChange |
Specify the columns containing log2 fold change. Default "log2FoldChange" (suitable for DESeq2 result) |
padj |
Specify the columns containing adjusted p-value. Default "padj" (suitable for DESeq2 result) |
colour |
Specify colour variable. Normally the columns containing labels to indicate if the genes are up-regulated or down-regulated or no significant difference. |
saveplot |
Save plot to given file "a.pdf", "b.png". |
size |
A number of one column name to specify point size. |
padjLimit |
Max allowed negative log10 transformed padj. Default 10. |
width |
Picture width in "cm". |
height |
Picture height in "cm". |
... |
Additional parameters given to |
A ggplot2 object.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ### Generate test data
res_output <- data.frame(log2FoldChange=rnorm(3000), row.names=paste0("YSX",1:3000))
res_output$padj <- 20 ^ (-1*(res_output$log2FoldChange^2))
padj = 0.05
log2FC = 1
res_output$level <- ifelse(res_output$padj<=padj,
ifelse(res_output$log2FoldChange>=log2FC,
paste("groupA","UP"),
ifelse(res_output$log2FoldChange<=(-1)*(log2FC),
paste("groupB","UP"), "NoDiff")) , "NoDiff")
head(res_output)
volcanoPlot(res_output, colour="level")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.