ggloor / ALDEx_bioc

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

aldex.ttest not working as demonstrated #61

Closed slschnorr closed 1 year ago

slschnorr commented 1 year ago

Dear Greg, I just started working with ALDEx2 in R and went through the tutorial docs and the online documentation for various functions, and noticed that the aldex.ttest function always failed if used per the current documentation, with the conditions object supplied: pfa.tt <- aldex.ttest(pfa.x, pfa.conditions) Error in if (paired) { : argument is not interpretable as logical In addition: Warning message: In if (paired) { : the condition has length > 1 and only the first element will be used

but it works if used without supplying the conditions: pfa.tt <- aldex.ttest(pfa.x)

I confirmed that I get the same result when using the selex data and supplied instructions from https://www.rdocumentation.org/packages/ALDEx2/versions/1.4.0/topics/aldex.ttest (which also incidentally I think misses to supply the conditions vector in the aldex.clr function in the example) data(selex) x <- aldex.clr(selex, mc.samples=2) # here it misses the conditions vector that is written below conditions <- c(rep("N", 7), rep("S", 7)) ttest.test <- aldex.ttest(x, conditions) # this yields same error, even when run after supplying 'conditions' to aldex.clr

I'd like to confirm whether there is a bug in aldex.ttest, whether it can be run correctly without supplying conditions and whether it is yielding the correct results. I only noticed the discrepancy and was able to trouble shoot my error message after reading through this post #35 and seeing the difference in the command. Thanks very much! Stephanie

ggloor commented 1 year ago

Thanks for flagging this. The aldex.ttest, aldex.effect, and aldex.glm functions now pull the conditions from the aldex.clr object. I have updated the documentation for the next release

Sorry for the confusion