Coder Social home page Coder Social logo

furkanmtorun / gnomad_python_api Goto Github PK

View Code? Open in Web Editor NEW
18.0 4.0 9.0 287 KB

๐Ÿงฌ gnomAD Python API is used to obtain data from gnomAD (genome aggregation database).

License: GNU General Public License v3.0

Python 100.00%
gnomad genomics bioinformatics-databases genomics-data gnomad-python-api variants genome-aggregation-database

gnomad_python_api's Introduction

Hi there, I'm Furkan! ๐Ÿ‘‹

  • ๐Ÿงฌ debugging DNA software!
  • ๐ŸŽ“ BSc. in Molecular Biology and Genetics
  • ๐Ÿ‘จโ€๐Ÿ’ป Researcher & Data Scientist at Exact Sciences in Munich
  • ๐ŸŽฏ Data Science & Engineering | AWS | Machine Learning | Bioinformatics | Genetics & Omics

๐Ÿ”— Let's connect:
Website Gmail LinkedIn Google Scholar Profile Twitter furkanmtorun

gnomad_python_api's People

Contributors

furkanmtorun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gnomad_python_api's Issues

cannot import name 'json_normalize' from 'pandas.io.json'

I just installed gnomad_python_api according to the instructions (i.e., git clone followed by pip install from requirements.txt). However, the first example I copied from the README yields the following error:

$ python gnomad_api_cli.py -filter_by=gene_name -search_by="BRCA1" -dataset="gnomad_r2_1" -sv_dataset="gnomad_sv_r2_1"
Traceback (most recent call last):
  File "/Users/wnoble/software/gnomad_python_api/gnomad_api_cli.py", line 10, in <module>
    from pandas.io.json import json_normalize as json_normalize
ImportError: cannot import name 'json_normalize' from 'pandas.io.json' (/opt/homebrew/Caskroom/miniconda/base/envs/gnomad/lib/python3.10/site-packages/pandas/io/json/__init__.py)

I suspect there may be a version mismatch problem w.r.t. pandas. Here is what I get from conda list:

$ conda list
# packages in environment at /opt/homebrew/Caskroom/miniconda/base/envs/gnomad:
#
# Name                    Version                   Build  Channel
altair                    5.2.0                    pypi_0    pypi
argparse                  1.4.0                    pypi_0    pypi
attrs                     23.1.0                   pypi_0    pypi
blinker                   1.7.0                    pypi_0    pypi
bzip2                     1.0.8                h620ffc9_4  
ca-certificates           2023.08.22           hca03da5_0  
cachetools                5.3.2                    pypi_0    pypi
certifi                   2023.11.17               pypi_0    pypi
charset-normalizer        3.3.2                    pypi_0    pypi
click                     8.1.7                    pypi_0    pypi
gitdb                     4.0.11                   pypi_0    pypi
gitpython                 3.1.40                   pypi_0    pypi
idna                      3.6                      pypi_0    pypi
importlib-metadata        6.11.0                   pypi_0    pypi
jinja2                    3.1.2                    pypi_0    pypi
jsonschema                4.20.0                   pypi_0    pypi
jsonschema-specifications 2023.11.2                pypi_0    pypi
libffi                    3.4.4                hca03da5_0  
markdown-it-py            3.0.0                    pypi_0    pypi
markupsafe                2.1.3                    pypi_0    pypi
mdurl                     0.1.2                    pypi_0    pypi
ncurses                   6.4                  h313beb8_0  
numpy                     1.26.2                   pypi_0    pypi
openssl                   3.0.12               h1a28f6b_0  
packaging                 23.2                     pypi_0    pypi
pandas                    2.1.3                    pypi_0    pypi
pillow                    10.1.0                   pypi_0    pypi
pip                       23.3.1          py310hca03da5_0  
plotly                    5.18.0                   pypi_0    pypi
protobuf                  4.25.1                   pypi_0    pypi
pyarrow                   14.0.1                   pypi_0    pypi
pydeck                    0.8.1b0                  pypi_0    pypi
pygments                  2.17.2                   pypi_0    pypi
python                    3.10.13              hb885b13_0  
python-dateutil           2.8.2                    pypi_0    pypi
pytz                      2023.3.post1             pypi_0    pypi
readline                  8.2                  h1a28f6b_0  
referencing               0.31.1                   pypi_0    pypi
requests                  2.31.0                   pypi_0    pypi
rich                      13.7.0                   pypi_0    pypi
rpds-py                   0.13.2                   pypi_0    pypi
setuptools                68.0.0          py310hca03da5_0  
six                       1.16.0                   pypi_0    pypi
smmap                     5.0.1                    pypi_0    pypi
sqlite                    3.41.2               h80987f9_0  
streamlit                 1.29.0                   pypi_0    pypi
tenacity                  8.2.3                    pypi_0    pypi
tk                        8.6.12               hb8d0fd4_0  
toml                      0.10.2                   pypi_0    pypi
toolz                     0.12.0                   pypi_0    pypi
tornado                   6.4                      pypi_0    pypi
tqdm                      4.66.1                   pypi_0    pypi
typing-extensions         4.8.0                    pypi_0    pypi
tzdata                    2023.3                   pypi_0    pypi
tzlocal                   5.2                      pypi_0    pypi
urllib3                   2.1.0                    pypi_0    pypi
validators                0.22.0                   pypi_0    pypi
wheel                     0.41.2          py310hca03da5_0  
xz                        5.4.2                h80987f9_0  
zipp                      3.17.0                   pypi_0    pypi
zlib                      1.2.13               h5a0b063_0  

