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.
Several of the function names are misspelled or not capitalized correctly,
You don't seem to have filtered low expression genes, and
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.