KalinNonchev / gnomAD_DB

This package scales the huge gnomAD files to a SQLite database, which is easy and fast to query. It extracts from a gnomAD vcf the minor allele frequency for each variant.
MIT License
35 stars 10 forks source link

Unable to open database file with gnomAD_DB() #13

Closed PabloRomanjo closed 2 years ago

PabloRomanjo commented 2 years ago

Hi,

I'm trying to open gnomad 2.1.1 database, however it returns the OperationalError: unable to open database file.

Using Atom in Windows 10. See enclosed image.

https://ibb.co/9qz9DXY

Thanks!

PabloRomanjo commented 2 years ago

Solved The solution is just to rename the downloaded file to gnomad_db.sqlite3.

KalinNonchev commented 2 years ago

Hello Pablo,

have you downloaded the package as:

from gnomad_db.database import gnomAD_DB
download_link = "https://zenodo.org/record/5045102/files/gnomad_db_v2.1.1.sqlite3.gz?download=1"
output_dir = "test_dir" # database_location
gnomAD_DB.download_and_unzip(download_link, output_dir)

or manually from the zenodo website? The function gnomAD_DB.download_and_unzip should have taken care about the name of the sqlite3 file.

Best, Kalin