jtleek / sva-devel

28 stars 46 forks source link

Some small changes #31

Closed cafletezbrant closed 6 years ago

cafletezbrant commented 6 years ago

Hi guys,

Kasper and I are getting ready to submit a package to Bioconductor that uses ComBat and in doing so I realized I had made some changes that I never shared. In this PR are 2 contributions. One is to change a line in ComBat.R so that it uses message() instead of cat(), which allows us to turn off all ComBat() output using suppressMessages(). The other changes are to helper.R and are for numeric stability - things like getting likelihood on the log scale and then exponentiating, rather than directly computing the product of possibly a very small number, or using crossprod() instead of %*%.