Enhanced Volcano transcript label
1
0
Entering edit mode
5.9 years ago
wanhe.li • 0

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 • 4.1k views
ADD COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

Hey wanhe.li, can you let me know if you managed to find a solution to this? EnhancedVolcano uses the ggplot2 'engine', so, ggplot2 functions can be added to EnhancedVolcano objects.

For example, re-using my code below:

p1 + coord_cartesian(ylim = c(-log10(10e-24), -log10(10e-36)))
p1 + scale_y_continuous(limits = c(-log10(10e-24), -log10(10e-36)))

j

ADD REPLY
0
Entering edit mode
5.9 years ago

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 COMMENT
0
Entering edit mode

Hi Kevin,

I am having problems with my selectLab= when I indicate the label I want it refers to it as a number. Followed in the plot I have numbers instead of the names. What would be the cause of such?

Best,

Lennel

ADD REPLY
0
Entering edit mode

Hey Lennel, can you show the full command that you are using? Also, can you show a sample of your input results table?

ADD REPLY
1
Entering edit mode

I thought I replied. turns out it was an error calling the labels.

ADD REPLY

Login before adding your answer.

Traffic: 1660 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6