Help with edgeR
1
0
Entering edit mode
Neu.S ▴ 10
@neus-12207
Last seen 3.4 years ago

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)
group<-factor(c("clt","clt","clt","trt","trt","trt"))
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 • 301 views
0
Entering edit mode
@gordon-smyth
Last seen 1 hour ago
WEHI, Melbourne, Australia

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.