I am using limma for the detection of differentially expressed genes between two conditions. I have always been selecting the up- and down- regulated genes based on the logFC column of the topTable. However, today this column totally disappeared from the topTable output. Here is an example:

...Actually, when I use toptable, I don't have this problem. I can see the logFC column. But I don't prefer using it because:

a) It is deprecated and

b) I cannot make a calculation for all the coefficients of my contrast matrix simultaneously (as I can for topTable - default option for coef). I need to specify every time which coefficient I want to calculate and to combine each toptable's findings manually at the end...

I want to use topTable...Yes, please, answer to me regarding topTable. I would like to know why I cannot see the logFC column there. I just mentioned that when I use toptable I can see it...in case this is somehow informative about the source of the problem.

topTable and toptable produce different output, this is expected. See help(topTable) for more information. Note that with more than one coefficient that topTable just runs topTableF, which produces the coefficients rather than lfc between any particular coefficients (well, obviously these are the fold changes versus the intercept...).

Thank you, this is understandable. My worry is though why until some time ago, using exactly the same topTable command, I could see a logFC column and now I cannot. Any clues on that? I suspect I may have overwritten the original topTable function. If this is the case, I don't know how to fix it..If this is not the case, what else could it be?

I was applying the topTable function on the same exact data, I was using exactly the same command. Maybe I accidentally did something wrong and overwritten it...I don't know how to convert it back so I see me switching to the use of toptable instead. Anyway, thank you for your time and help!

This is standard well-documented behaviour of topTable that has remained essentially unchanged for more than 13 years.

If you use topTable to rank genes by one coefficient (coef = 2 for example) then the output will include a logFC column, which is simply the estimated value of that coefficient.

If you use topTable to rank genes by several coefficients (coef = 1:3 for example), then genes will be ranked by F-statistic instead of t-statistic. In this case, the output includes the values of all the coefficients specified. Obviously the coefficients can't all be called "logFC", so the coefficients keep their original names.

If you use topTable without specifying the coef argument, then topTable will use all coefficients available (excuding the coefficient labelled "Intercept" if it exists).

In your case, it would appear that you have simply forgotten to specify the coef argument this time, so the genes are now ranked by three coefficients (coef1, coef2 and coef3) instead of just one. This made clear, not just by the coef columns but by the column called "F". limma never gives an F-statistic column and a logFC column at the same time -- they just don't go together!

Your claim that the topTable behaviour has changed for the same command and same data is untrue. The behaviour of topTable has been consistent for the past 13 years.

The behaviour of toptable is slightly different to topTable simply because the default value for coef is different. You could see this for yourself by reading the help page ?topTable or ?toptable. The old toptable function is retained just for backward compatibility and, after 15 years, I might finally remove it.

It would be helpful if you posted (A) the output of sessionInfo() and (B) the exact topTable command you used.

Hi Ryan,

Yes, sure. Here is the output of sessionInfo():

And here is the command that I used:

tops <- topTable(contr.fit_parental.gefr, resort.by="logFC", adjust="fdr",number = Inf, p.value=0.01, lfc=1)

Thanks a lot for any feedback!

...Actually, when I use toptable, I don't have this problem. I can see the logFC column. But I don't prefer using it because:

a) It is deprecated and

b) I cannot make a calculation for all the coefficients of my contrast matrix simultaneously (as I can for topTable - default option for coef). I need to specify every time which coefficient I want to calculate and to combine each toptable's findings manually at the end...

Then post whatever command you are using, I just asked for topTable because that's what you originally wrote was being used.

I want to use topTable...Yes, please, answer to me regarding topTable. I would like to know why I cannot see the logFC column there. I just mentioned that when I use toptable I can see it...in case this is somehow informative about the source of the problem.

Thanks again.

topTable and toptable produce different output, this is expected. See

`help(topTable)`

for more information. Note that with more than one coefficient that`topTable`

just runs`topTableF`

, which produces the coefficients rather than lfc between any particular coefficients (well, obviously these are the fold changes versus the intercept...).Thank you, this is understandable. My worry is though why until some time ago, using exactly the same topTable command, I could see a logFC column and now I cannot. Any clues on that? I suspect I may have overwritten the original topTable function. If this is the case, I don't know how to fix it..If this is not the case, what else could it be?

Thank you very much!

Presumably you were using smaller models. topTable itself hasn't changed to my knowledge.

I was applying the topTable function on the same exact data, I was using exactly the same command. Maybe I accidentally did something wrong and overwritten it...I don't know how to convert it back so I see me switching to the use of toptable instead. Anyway, thank you for your time and help!