Entering edit mode
2.5 years ago
Fatemeh
▴
40
Hi everyone,
I am struggling to find a way to plot the list of genes of my interest in a single pdf file using plotCounts(dds, gene = geneID) function. It just work perfectly when I want a single gene. As soon as I try to plot a list, it does not work. I even tried to use Style="Facet
but it did not work. I would appreciate if someone can help me with this issue.
genes <- read.csv("./genes.csv", header=T)
geneID<-genes$igenename
p<-plotCounts(dds, gene = geneID, intgroup = c("RANKL", "Genotype", "Background"),returnData=TRUE)
ggplot(p, aes(x = Genotype, y = count, color = Background, shape=RANKL)) +
geom_point(size=4, position=position_jitter(w = 0.1,h = 0)) +
theme_bw() +
theme(plot.title = element_text(hjust = 0.5))
Thanks very much for your help. I tried this wonderful code and made the long data.frame but I do not know how I can plot this kind of data frame. I am sorry for this stupid question. Should it be also looped?
You'll need to learn
ggplot2
to really get the most out of it since it can make almost any plot type you want. Here's an example.Thank you very much for your big help. The problem with facet-grid is that it adds on all the graphs with the same scale. I have some genes which are lowly expressed and this way I do not see the differences clearly. If we could have for every single graph its own scale that would be awesome. I am not sure though if this is possible. Thanks one more time.