Skip to content

scanpy.pl.dotplot - does standard_scale need to subtract the min? #1451

Closed

Description

@vitkl

I am wondering about the motivation that went into subtracting the min when performing standardisation of the scale between genes. I find that it leads a misleading visualisation when the genes expressed by all clusters so I am now copying and modifying your function for my work. Do you think it would be justified to remove min subtraction step or make it optional?
Thanks, and please let me know what you think!

Activity

  1. fidelram commented on Oct 12, 2020

    @fidelram
    Collaborator

    If I recall correctly, the implementation mimic the one found in seaborn. Besides, the idea is to map the gene expression to an scale from 0 to 1, thus is needed to subtract the min.

  2. gokceneraslan commented on Oct 12, 2020

    @gokceneraslan
    Contributor

    Exactly. But I do agree that it can be misleading in some cases e.g if there is one cell with a single UMI out of 1000 cells, this nonzero mean value will be mapped to 1, giving the impression that there is something going on. I recently abandoned standard_scale and switched to zscore and RdBu_r colormap both in heat maps and dotplots with vmin=-3 and vmax=3, which leads to a better standardization.

    The only caveat of this normalization in dotplot is that the dot size is determined by the number of cells above the average, which was possibly higher than zero before zscore, compared to the regular zero cutoff. In this sense it makes it more stringent than zero expression cutoff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions