Is there a way to use ComBat to return a data matrix adjusted by only numeric covariates? As implemented in SVA, ComBat allows for adjustment of data by numeric covariates, but only if a batch effect (i.e., a factor variable) is also provided. What if I just want to "clean" a data matrix of several continuous, numeric nuisance variables (e.g., surrogate variables as identified by SVA)? Specification of the nuisance variables in a linear model is not possible, as I am attempting to apply k-means clustering to the data.
Peter, I have used WGCNA in the past, but was unaware of this function. As per its description in the documentation, it does exactly what I have been trying to get at for the past few weeks. Criminally underappreciated bit of code. Thank you.
It is a relatively new function, and it was not widely (in fact, at all) advertised.