Error using impute.knn function
1
0
Entering edit mode
@peter-davidsen-4584
Last seen 9.2 years ago
Dear List, After quantile normalizing some Agilent microarray data I end up with a data matrix containing missing values (as I choose to log2 transform my matrix just before the normalization step). Thus, I want to use the impute.knn() function in the impute package... however, I keep getting an error that I haven't been able to solve. > data.qnorm <- normalize.quantiles(log2(raw.filt)) Warning message: In normalize.quantiles(log2(raw.filt)) : NaNs produced > ok <- complete.cases(data.qnorm) > sum(!ok) [1] 1897 > NA.probes <- apply(data.qnorm, 1, function(x)length(which(is.finite(x) == FALSE))) > table(NA.probes) NA.probes 0 1 2 3 4 59123 2379 145 9 1 > > qnorm.impute <- impute.knn(data.qnorm) Error in twomeans.miss(x) : NA/NaN/Inf in foreign function call (arg 1) Calls: impute.knn ... knnimp -> knnimp.split -> twomeans.miss -> .Fortran > traceback() 5: .Fortran("twomis", x, as.integer(p), as.integer(n), imiss, double(2 * n), integer(2 * n), as.integer(maxit), as.double(eps), as.integer(starters), cluster = integer(2 * p), nsize = integer(2), double(2 * p), ratio = double(1), iter = integer(1), integer(p), integer(n), PACKAGE = "impute") 4: twomeans.miss(x) 3: knnimp.split(x, k, imiss, irmiss, p, n, maxp = maxp) 2: knnimp(x, k, maxmiss = rowmax, maxp = maxp) 1: impute.knn(data.qnorm) Any inputs are appreciated. Regards, Peter > sessionInfo() R version 2.15.1 (2012-06-22) Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) locale: [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] impute_1.30.0 preprocessCore_1.18.0 marray_1.34.0 limma_3.12.1 [5] BiocInstaller_1.4.7 loaded via a namespace (and not attached): [1] tools_2.15.1
Microarray Normalization impute Microarray Normalization impute • 3.2k views
ADD COMMENT
0
Entering edit mode
@peter-davidsen-4584
Last seen 9.2 years ago
Dear List, After quantile normalizing some Agilent microarray data I end up with a data matrix containing missing values (as I choose to log2 transform my matrix just before the normalization step). Thus, I want to use the impute.knn() function in the impute package... however, I keep getting an error that I haven't been able to solve. > data.qnorm <- normalize.quantiles(log2(raw.filt)) Warning message: In normalize.quantiles(log2(raw.filt)) : NaNs produced > ok <- complete.cases(data.qnorm) > sum(!ok) [1] 1897 > NA.probes <- apply(data.qnorm, 1, function(x)length(which(is.finite(x) == FALSE))) > table(NA.probes) NA.probes 0 1 2 3 4 59123 2379 145 9 1 > > qnorm.impute <- impute.knn(data.qnorm) Error in twomeans.miss(x) : NA/NaN/Inf in foreign function call (arg 1) Calls: impute.knn ... knnimp -> knnimp.split -> twomeans.miss -> .Fortran > traceback() 5: .Fortran("twomis", x, as.integer(p), as.integer(n), imiss, double(2 * n), integer(2 * n), as.integer(maxit), as.double(eps), as.integer(starters), cluster = integer(2 * p), nsize = integer(2), double(2 * p), ratio = double(1), iter = integer(1), integer(p), integer(n), PACKAGE = "impute") 4: twomeans.miss(x) 3: knnimp.split(x, k, imiss, irmiss, p, n, maxp = maxp) 2: knnimp(x, k, maxmiss = rowmax, maxp = maxp) 1: impute.knn(data.qnorm) Any inputs are appreciated. Regards, Peter > sessionInfo() R version 2.15.1 (2012-06-22) Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) locale: [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] impute_1.30.0 preprocessCore_1.18.0 marray_1.34.0 limma_3.12.1 [5] BiocInstaller_1.4.7 loaded via a namespace (and not attached): [1] tools_2.15.1
ADD COMMENT

Login before adding your answer.

Traffic: 546 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6