ggloor / ALDEx_bioc

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

aldex.ttest issue #43

Closed dkropp2 closed 3 years ago

dkropp2 commented 3 years ago

Hello Dr. Gloor I've come as a desperate graduate student with very little coding experience to try and work out this issue. I am trying to run the code as shown below:

count <- 3 aldex.controls <- data.frame(Controls[which(apply(Controls, 1, function(x){sum(x)}) > count),], check.names=F) strain <- c("S","Ctl")

x.controls <- aldex.clr(aldex.controls, strain, mc.samples=2, denom="zero", verbose=TRUE) x.controls.tt <- aldex.ttest(x.controls, conds, paired.test=FALSE)

x.controls.effect <- aldex.effect(x.controls, conds, include.sample.summary=FALSE, verbose=TRUE) x.controls.all <- data.frame(x.controls.tt, x.controls.effect, stringsAsFactors=FALSE)

When I do I get the following error when I get the the aldex.ttest function: Error in apply(data[, grp1], 1, sd) : dim(X) must have a positive length

I know this has something to do with the formatting of clr but I'm really lost as to how to fix it. Any and all help is appreciated!

dkropp2 commented 3 years ago

Thank you Dr. Gloor for your assistance with this issue. I increased my samples in each treatment to 3 samples per treatment and was able to go through with the t-test. This absolutely made my day!

ggloor commented 3 years ago

No problem. Glad it is working now