Question: Enhanced Volcano transcript label
0
gravatar for wanhe.li
4 weeks ago by
wanhe.li0
wanhe.li0 wrote:

Hi, Kelvin (if you are seeing my post),

I really like the Enhanced Volcano package you developed. Thank you for developing it!

I am wondering whether the transcript can be labelled as a circle instead of a colored dot. Is this possible? I am using the override method to highlight some group of genes but I have problems some dots are being covered by others.

Thank you.

rna-seq • 166 views
ADD COMMENTlink modified 27 days ago • written 4 weeks ago by wanhe.li0

Kevin thank you for your answer! It is great to know how to modify the colalpha value. Would love to see more choices for plotting in the future release! Another choice I would like to include (not sure whether this make sense) is to have a break in the Y axis. In case there is a really small adjust P value that change the scale too much. Thank you again!

ADD REPLYlink written 27 days ago by wanhe.li0

Hey, yes, I will be implementing the changes, hopefully at the end of this week. They will only be available in the development version on GitHub. At the next official Bioconductor release, it will be available through the standard means. Regarding the y-axis issue, I will look into it.

Date stamp: 22nd January 2019

ADD REPLYlink written 27 days ago by Kevin Blighe37k
0
gravatar for Kevin Blighe
4 weeks ago by
Kevin Blighe37k
Republic of Ireland
Kevin Blighe37k wrote:

Hey, thanks for the comments.

There is a somewhat indirect way of doing this by modifying the transparency of the points via colAlpha. Take a look:

library(airway)
library(magrittr)

data("airway")
airway$dex %<>% relevel("untrt")

library("DESeq2")
dds <- DESeqDataSet(airway, design = ~cell + dex)
dds <- DESeq(dds, betaPrior = FALSE)
res1 <- results(dds, contrast = c("dex", "trt", "untrt"))
res1 <- lfcShrink(dds, contrast = c("dex", "trt", "untrt"), res = res1)

p1 <- EnhancedVolcano(res1,
        lab = rownames(res1),
        x = "log2FoldChange",
        y = "pvalue",
        pCutoff = 10e-24,
        FCcutoff = 2.0,
        title = "colAlpha = 1.0",
        xlim = c(-6.5,6.5),
        transcriptPointSize = 3.0,
        transcriptLabSize = 2.0,
        colAlpha = 1.0,
        legendPosition = "bottom",
        legendLabSize = 10,
        legendIconSize = 3.0,
        DrawConnectors = TRUE,
        widthConnectors = 0.26,
        colConnectors = "grey")

p2 <- EnhancedVolcano(res1,
        lab = rownames(res1),
        x = "log2FoldChange",
        y = "pvalue",
        pCutoff = 10e-24,
        FCcutoff = 2.0,
        title = "colAlpha = 0.3",
        xlim = c(-6.5,6.5),
        transcriptPointSize = 3.0,
        transcriptLabSize = 2.0,
        colAlpha = 0.3,
        legendPosition = "bottom",
        legendLabSize = 10,
        legendIconSize = 3.0,
        DrawConnectors = TRUE,
        widthConnectors = 0.26,
        colConnectors = "grey")

p3 <- EnhancedVolcano(res1,
        lab = rownames(res1),
        x = "log2FoldChange",
        y = "pvalue",
        pCutoff = 10e-24,
        FCcutoff = 2.0,
        title = "colAlpha = 0.0",
        xlim = c(-6.5,6.5),
        transcriptPointSize = 5.0,
        transcriptLabSize = 0.0,
        colAlpha = 0.1,
        legendPosition = "bottom",
        legendLabSize = 10,
        legendIconSize = 3.0,
        DrawConnectors = FALSE)


library(gridExtra)
library(grid)
grid.arrange(p1, p2, p3, ncol=3, top="EnhancedVolcano, adjusting colAlpha")
grid.rect(gp=gpar(fill=NA))

a

This may not be exactly what you want(?). In certain situations, it is of course almost impossible to fit all points and labels into the plot space.

However, it is possible to 'prioritise' certain points / transcripts over others by changing the order of your results object. EnhancedVolcano utilises the ggplot2 engine. When ggplot2 plots the data, it starts from the top of your input data-frame and then moves down trough each row. If your most important transcript is at the top of the data-frame, then it will be plot first and may be overwritten by another point. So, priority transcripts / points should come toward the last few rows of the data-frame. Does that make sense?

If this is not a solution, then I can make a fix for the next release of EnhancedVolcano that will allow the user to plot squares, triangles, open circles, etc.

Kevin

ADD COMMENTlink written 4 weeks ago by Kevin Blighe37k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2491 users visited in the last hour