ggloor / ALDEx_bioc

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

Negative num. error when running aldex.effect for alr transformation #26

Closed aimirza closed 4 years ago

aimirza commented 4 years ago

I clr transformed the data using a single index, effectively an all transformation. However, I received two errors:

  1. Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 't': missing values and NaN's not allowed if 'na.rm' is FALSE

  2. Error in if (any(n < 0)) stop("counts cannot be negative") : missing value where TRUE/FALSE needed

I forked the repository and fixed error #1 by adding the parameter na.rm = TRUE to the quantilefunction. I think the NAs is from the reference feature.

Error #2 is from the script rdirichlet.r. Would there be an issue with the results if I remove the code if ( any( n < 0 ) ) stop("counts cannot be negative") from the script? Is there a better way to deal with these errors while using a single index as the denom?

ggloor commented 4 years ago

The error was misleading, it was caused by NAs in the output. the aldex.effect function is now fully compliant with an ALR denominator. you can try it by installing from source. I will push it to the development version of bioconductor