privefl / bigstatsr

R package for statistical tools with big matrices stored on disk.
https://privefl.github.io/bigstatsr/
179 stars 30 forks source link

big_prodMat Error: You can't have missing values in 'X'. #139

Closed jianvhuang closed 3 years ago

jianvhuang commented 3 years ago

I ran the big_prodMat command as below, but sometimes I got the error message suggesting there are missing values in X. But I reran the same code without changing anything. The code ran successfully. Could you help explain this issue? Thank you.

`

here is an example that I ran the same code consecutively. And the error was returned at the second try.

pred_auto_full <- big_prodMat(G, beta_auto, ind.row = ind.full, ind.col = df_beta[["_NUMID"]])

pred_auto_full <- big_prodMat(G, beta_auto, ind.row = ind.full, ind.col = df_beta[["_NUMID"]]) Error: You can't have missing values in 'X'.

pred_auto_full <- big_prodMat(G, beta_auto, ind.row = ind.full, ind.col = df_beta[["_NUMID"]])

`

privefl commented 3 years ago

Only a small (random) subset of the data is checked for missing values, otherwise it would take too much time.

You can use snp_fastImputeSimple() to do some quick imputation.

jianvhuang commented 3 years ago

Thanks for clarifying.