lassosum
lassosum copied to clipboard
p2cor generating NaNs
@tshmak thanks for the nice tool I have been using for a while
I have these two snps in my summary stats which have really low pvalue and end up generating NaN correlations when using p2cor function. The sample size is above 1000
| snp | af | effectsize | se | pvalue |
|---|---|---|---|---|
| snp1 | NA | 0.6433 | 0.08915 | 4.940656e-324 |
| snp2 | NA | 0.6434 | 0.08916 | 4.940656e-324 |
What is the best approach to handle such snps in this function/tool because the NaNs present issues downstream. I would really appreciate your feedback on this issue.
You could probably derive these correlations yourself using the formula from p2cor():
https://github.com/tshmak/lassosum/blob/master/R/p2cor.R#L20
where t is basically effectsize / se and n is the sample size.
Thank you so much.
Does the package work on R 4.0.5 on macOS BigSur 11.6? I am getting this error here when I try to load it
Error: package or namespace load failed for ‘lassosum’:
package ‘lassosum’ was installed before R 4.0.0: please re-install it
I installed the package using the instructions here
Restart and reinstall?
I have done that still getting the same error
Hello, did you solve the problem? I have same problem here but didn't know how to solve it
Have you tried uninstalling lassosum and re-installing?
My package is working well, but I have a problem of getting NaN correlations values when running pcor2. There are 48 SNPs which have very low p-value, so I want to ask whether it is okay for excluding those SNPs from the analysis
You mean the p-value is less than the 2.2e-308 (i.e. double.xmin)? If so, I think a better idea is to replace these with double.xmin, since low p-values are supposed to indicate important SNPs.