Searching for a way to plot Seurat style equivalent dotplot for gene expression with DESeq on RNA-seq data
1
0
Entering edit mode
18 months ago
Ondina ▴ 100

Hello,

I'm searching for a way to plot something like this but for RNA-seq data: so having for exemple as x a set of genes, y the different groups and the expression plotted by the rlog transformed values for example of the DESeq RNA-seq data.

Dotplot

I kind of found a way to do it using plotCounts and then ggplot but for a single gene ... I would like something that allows me to plot multiple genes and their counts number in a single plot.

Do you have any idea of something like that already existing as a package or if there's an easy way to do it?

dotplot DESeq rna-seq visualisation • 2.2k views
ADD COMMENT
2
Entering edit mode

You mean something like this?

library(ggplot2)

df <- data.frame(
  groups = c(rep("group1",3),rep("group2",3),rep("group3",3)),
  genes = rep(c("gene1","gene2","gene3"),3),
  exp = rnorm(9,0,10)
)

ggplot(df, aes(x = genes, y = groups, color = exp, size = exp)) + 
  geom_point(stat = 'identity') + 
  xlab("") + ylab("") + ggtitle("your data") + 
  theme_bw()
ADD REPLY
0
Entering edit mode

It's just ordinary ggplot, basically all of these plotting functions you find in Seurat or Bioconductor are just ggplot wrappers. Can you provide some data that can be copy/pasted into R, maybe with dput()?

ADD REPLY
0
Entering edit mode

Yeah I know all of this, it's just easier to use something that's already coded out and pretty, especially when I want to show some basic stuff to use in R to colleagues who don't know how to code or use ggplot.

I can't really use dput() now as it's confidential data but the data just looks like any other RNA-seq data, treated/untreated, several batches etc ...

ADD REPLY
3
Entering edit mode
18 months ago

dittoSeq has a dotplot function that will work with a SummarizedExperiment.

Add your rlog counts as an assay and provide it to the function if you want them to be used, something like:

library(dittoSeq)

assay(dds, "rlog") <- rlog.counts
dittoDotPlot(dds, c("your", "genes", "here"), group.by = "your_grouping_variable", assay = "rlog")

There are lots of other options for controlling size, etc. Though for bulk data, I really find a heatmap to be more informative than a dotplot.

ADD COMMENT
0
Entering edit mode

Hmmm, indeed, dittoSeq looks nice, thank you for reminding me of it. Didn't knew it could be used directly with data matrices instead of a Seurat object. Thank you!

ADD REPLY

Login before adding your answer.

Traffic: 2018 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