Skip to content

Elaborate FindMarkers() and AverageExpression() for Seurat v4 #4163

@tulikakakati

Description

@tulikakakati

Hello,

I am using Seurat v4 to integrate two disease samples and find differentially expressed genes between two samples for one particular cell type. I am very confused how Seurat calculates log2FC. Can anyone help me in understanding the basic steps in the example below?

I followed the steps from the “Introduction to scRNAseq Integration” Vignette on the Seurat website to find DE genes. In particular, here are the functions that I used:

CreateSeuratObject()-> SCTransform()-> ScaleData()-> FindVariableFeatures()-> SelectIntegrationFeatures()-> FindIntegrationAnchors()-> IntegrateData() -> ScaleData() -> RunPCA() -> RunUMAP() -> FindNeighbors() -> FindClusters()-> FindConservedMarkers().

Now, after clustering and finding the cell-type markers for each celltype, I want to find marker genes that are differentially expressed between the two samples for cell type B.

I used FindMarkers() like this:
B_response <- FindMarkers(sample.list, ident.1 = id1, ident.2 = id2, verbose = FALSE)

The top 2 genes output for this cell type are:
p_val avg_log2FC pct.1 pct.2 p_val_adj
geneA 4.32E-11 79.1474718 0.97 0.919 8.22E-07
geneB 8.98E-11 7.075509727 0.537 0.149 1.71E-06

I thought that the log2FC of 79 was very high, so I wanted to see the average expression values for these two samples in this cell type.

I used AverageExpression() like this:

avg.t.cells <- AverageExpression(t.cells,slot='counts',use.counts=TRUE,return.seurat=TRUE)

For sample#1 and the B cell type and geneA, the average expression is 2.90027283

For sample#2 and the B cell type and geneA, the average expression is 1.79175947

Usually, to calculate the avg2FC using the average expression, it would be something like this:

log2(avg_AC / avg_HC) = log2( 2.90027283 / 1.791775947) = log2 (1.61867) = 0.6948

So, I am confused as to why it is a number like 79.1474718?

Please explain how you calculate the avg_log2FC? Also, can you confirm that the steps given above for finding cell type clusters are correct?

Best,
Tulika

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions