theislab / diffxpy

Differential expression analysis for single-cell RNA-seq data.
https://diffxpy.rtfd.io
BSD 3-Clause "New" or "Revised" License
191 stars 23 forks source link

QUESTION: Size factors method? #149

Closed mtvector closed 4 years ago

mtvector commented 4 years ago

Hi there, I'm wondering what method you use for calculating size factors for scRNAseq? Does Diffxpy have a default method that calculates size factors if you don't provide them? Lastly, do you have python code to appropriately calculate size factors that work with diffxpy? Thanks so much! M

davidsebfischer commented 4 years ago

Hi @mtvector!

I'm wondering what method you use for calculating size factors for scRNAseq? Does Diffxpy have a default method that calculates size factors if you don't provide them?

No, we do not provide that as size factors are sort of a field of its own with a lot of dataset-specific considerations. You can always opt for simpler size factor versions at first if you do not want to read through the literature!

Lastly, do you have python code to appropriately calculate size factors that work with diffxpy?

The simplest one I use some times is sf=mean(data, axis=genes) / mean(mean(data, axis=genes)) ie sf=mean(data, axis=genes); sf = sf/mean(sf).