Open zxl124 opened 3 years ago
I've come across the same issue but I'm using IDAT files. Using the information provided above I was able to confirm that it was due to the same problem, with one sample have just over 50% missing data for the yIndex probes causing a -Inf for one of the yMed values.
Is a possible solution to convert -Inf to NA in .getSex before calculating the median values?
CN[CN==-Inf] <- NA
I was trying to run preprocessQuantile on a signal intensity data (no IDAT data available). The signal intensities are read to make a MethylSet object. When I run preprocessQuantile on the MethylSet object, I got this error:
So I read the code in preprocessQuantile and getSex, and was tracing the code step by step. I found the problem being the median CN of some sample was
-Inf
.When more than half of the CN values are
-Inf
, the median is-Inf
. I looked at how CN values are calculated.For this specific data, a lot of X,Y chromosome probes have 0 methylated and unmethylated values, therefore results in
-Inf
CN values. I am thinking maybe add 1 togetMeth(object) + getUnmeth(object)
would solve this problem.This bug has been reported in the comments of #172.