ggloor / ALDEx_bioc

ALDEx_bioc is the working directory for updating bioconductor
27 stars 13 forks source link

Harmonizing and extending ALDEx2 modules #6

Closed tpq closed 6 years ago

tpq commented 6 years ago

Hi Greg,

This PR contains quite a few changes: (1) A new aldex.corr replaces the old one. This module behaves like all other modules. It is now captured by the aldex() wrapper too. (1) The conditions (or equivalent) argument is removed from aldex.ttest, aldex.effect, aldex.kw, aldex.glm, aldex.corr. (2) The verbose argument is added to aldex.ttest, aldex.kw, aldex.glm, aldex.corr. (3) I altered aldex.clr to pass along the conds argument unchanged to the @clr slot, removing about 10 lines of code. Please double check that this removed code was frivolous. If not, contact me so that we can discuss a solution. (4) A new aldex() argument, iterate = TRUE, will iterate any test module. (5) Changes to documentation and tests to remove WARNINGS and NOTES associated with changes.

Clashes: (1) These updates will break your current vignette. Please remove the conditions argument from all aldex.ttest, aldex.effect, aldex.kw, aldex.glm calls within vignette. (2) Your .bib file should be placed within the R package so that others can render it locally. It should be find to place in the /vignettes folder, but if not, you may be able to deposit in /inst folder or in a new folder called /data-raw (make via devtools::use_data_raw()).

Example of use:

library(ALDEx2)
data(selex)

selex.sub <- selex[1:50, 1:14]
conds <- c(rep("NS", 7), rep("S", 7))
conds3 <- conds
conds3[1:3] <- "D"
mm <- model.matrix(~A, data.frame("A" = conds))
cont <- 1:14

w <- aldex(selex.sub, conds, test = "t", iterate = TRUE, mc.samples = 2)
x <- aldex(selex.sub, conds3, test = "kw", iterate = TRUE, mc.samples = 2)
y <- aldex(selex.sub, mm, test = "glm", iterate = TRUE, mc.samples = 2)
z <- aldex(selex.sub, cont, test = "cor", iterate = TRUE, mc.samples = 2)

Please let me know if you have any questions or concerns.

Best regards, Thom