Question: Help with edgeR
gravatar for Neu.S
4 weeks ago by
Neu.S10 wrote:

Hi, i am using edgeR for differential expression study. I am providing raw read counts. In few cases i am getting logFC is negative even if the raw read counts are larger. Am I doing anything wrong. My commands are as below.

countdata<-read.delim ("raw_reads.txt",sep="\t",row.names=1)
dge = DGEList (counts=countdata,group=group)
dge <- estemateCommonDisp(dge)
dge<- estimateTagwiseDisp(dge)
et <- exacttest(dge)
etp<- toptags(et, n=100000)
etp$table$logFC = -etp$table$logFC
write.csv(etp$table, "cltvstrt.csv")
edger • 90 views
ADD COMMENTlink modified 4 weeks ago by Gordon Smyth37k • written 4 weeks ago by Neu.S10
Answer: Help with edgeR
gravatar for Gordon Smyth
4 weeks ago by
Gordon Smyth37k
Walter and Eliza Hall Institute of Medical Research, Melbourne, Australia
Gordon Smyth37k wrote:

You code seems fine except that:

  1. Several of the function names are misspelled or not capitalized correctly,
  2. You don't seem to have filtered low expression genes, and
  3. You are changing the sign of the logFC for no apparent reason.

As far as results are concerned, you don't show any examples of anything that you think might be wrong.

Are you perhaps simply saying that your own simple fold-change calculation doesn't agree with edgeR's more sophisticated glm approach for some genes? You can't expect to reproduce edgeR's calculation in a few lines of your code. edgeR's calculation, which weights values inversely according to their variances, and updates the variances iteratively, is generally much preferable to simple averaging.

ADD COMMENTlink modified 4 weeks ago • written 4 weeks ago by Gordon Smyth37k
Please log in to add an answer.


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