ggloor / ALDEx2_dev

ALDEx tool to examine compositional high-throughput sequence data with Welch's t-test
GNU Affero General Public License v3.0
11 stars 6 forks source link

aldex.clr with model.matrix #16

Closed Maraikep closed 4 years ago

Maraikep commented 4 years ago

Hello, First of all, thanks for the nice package ALDEx2. Its a great idea and a very, very useful tool! Thanks! I am having a problem running what has been called a 'complex design' in this forum. In this regard, I would like to ask two questions: 1) Every time I am running the analysis with a model.matrix, I am getting an error message "Error in coerce.data(reads, conds) : mismatch between number of samples and condition vector". To me, they seem to match... (dim()). I also run the example from the vignette - with the same error. covariates <- data.frame("A" = sample(0:1, 14, replace = TRUE), "B" = c(rep(0, 7), rep(1, 7))) mm <- model.matrix(~ A + B, covariates) x <- aldex.clr(selex.sub, mm, mc.samples=8, denom="all") What am I doing wrong? I would like to get this to work as I will have several factors eventually. Can this be a version problem? I am running the analysis with ALDEx2 1.14.1.. I saw, there is ALDEx2 1.20 available. However, it appears, I cannot update and all tries to update the package failed... A colleague said she was using 1.18.0. However, for her it worked only with the model.matrix and her attemps to run the aldex.clr with a character failed. 2) Did I understand correctly, that I only have to run a model.matrix approach if I am using more than 1 factor, independent of the number of its levels? In other words: The model.matrix approach is for designs with more than 1 factor variable, is that correct? For only one factor, I can simply run it as 'conds'?!

Thank you very much in advance for your kind help! Yours faithfully, Maraike

ggloor commented 4 years ago

Hi Maraike

Yes this is a version problem. You should update to the latest version of aldex that fixes that bug

Are you trying to update through bioconductor?

Please move this question to aldex_bioc