-
Notifications
You must be signed in to change notification settings - Fork 17
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
sqlite3.OperationalError #1
Comments
Hi thanks for your interest in FOCUS. I'm looking into this issue as several users have recently reported it. It looks like sqlite has a limit of the number of variables that can be used within an 'IN' statement (999). I'm working on a bugfix that will require getting results in batches and joining them together after-the-fact rather than all at once. |
Hello @geneticsmcgill , I just released a new version (0.5) of FOCUS that should address this issue. You can install either by pulling the latest from the repo and installing, or using pip. Please let me know if you have any other questions or issues. This was fixed by commit: ff06df0 |
If users are still running into this issue I would recommend updating the sqlite software with conda or another package manager. The software limit implemented in pyfocus is based on a newer sqlite version and there is no clean way to programmatically determine what the limit is. Given that, the simplest solution is to update sqlite. |
I also ran into this issue and am not sure what sqlite3 version is expected. Here is what I saw when checking the sqlite3 version in python. `Python 3.6.5 (default, Jun 19 2018, 16:28:05) [GCC 6.2.0] on linux Type "help", "copyright", "credits" or "license" for more information.
'2.6.0'
'3.7.17'` what version is expected? |
Here is what I have on my end:
|
Hello,
I was using the FOCUS finemap function and seem to be getting the following error. I've munged the dataset and I'm using the recommended LD panel + focus.db. Do you know why I may be getting this error? Thank you so much!
ERROR BELOW:
[2019-04-08 15:54:39 - WARNING] No GWAS SNPs with p-value < 5e-08 found at 1:41975327 - 1:43758457. Skipping
[2019-04-08 15:54:39 - ERROR] (sqlite3.OperationalError) too many SQL variables
[SQL: SELECT weight.id, weight.snp, weight.chrom, weight.pos, weight.effect_allele, weight.alt_allele, weight.effect, weight.std_error, weight.model_id, model.id, model.inference, model.ref_id, model.mol_id, molecularfeature.id, molecularfeature.ens_gene_id, molecularfeature.ens_tx_id, molecularfeature.mol_name, molecularfeature.type, molecularfeature.chrom, molecularfeature.tx_start, molecularfeature.tx_stop, refpanel.id, refpanel.ref_name, refpanel.tissue, refpanel.assay
FROM weight JOIN model ON model.id = weight.model_id JOIN molecularfeature ON molecularfeature.id = model.mol_id JOIN refpanel ON refpanel.id = model.ref_id
WHERE weight.snp IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ....'rs2429049', 'rs673242', 'rs11210864', 'rs3011220', 'rs12746640', 'rs11210913', 'rs3791102', 'rs325145', 'rs3818536', 'rs783304', 'rs12140156', 'rs803682', 'rs72683973', 'rs11210949', 'rs2527776', 'rs574736', 'rs78263317')]
(Background on this error at: http://sqlalche.me/e/e3q8)
[2019-04-08 15:54:39 - INFO] Finished twas & fine-mapping
The text was updated successfully, but these errors were encountered: