Giter Club home page Giter Club logo

ensembl-api-rest's Introduction

Ensembl Api for search genes

CircleCI

Run api local

The putative “Ensembl Services Platform” allows users to search for a gene by its name. One web REST service is available on this platform to get all gene names corresponding to a pattern.

  1. How do I get set up this api? Install python +3.7 and create a virtualenv using pipenv: See here how to.

  2. Create and running a virtualenv

    user@server:~$ pipenv shell
    
  3. Running tests

    user@server:~$ pipenv run pytest -v
    
  4. Running api App:

    (ensembl-api-env) user@server:~$ FLAKS_APP=app.py
    (ensembl-api-env) user@server:~$ flask run
    

    The api will be available on http://127.0.0.1:5000/api/v1/genes

    A GET request example

    http://127.0.0.1:5000/api/v1/genes?lookup=brc&species=sapiens&limit=3
    
    • LIMIT: 3
    • Gene name lookup: "brc"
    • Species: "sapiens"

    Response example:

     {
         "start": 1,
         "limit": 3,
         "count": 4,
         "previous": "",
         "next": "/api/v1/genes?start=4&limit=3&lookup=brc&species=sapiens",
         "results": [
             {
                 "species": "homo_sapiens",
                 "ensembl_stable_id": "ENSG00000012048",
                 "gene_name": "BRCA1",
                 "location": "17:43044295-43170245"
             },
             {
                 "species": "homo_sapiens",
                 "ensembl_stable_id": "ENSG00000139618",
                 "gene_name": "BRCA2",
                 "location": "13:32315474-32400266"
             },
             {
                 "species": "homo_sapiens",
                 "ensembl_stable_id": "ENSG00000185515",
                 "gene_name": "BRCC3",
                 "location": "X:155071420-155123074"
             }
         ]
     }
    

Continuous Delivery (Circle Ci and Heroku)

  1. When we push on master will trigger the pipeline on Circle Ci as following:
  • Security check
  • Build (using a gpg to decrypt the private key)
  • Tests
  • Deploy on Heroku

On file .circleci/config.yml the workflow/jobs to build-test-deploy.

Here a workflow example after running:

Workflow

Here a specif example of tests passed on job tests:

Workflow

  1. If pipeline runs with successful, all tests passed, the app will be deploy on Heroku.

It can be found on: https://ensembl-api-rest-app.herokuapp.com/api/v1/genes?start=26&limit=25&lookup=brca (Here an example search by gene name)

Here an example requesting using Postman:

Workflow

ensembl-api-rest's People

Contributors

dedeco avatar

Watchers

 avatar  avatar  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.