SEQanswers

Go Back   SEQanswers > Applications Forums > RNA Sequencing



Similar Threads
Thread Thread Starter Forum Replies Last Post
DEXSeq - condition / group level average miaom RNA Sequencing 1 12-09-2013 09:48 PM
edgeR: very low p-value and very high variance within the group of replicates. What's valei Bioinformatics 1 06-24-2013 12:49 AM
How to find elements in group comparison A but not B in EdgeR? carmeyeii Bioinformatics 1 08-27-2012 12:47 AM
how to calculate average gap size odoyle81 Bioinformatics 10 01-20-2012 10:01 AM
what does it means Moodi Genomic Resequencing 2 01-24-2011 05:55 PM

Reply
 
Thread Tools
Old 12-10-2013, 11:03 PM   #1
miaom
Member
 
Location: ca

Join Date: Oct 2012
Posts: 11
Default edgeR: how to calculate group average/means ?

I am trying edgeR now to find deferentially expressed genes.
I have run
d <- DGEList(counts=data,group=g,lib.size=libSizes)
d <- calcNormFactors(d)
d <- estimateCommonDisp(d)
d <- estimateTagwiseDisp(d)
d <- exactTest(d)
# d.final <- topTags(de.com,n = length(data[,1]))
and got some results like

logFC logCPM PValue
A1bg 1.168034660 -3.842894 0.4137326
A1cf 0.000000000 -Inf 1.0000000
A1i3 0.000000000 -Inf 1.0000000
A2m -0.003703085 4.419204 0.9421192
A3galt2 0.437990409 2.861665 0.2611483

But I'd like to know the average/mean of the gene expressions in each condition/groups?
It seems logFC it is different from "log2(rowMeans(GrpB)/ rowMeans(GrpA))" calculating from cpm() counts.

How should I do the calculation ?

Thanks!
miaom is offline   Reply With Quote
Old 12-31-2015, 08:08 AM   #2
xrao
Junior Member
 
Location: Houston USA

Join Date: Mar 2014
Posts: 9
Default

Have you found the answer? I am also curious. Thank you!
xrao is offline   Reply With Quote
Old 01-02-2016, 07:47 AM   #3
Schelarina
Member
 
Location: P

Join Date: Apr 2014
Posts: 18
Default

Do you need CPM per each sample after TMM normalization?
you could do something like this
cpm <- cpm(d, log=TRUE, lib.sizes=lib.sizes, normalized.lib.sizes = TRUE, prior.count=0.25)
if your cpm values are negative then you can set the prior.count to a different value
Schelarina is offline   Reply With Quote
Old 01-04-2016, 08:08 AM   #4
xrao
Junior Member
 
Location: Houston USA

Join Date: Mar 2014
Posts: 9
Default

Thank you! But we meant mean values for each group/condition.
xrao is offline   Reply With Quote
Old 08-28-2018, 08:06 AM   #5
ckruse6
Junior Member
 
Location: Ohio, USA

Join Date: Aug 2018
Posts: 1
Cool Manual Calc option

So, I know it isn't ideal, but let's take the actual values of log(CPM) and log(FC) that you have from edgeR. Keep in mind this will only work if your replicates of experimental and control were equal, but you could tweak it as needed. Might be worth double checking that logCPM is using base 2 which I believe is default.

Using "A" to be the average expression of your experimental condition and "B" to be your control as you've run it.

FC=A/B, so
2^log(FC) will get you (A/B)
CPM=(A+B)/2, so
2^log(CPM)=(A+B)/2

Basic algebra solves for B,
B=2(2^log(CPM))/(1+2^(log(FC)))

and then
A= 2(2^log(CPM)) - B

Using the values of a typical EdgeR, this is minimal R work to generate the columns you wanted.

Hope this helps!
ckruse6 is offline   Reply With Quote
Reply

Tags
edger, rnaseq

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 01:28 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO