Skip to content

sdee/variant_search

Repository files navigation

Introducting Variant Search

Variant Search is a tool for searching for genetic variants by gene name. The key feature, auto-suggest, aids the user by offering a list of gene name suggestions based on what has been typed. When submitted, this tool displays a tabular list of variants for the query gene.

In Action

Demo

(Based on running smaller, development version of variants file)

Setup

Run Back-End

$ pip install -r requirements.txt 
$ python manage.py runserver
* Try: 
  * GET http://localhost:5000/api/suggestions/AB
  * GET http://localhost:5000/api/variants/EYS

Install Front-End

(dependent on back-end to be running)

$ cd static
$ npm install
$ npm start
Visit http://localhost:3000/ in browser (default port)

Test Back-End

$ python tests/allTests.py

Test Front-End

cd static
$ npm test

Note: coverage of client-side not yet complete

Data

By default, the development version of this application runs off a variants file with 2,000 variants.

The full variants file can be retrieved at http://clinvitae.invitae.com/download and copied over to /data (larger than allowed by Github).

Then, VARIANT_FILE_PATH should be updated in config.py either in BaseConfig for the web server or TestingConfig for the tests. The api currently expects the file to be utf-8.

Endpoints

  • GET http://localhost:5000/api/suggestions/<FRAGMENT> where fragment is the prefix

Sample response:

{"results": ["ABAT", "ABCA12", "ABCA3", "ABCB1", "ABCC1", "ABCC2", "ABCC6", "ABCC9", "ABCD1", "ABHD12", "ABHD5"]}
  • GET http://localhost:5000/api/variants/<GENE NAME>
[{"Inferred Classification": "Pathogenic", "Nucleotide Change": "", "Source": "ClinVar", "Chr": null, "Ref": null, "Reported Ref": null, "Protein Change": "", "Assembly": null, "Reported Alt": null, "Genomic Start": null, "Genomic Stop": null, "Other Mappings": "", "Submitter Comment": "", "URL": "https://www.ncbi.nlm.nih.gov/clinvar/RCV000000569", "Last Updated": "2017-04-25", "Region": "", "Reported Classification": "Pathogenic", "Alias": "", "Transcripts": "", "Gene": "EYS", "Last Evaluated": "2008-11-01", "Accession": null, "Alt": null} ...]

This endpoint provides all of the columns in the variants file as attributes for extensibility purposes. The client currently only displays a select few.

Stack Overview

About

Search for genetic variants with the help of autosuggest (2017)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published