Is it possible to test for fold-change in only one direction (LFC > 0) using the treat function from limma? Similar to using the altHypothesis argument in the results function from DESeq2?
I tried myself to introduce some changes to the code in treat to perform this:
lfc <- 0 se <- stdev.unscaled*sqrt(fit$s2.post) tstat <- (coefficients-lfc)/se fit$t <- array(0,dim(coefficients),dimnames=dimnames(coefficients)) fit$p.value <- pt(tstat, df=df.total, lower.tail=FALSE) tstat <- pmax(tstat,0) fit$t <- tstat fit$treat.lfc <- lfc
This seems correct, but wanted to double-check incase a method was already implemented.
Many thanks, Aaron.