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

Error: Incompatibility between dimensions when running big_prodMat() #237

Closed
nscarene opened this issue Jul 8, 2021 · 9 comments
Closed

Comments

@nscarene
Copy link

nscarene commented Jul 8, 2021

Good morning Dr. Privé,

I hope this finds you well. I have an issue and was hoping you could help.
When I try to run the following line: pred_grid <- big_prodMat(G, beta_grid, ind.row = ind.val2, ind.col = df_beta[["NUM_ID"]]);
I automatically get an error message saying "error: you can't have missing values in 'X').

I tried using the snp_fastImputeSimple(G) to impute missing values but then I get another error message "error: Incompatibility between dimensions".

Could you please provide some insight on how to manage the error messages?

Thank you very much!

With kind regards,

@privefl
Copy link
Owner

privefl commented Jul 8, 2021

How to handle missing values is a pinned issue here.

Just running snp_fastImputeSimple(G) gives you the error of incompatible dimensions? This seems hard to believe. Please provide a bit more details.

@nscarene
Copy link
Author

nscarene commented Jul 8, 2021

Good morning Dr.

Thank you for your prompt response and my apologies for starting an issue that was already mentioned before.

I ran snp_fastImputeSimple(G) and then reran pred_grid <- big_prodMat(G, beta_grid, ind.row = ind.val2, ind.col = df_beta[["NUM_ID"]])

The error went from "Cannot have missing values in 'X'" before the imputation to "imcompatibility between dimensions". Should I rerun the analysis from the beginning, after that?

Also I was hoping you could help with a concern I have. I tried calculation LD correlation genome-wide using corr0 <- snp_cor(G, infos.pos = 1000 * CHR + POS2, size = 3 / 1000, ncores = NCORES). Is it normal that the operation takes several hours? Or is something wrong with the way I do it?

Any insight will be greatly appreciated.

With regards,

@privefl
Copy link
Owner

privefl commented Jul 8, 2021

Please try to keep issues separated; open a new one if you need to.

Let's focus on the error of incompatible dimensions here.
Is it when running G2 <- snp_fastImputeSimple(G)? Or after running big_prodMat(G2, ...)?

@nscarene
Copy link
Author

nscarene commented Jul 8, 2021

My apologies, I just submitted a new issue for the second question.

The error of incompatible dimensions arose after running big_prodMat(G2, ...) with G2 <- snp_fastImputeSimple(G)

@privefl
Copy link
Owner

privefl commented Jul 8, 2021

It probably means that nrow(beta_grid) is not the same as length(df_beta[["NUM_ID"]]).

@nscarene
Copy link
Author

nscarene commented Jul 8, 2021

I just checked and they are the same. See below,

nrow(beta_grid)
[1] 108372

length(df_beta[['NUM_ID']])
[1] 108372

@privefl
Copy link
Owner

privefl commented Jul 8, 2021

Please reinstall remotes::install_github('privefl/bigassertr').
You should now get a more explicit error message if you rerun the function.

@nscarene
Copy link
Author

nscarene commented Jul 8, 2021

Thank you do much Dr.

@privefl privefl changed the title Error: You can't have missing values in 'X' Error: Imcompatibility between dimensions when running big_prodMat() Jul 8, 2021
@privefl privefl changed the title Error: Imcompatibility between dimensions when running big_prodMat() Error: Incompatibility between dimensions when running big_prodMat() Jul 8, 2021
@nscarene
Copy link
Author

nscarene commented Jul 8, 2021

UPDATE

using G2 <- snp_fastImputeSimple(G) helped take care of the error message.

Thank you!

@nscarene nscarene closed this as completed Jul 8, 2021
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