Closed cnk113 closed 4 years ago
Hi,
negative residuals show that the observed counts are lower than expected given the NB regression model. It wouldn't make sense to force them to be positive.
If you require strictly non-negative values, have a look at the sctransform::correct()
function - by default it outputs non-negative integers. You can also have the sctransform::vst
function return corrected counts by passing return_corrected_umi = TRUE
; the corrected counts are named umi_corrected
in the output list.
Best, Christoph
'umi_corrected' are on the scale of the original counts but corrected for the effect of sequencing depth differences. The correction results in non-integer values in some cases negative values, but by default negative values are set to 0 and all values are rounded to integers.
Great, thank you!
Hello,
I'm trying to do NMF on the residuals but to get non negative values I would either need to have to square the values or take the absolute value. Do you have any inclination on what might be better in capturing the structure better?
Thanks