I am trying to run TMM
normalization using rpy2
and when I run calcNormFactors()
function:
dge_list = edgeRLib.DGEList(counts=rawcounts)
dge_list = edgeRLib.calcNormFactors(dge_list, method="TMM")
I am getting the error:
RRuntimeError: Error in quantile.default(x, p = p) : missing values and NaN's not allowed if 'na.rm' is FALSE
So, I thought that maybe my rawcounts
2D
numpy
array contains nan
values but it does not. I checked it with both pd.isnull()
and np.isnan()
functions. So, I suspect now that the 2D
array itself can not be normalized for some reason and I do not know why. The error is most probably not related to rpy2
set up and R
installation because it was working before for similar numpy
arrays but failed this time. Any suggestions would be greatly appreciated.