Giter Club home page Giter Club logo

clinvitae_server's Introduction

clinvitae_server

This server provides endpoints for the CLInvitae application. Currently the database used is sqlite but the db module should provide an abstraction such that the server could switch between db instances based on the environment (caveat: I'm unsure whether the interface provided by sqlite3 is similar to other python db interfaces).

1. Installation

The server requires Python 2.7. Once you have that, I suggest using a virtual environment to install the additional dependencies.

$ pip install -r requirements.txt

2. Creating the database

I wrote a script that should automate all tasks of pulling the sample dataset from the real clinvitae server. You only need to specify an output directory for the sqlite database to live, and the script will handle downloading the data, prettying it up, generating a schema based on the data, and then loading the data into a sqlite database.

$ bash scripts/load_data.sh <OUTPUT_DIRECTORY>

3. Running the server

Once you've completed steps 1 and 2 you're ready to run the server. The server will pick up database configuration details from the shell environment, so first you'll need to export some vars

$ export CLINVITAE_ENV='development' # not necessarily "development" but don't use "production" unless you've configured it in app/db
$ export CLINVITAE_DB=<OUTPUT_DIRECTORY>/variants.db

And then you're good to go!

$ FLASK_APP=app/app.py flask run

Testing

Once you have the database loaded and your environment variables exported, you can run tests with pytest from the root of the project

clinvitae_server's People

Contributors

alexherns avatar

Watchers

Layton Wedgeworth avatar James Cloos avatar

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.