What version of pandas do you use? I am using python 3.10.

No querys work using the given examples

Hi,
Just found your API looks good so far ๐Ÿ‘. Not sure if Im doing something wrong, but when using examples given no outputs are generated using the CLI or even through the GUI. Even when using the default GUI parameters plots or data is not able to be generated.
image

gnomad_r3 reference_genome

{ 
        gene(gene_name: "TP53", reference_genome: GRCh38) {
          variants(dataset: 	gnomad_r3) {
            consequence
            pos
            rsid
            variant_id: variantId

          }  	
       }
}

Thanks for the useful package. Quick note, it's currently not working to format queries for gnomad_r3. The current gnomAD API requires the reference_genome in the query for gnomad_r3, otherwise you get "gnomAD v3 data is not available on reference genome GRCh37"

No output being created - are there any log files that can be made to identify error?

Dear Developer,

I really like the novel idea of creating an API for gnomad, and hope I can make use of this tool.

I am just trying to run the example commands within the gnomad_python_api folder, however, I am unable to get any data in the output folder.

python3 gnomad_api_cli.py -filter_by=gene_name -search_by="BRCA1" -dataset="gnomad_r2_1" -sv_dataset="gnomad_sv_r2_1"

I am using python 3.8. Do you have any .log files that can be created to locate where any potential bugs may be?

Many thanks,
Krutik

Can gnomAD API be accessed in mainland China?

Hi,
Thank you very much for providing the API to access gnomAD. but when i use it in mainland China,it always Connection timed out. I want make sure that Can i use the gnomAD api in mainland China? if not, is there an alternative solution?

thanks very much!!

Best
Wei Zhou

pypi package

It would be nice if you also create pypi package for the project.

Alternative to rsid

Hello. Is there a way to alternatively search for variants without using the rsid (on GnomAD for example you can search using the genomic coordinates). Many Thanks.

No output when running the CLI vesion

Hello.

I tried running the program with the example command, such as python gnomad_python_api/gnomad_api_cli.py -filter_by=gene_name -search_by="BRCA1" -dataset="gnomad_r3". An output directory was created automatically yet no files were written and no error message was printed.
For installing the program I used the git clone command and installed the required packages as instructed in the program's page.

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.