EnhancedVolcano - highlight specific points by changing colour.
Hi,
I am attempting to highlight a number of genes that intersect with a list of EMT genes I have.
When I run the below, any genes that are not EMT genes disappear.. How can I fix this?
top20padj <- head(res.smIHW.cp1df.rmNA.ord$symbol, n=20)
topLFCgenes <- res.smIHW.cp1df.rmNA.ord[order(-abs(res.smIHW.cp1df.rmNA.ord$shrunkLFC)), ]
top20LFCgenes <- head(topLFCgenes$symbol, n=20)
# define genes that will show as shape 17
VolcanoEMTgenes <- as.vector(EMTgenes$`intersect(EMTdbgenes$GeneSymbol, res.smIHW.cp1df.rmNA.sig$symbol)`)
# create custom key-value pairs for defined genes
# this can be achieved with ifelse statements
keyvals.shape <- ifelse(res.smIHW.cp1df.rmNA.ord$symbol %in% VolcanoEMTgenes, 17, 19)
keyvals.shape[is.na(keyvals.shape)] <- 19
names(keyvals.shape)[keyvals.shape == 17] <- 'EMT genes'
library(EnhancedVolcano)
EnhancedVolcano(res.smIHW.cp1df.rmNA.ord,
lab = res.smIHW.cp1df.rmNA.ord$symbol,
x = 'shrunkLFC',
y = 'padj',
title = '',
subtitle = '',
pCutoff = .05,
FCcutoff = 2,
pointSize = 3.0,
labSize = 4.0,
legendLabels=c('Not sig.','Log2 FC','p-value',
'p-value & Log2 FC'),
selectLab = c(top20LFCgenes, top20padj),
shapeCustom = keyvals.shape,
drawConnectors = TRUE,
widthConnectors = 0.2,
colConnectors = 'grey30')
• 544 views
•
link
0 answers
No answers yet.
Log in to answer this question.
Hello n.tear!
Author of EnhancedVolcano has requested that support questions should be posted to https://support.bioconductor.org/
For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.
If you disagree please tell us why in a reply below, we'll be happy to talk about it.
Cheers!
Now on Bioconductor: https://support.bioconductor.org/p/133880/