-
Notifications
You must be signed in to change notification settings - Fork 44
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
snp_grid_stacking error - task 1 failed - "'from' must be a finite number" #76
Comments
You can run with debug using |
Thanks for your response. So, I ran this command. I'm not sure what I'm missing here. debugonce(snp_grid_stacking) and below is the log debugging in: snp_grid_stacking(multi_PRS, y[ind.train], ncores = NCORES, K = 4) |
I would like you to run it interactively after using |
Alternatively, can you paste the output of And also tell what the versions of bigstatsr and bigsnpr are you using. |
I had a long output from this command, I removed the lines in the middle. The version of bigsnpr is ‘1.3.0’ whereas the version of bigstatsr is ‘1.2.3’ str(attributes(multi_PRS)) _List of 6 ..- attr(, "grid")='data.frame': 28 obs. of 4 variables: |
If it helps, I just ran the script interactively and this is the error Error in { : task 1 failed - "'from' must be a finite number" |
It is normal that you have only 74 variants? I know what the error is, I just want to know what is the line that causes this error in the function. Another option would be to use |
Yes, I am only using the 74 genome-wide significant SNPs. I understand that it is not the point of using SCT. I'm just testing different methods in terms of practicality. I'm using the same set of SNPs for the other methods as well. I will change to larger set of SNPs in the later stages. Regarding the error, I think the function is failing in this line. I used the debugonce() function. Hope it helps. Browse[8]> |
What is "this line"? Sorry, it is 1am, I need to go.. |
Hi, Browse[8]> best_mod <- summary(mod, best.only = TRUE) Please let me know if this is what you are looking for. |
No, it is not the error you reported. |
Probably this one? debug at #6: suppressWarnings(mod <- (if (length(unique(y.train)) == 2) big_spLogReg else big_spLinReg)(multi_PRS, |
Looks like it. |
Here is the output Browse[12]> big_spLinReg(multi_PRS, y[ind.train], ncores = NCORES, K = 4) |
Good, then you need to do the same thing with |
Browse[14]> do.call(COPY_biglasso_main, args) |
Ok, this won't be very useful. |
Browse[24]> assert_lengths(y.train, ind.train, rows_along(covar.train), base.train, ind.sets) |
Also, if it helps: Browse[26]> length(y.train) |
It should be the same error. |
_cross.res <- foreach(alpha = alphas) %:% foreach(ic = 1:K) %dopar% Error during wrapup: task 1 failed - "'from' must be a finite number"_ |
Thanks for this. Are you sure you have checked your inputs for weird things? |
Thank you for your help. Where can I share the data? |
Are you allowed to do that? |
Hi, I have solved the error. Before sending you the error I decided to clean up the script that I was using and reformat everything in the same way as you described in the tutorial. I guess the problem was coming from the summary statistics file that I was using and now it works 🙂 . Thank you for your help. Regards, |
Good it now works. |
Hi,
I am trying to use your method to calculate the PRS, I am following your tutorial from here (https://github.com/privefl/bigsnpr/blob/master/vignettes/SCT.Rmd). However, I have run into some error at this stage. I have restricted my data only to a subset of SNPs common between the summary stats and plink.bed data before proceeding to make sure that I have the same dimensions. Any pointers would be helpful. Look forward to your response.
final_mod <- snp_grid_stacking(multi_PRS, y[ind.train], ncores = NCORES, K = 4)
Error in { : task 1 failed - "'from' must be a finite number"
Calls: snp_grid_stacking
Execution halted
Regards,
Dheeraj.
The text was updated successfully, but these errors were encountered: