scverse / scanpy

Single-cell analysis in Python. Scales to >1M cells.
https://scanpy.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.93k stars 604 forks source link

Document input in `score_genes()`/`score_genes_cell_cycle()` #2909

Open lazappi opened 8 months ago

lazappi commented 8 months ago

What kind of feature would you like to request?

Other?

Please describe your wishes

Currently, score_genes()/score_genes_cell_cycle() do not have any examples and specifically no documentation of what the input transformation of the data should be, just a link to a (very old) notebook.

The notebook says "Log-transformation of data and scaling should always be performed before scoring" but I suspect many users (like me) have missed this (especially the scaling step!). It would be great if this was stated in the function documentation with an example.

lazappi commented 8 months ago

From a quick look at the Seurat code this was borrowed from, I think normalised (but not scaled) data is used, so maybe the scaling isn't needed https://github.com/satijalab/seurat/blob/656fc8b562d53e5d0cedda9e09d9dda81e8c00e9/R/utilities.R#L192. Either way it would be good for this to be clear in the documentation.