Passing dataframe with NAs into plotCorrelationMatrix
arrhenia opened this issue · 1 comments
Hi Marc, thanks for the amazing tool!
On some data, function SPOTlight will return a res with mat containing NA values. If this mat dataframe is then passed into plotCorrelationMatrix, the function will display the following error:
Error in cor.test.default(mat[, i], mat[, j], ...) : not enough finite observations
I am wondering if a na.omit should be contained in one of the functions? or the demos? The error happens on line 80 of plotCorrelationmatrix.R. Implementing the following changes resolved the issue for me:
corr <- cor(x)
to corr <- cor(na.omit(x))
This error occurs in both ver1.2.0 on Bioconductor and ver1.5.2
Hi @arrhenia, thank you so much for looking into it and providing a solution! I will implement this in the next release!