This function was modified from github user kokrah.
Arguments
- obj
for counts use log2(raw counts + 1)), for MA use log2(raw intensities)
- groups
groups to which samples belong (character vector)
- norm.factors
scaling normalization factors
- plot
plot weights? (default=FALSE)
- window
window size for running median (a fraction of the number of rows of exprs)
- log
Whether or not the data should be log transformed before normalization, TRUE = YES.