Skip to content

rank_genes_groups logfoldchange different than seurat #864

@nagaBoulevard

Description

@nagaBoulevard

Hi!
I've noticed that the function rank_genes_groups calculate logFC differently than seurat.
https://github.com/theislab/scanpy/blob/5800db45dde0c2060ad0a9bed8ea931bd41da936/scanpy/tools/_rank_genes_groups.py#L207-L208

https://github.com/theislab/scanpy/blob/5800db45dde0c2060ad0a9bed8ea931bd41da936/scanpy/tools/_rank_genes_groups.py#L223

Thus the equation is
log(exp(mean(values))

while in Seurat is
https://github.com/satijalab/seurat/blob/96d07d80bc4b6513b93e9c10d8a9d57ae7016f9f/R/differential_expression.R#L175-L179

thus
log(mean(exp(values)))

I was thus wondering if this was intended, since it leads to different logFC values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions