Entering edit mode
24 months ago
myfam128
•
0
Hi
I am trying to draw box plots to show change in expression value between two conditions using deseq2.
d <- plotCounts(dds, gene="gene_id", intgroup="condition", returnData = TRUE)
ggplot(d, aes(x=condition, y=log2(count))) + geom_boxplot()
Is this enough to show the differential expression of a gene between two conditions?
I would like to draw boxplots with logFC values on Y axis for a single gene in two conditions. Can please let me know how to do that?
How can you do a box plot of a single LogFC value?
As in you would like to display the logFC as an annotation; or you would like to transform it so that every datapoint is shown not in its absolute
log2(count)
value; but its relative value relative to the mean of condition 1:log2(count) - mean_condition1_log2count
?I have seen in many research papers logFC boxplots between two conditions
example
Is this as you said above a relative value
In your post you're plotting the expression values of a gene, but in this figure they are plotting the log2FCs. Can you explain more what you want to show with your figure?
I am trying to show If a gene is up-regulated or down-regulated
I'm not familiar with the publication that figure is drawn from; but one way to define a per-sample logFC value is to measure the fold change relative to one of the group means. So...as i said above, just have something like
cond1_mean = mean(log2(subset(data, gene=gene_id & condition=cond1)$expr)); ggplot(subset(data=gene_id)) + geom_boxplot(aes(x=condition, y=log2(expr)-cond1_mean))
Thank you I will try that