Off topic:EnhancedVolcano - highlight specific points by changing colour.
0
0
Entering edit mode
3.6 years ago
n.tear ▴ 80

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')
RNA-Seq EnhancedVolcano • 449 views
ADD COMMENT
This thread is not open. No new answers may be added
Traffic: 3741 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