This is a test version of Biostars. For the public version, visit https://www.biostars.org.
volcano plot help code

I want to make a volcano plot with 4 different cell types and these cell types should have different shape and color. But i want log2foldchange value on y axis and -log10(pval) on x -axis. Can anyone help? Thank You

rna-seq r sequencing gene

1 answer

Did you create this github issue? - https://github.com/kevinblighe/EnhancedVolcano/issues/52

Try EnhancedVolcano(...) + coord_flip():

library(EnhancedVolcano)
library(airway)
library(magrittr)

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

ens <- rownames(airway)

library(org.Hs.eg.db)
symbols <- mapIds(org.Hs.eg.db, keys = ens,
  column = c('SYMBOL'), keytype = 'ENSEMBL')
symbols <- symbols[!is.na(symbols)]
symbols <- symbols[match(rownames(airway), names(symbols))]
rownames(airway) <- symbols
keep <- !is.na(rownames(airway))
airway <- airway[keep,]

library('DESeq2')

dds <- DESeqDataSet(airway, design = ~ cell + dex)
dds <- DESeq(dds, betaPrior=FALSE)
res <- results(dds,
  contrast = c('dex','trt','untrt'))
res <- lfcShrink(dds,
  contrast = c('dex','trt','untrt'), res=res, type = 'normal')

p1 <- EnhancedVolcano(res,
  lab = rownames(res),
  x = 'log2FoldChange',
  y = 'pvalue')
p1 + coord_flip()

k

Kevin

Log in to answer this question.