Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

knnimp.internal error #2

Closed
yeswzc opened this issue Apr 5, 2020 · 2 comments
Closed

knnimp.internal error #2

yeswzc opened this issue Apr 5, 2020 · 2 comments

Comments

@yeswzc
Copy link

yeswzc commented Apr 5, 2020

Hi Yinan,
I am using REMP to impute TCGA LUAD 450 methylation data. I tried to impute DNA methylation data after filtered probes with missing raio > 20%. However, an error occured:
Error in knnimp.internal(x, k, imiss, irmiss, p, n, maxp = maxp) : NA/NaN/Inf in foreign function call (arg 1) Calls: grooMethy -> <Anonymous> -> knnimp -> knnimp.internal Execution halted
Do you know what is happens, and how to solve it?

Thanks!

@YinanZheng
Copy link
Owner

YinanZheng commented Apr 6, 2020

I could not replicate your error. Please see my code and verbose message. Hope it is helpful.

dat <- read.table(file = "./HumanMethylation450", header = TRUE, sep = "\t", row.names = 1)
missing_ind <- which(rowMeans(is.na(dat)) > 0.2)
dat_sub <- dat[-missing_ind,]

dat_groom <- grooMethy(dat_sub, verbose = TRUE)

Illumina 450k Methylation data in beta value detected.
A total of 16357 zero beta values are found.
Fixing 'zero' beta values with the smallest non-0 beta value = 1e-04 ...
A total of 9116 one beta values are found.
Fixing 'one' beta values with the largest non-1 beta value = 0.9999 ...
A total of 120318 NA/NaN/Inf values are found.
Converting beta/percentage value to M value ...
Imputing missing values using KNN method ...
All imputed probes are within the original data range.
Methylation data grooming is completed. (189 sec.)

@yeswzc
Copy link
Author

yeswzc commented Apr 6, 2020

Hi, I was using R version 3.5 which gave the error. I tested again using R version 3.5, this time it worked.
Thank you!

@yeswzc yeswzc closed this as completed Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants