ncborcherding / escape

Easy single cell analysis platform for enrichment
https://www.borch.dev/uploads/screpertoire/articles/running_escape
MIT License
152 stars 20 forks source link

Clarification on `scale.factor` in `escape::performNormalization` #108

Closed denvercal1234GitHub closed 3 months ago

denvercal1234GitHub commented 3 months ago

Hi, Nick,

I hope all is well and your daughter is recovering well soon.

When you have a moment, would you mind helping me understand when one should use the scale.factor argument in escape::performNormalization?

And, according to https://github.com/ncborcherding/escape/issues/86, this argument scale.factor can be set to scale.factor = SeuratObj$nFeature_RNA and not a fixed value; however, setting scale.factor so will throw an error associated with the Warning: Layer counts isn't present in the assay object; returning NULL mentioned at the end of https://github.com/ncborcherding/escape/issues/107.

Thank you again for your help!

ncborcherding commented 3 months ago

Yes scale.factor should be a vector of equal length to the number of cells. If scale.factor is NULL - performNormalization() will calculate a normalization by cell and gene set.

Warning should be fixed now in the master branch.

devtools::install_github("ncborcherding/escape")

Nick