Hey, I am actually trying to transform Log2FC to the average_logFC using R does any know to do it?
Thank you
Hey, I am actually trying to transform Log2FC to the average_logFC using R does any know to do it?
Thank you
avg_log2FC
is not the average log2 fold change, it is the log2 fold change of the average expression. If you are comparing expression values in R, then the log2FC reported by R is measuring the same thing as the "avg_log2FC
" reported by Seurat; modulo slight differences like normalization constants and logarithmic offsets.
Yes, it is average expression (baseMean from DESeq2) from a given cluster versus the average of the baseMeans from all other clusters.
They have used the following command to do that :
FindMarkers(pbmc, ident.1 = "CD14+ Mono", ident.2 = NULL, test.use = "DESeq2", max.cells.per.ident = 50)
and this is how it looks
## p_val avg_log2FC pct.1 pct.2 p_val_adj
## S100A9 1.887262e-58 2.538360 0.996 0.870 2.588191e-54
## LYZ 4.198394e-52 1.987962 1.000 0.988 5.757678e-48
## S100A8 5.747352e-49 2.784248 0.975 0.500 7.881918e-45
## FCGR3A 1.315842e-35 -2.949992 0.131 0.975 1.804546e-31
## RPS19 1.514561e-33 -1.614892 0.990 1.000 2.077068e-29
## IFITM2 1.227042e-26 -2.212583 0.677 1.000 1.682765e-22
now when I am trying to construct a p-fold plot I am getting this visualization
but I want to have a visualization like this:
in order to get the plot to look like a wave I need to use avg_logFC and not avg_log2FC, but I don't know how to convert avg_log2FC to avg_logFC
You're clearly using the absolute value of the log fold change, which is why you don't have any negative values. Note that FCGR3A has a negative value in their table; so if you're running their command exactly you should also have negative values.
Nothing to do with averages, or the base of the logarithm. Just use the logFC rather than the absolute value of the logFC.
I should point out that you have not shown any of your own data, which makes it extremely difficult to provide support.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Can you expand on what type of data this is, how you got the log2FCs, and what you mean by wanting to get the average?
I have followed the DEseq analysis on the data from this website https://satijalab.org/seurat/articles/de_vignette.html and it gives me a data frame, which looks like this
but I want average_logFC and not log2Foldchange and I was wondering if there was a way I can transform log 2FC to avg_log 2FC