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

Conditional cis-QTL Mapping Errors in tensorQTL #174

Open
MinS1 opened this issue Dec 19, 2024 · 1 comment
Open

Conditional cis-QTL Mapping Errors in tensorQTL #174

MinS1 opened this issue Dec 19, 2024 · 1 comment

Comments

@MinS1
Copy link

MinS1 commented Dec 19, 2024

Hi,

I am currently using tensorQTL to perform conditional cis-QTL mapping, but I am encountering multiple warnings and errors during the process. Specifically, I am seeing the following runtime warnings in the error log file:

/envs/tensorqtl/lib/python3.11/site-packages/tensorqtl/core.py:370:
RuntimeWarning: divide by zero encountered in log
np.log(dof_init), tol=tol, maxiter=50)
/envs/tensorqtl/lib/python3.11/site-packages/tensorqtl/core.py:340:
RuntimeWarning: invalid value encountered in divide
tstat2 = dof * r2 / (1 - r2)
/envs/tensorqtl/lib/python3.11/site-packages/tensorqtl/core.py:340:
RuntimeWarning: divide by zero encountered in divide
tstat2 = dof * r2 / (1 - r2)
/envs/tensorqtl/lib/python3.11/site-packages/tensorqtl/core.py:355:
RuntimeWarning: divide by zero encountered in log
return (1.0-shape1)*np.sum(np.log(x)) + (1.0-shape2)*np.sum(np.log(1.0-x)) + len(x)*logbeta
/envs/tensorqtl/lib/python3.11/site-packages/scipy/optimize/_optimiz
e.py:835: RuntimeWarning: invalid value encountered in subtract
np.max(np.abs(fsim[0] - fsim[1:])) <= fatol):
/envs/tensorqtl/lib/python3.11/site-packages/tensorqtl/cis.py:571: R
untimeWarning: divide by zero encountered in scalar divide
slope_se = np.abs(slope) / np.sqrt(tstat2)
/envs/tensorqtl/lib/python3.11/site-packages/tensorqtl/core.py:370:
RuntimeWarning: invalid value encountered in log
np.log(dof_init), tol=tol, maxiter=50)
/envs/tensorqtl/lib/python3.11/site-packages/tensorqtl/core.py:340:
RuntimeWarning: divide by zero encountered in divide
tstat2 = dof * r2 / (1 - r2)
/envs/tensorqtl/lib/python3.11/site-packages/tensorqtl/core.py:341:
RuntimeWarning: invalid value encountered in sqrt
......
......
......

These warnings appear for every chromosome, though the number of warnings varies across chromosomes. Despite the warnings, the conditional cis-QTL still produces result files. However, I have noticed that some of the pairs in the permutation result files are not present in the conditional cis-QTL result files. This leads me to believe that the warnings may be affecting the final results.

I would appreciate your guidance on how to resolve these issues. I have already confirmed that I am using the latest version of tensorQTL, and I am working with methylation data that does not contain missing values.

Could you please advise on the possible causes of these errors and how I can fix the issue to ensure more reliable results?

Thank you very much for your help!

Best regards,
Shi

@francois-a
Copy link
Collaborator

Can you please share a small test dataset that reproduces these errors?

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