Question: Box plot for single gene expression for various samples in a given condition ( male/female)
0
gravatar for vkgaur25
7 weeks ago by
vkgaur2530
vkgaur2530 wrote:

Hi All

Can some help me with box plot? I used DESeq2 for DE analysis and now I want to plot box plots for some most highly DE genes. Since I am trying to see the difference of expression in sex (male/female) , I want box plot where there are two box plots for same gene in two condition (male/female) that could show the read counts on Y axis considering all samples (48 samples).Something like this-

[https://ibb.co/jJrfpo][1]

I have a count table produced from DESeq2 and I have a 'coldata' which has annotation details (male/female) for all the samples.

rna-seq • 182 views
ADD COMMENTlink modified 7 weeks ago by Devon Ryan82k • written 7 weeks ago by vkgaur2530

You may want to post some example data.

ADD REPLYlink written 7 weeks ago by cpad01128.3k

How to add images to a Biostars post

ADD REPLYlink written 7 weeks ago by WouterDeCoster31k
1
gravatar for Devon Ryan
7 weeks ago by
Devon Ryan82k
Freiburg, Germany
Devon Ryan82k wrote:

You'll want something like:

cnts = counts(dds, normalized=T)
d = data.frame(cnts=cnts[some_gene_of_interest, ], group=c(rep("male", 4), rep("female", 4)))
library(ggplot2)
ggplot(d, aes(x=group, y=cnts)) + geom_boxplot(aes(color=group))

As an aside, there's a plotCounts() function that comes with DESeq2 that's also handy.

ADD COMMENTlink written 7 weeks ago by Devon Ryan82k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1457 users visited in the last hour