cozygene / bisque

An R toolkit for estimation of cell composition from bulk expression data
68 stars 20 forks source link

Typo in SemisupervisedTransformBulk #17

Closed empiricalbayes closed 3 years ago

empiricalbayes commented 3 years ago

The shrink.scale variable in the SemisupervisedTransformBulk function needs a minor adjustment. Currently, it divides sqrt(base::sum((Y.train[gene,,drop=T]-Y.center)^2) over n and then adds 1 to it, while it should divide sqrt(base::sum((Y.train[gene,,drop=T]-Y.center)^2) over (n-1), as mentioned in the paper. So, the modified variable should be shrink.scale <- base::sqrt(base::sum((Y.train[gene,,drop=T]-Y.center)^2)/(n+1))

brandonjew commented 3 years ago

Thanks for pointing this out! Just pushed the change to the repository. Will update CRAN packages after some basic testing finishes.