Skip to main content

The helix package facilitates interactions with the helix.com genomics platform

Project description

helix facilitates interactions with the Helix genetics platform.

https://travis-ci.org/reece/helix.svg?branch=master https://badge.fury.io/py/helix.svg

Installation

On Ubuntu 16.04:

$ pip install helix ipython
$ ipython

In [1]: from helix import HelixClient

In [2]: hc = HelixClient(
   ...:     base_urls={
   ...:         'genomics': 'https://genomics.staging.helix.com/v0/',
   ...:         'identity': 'https://api.staging.helix.com/v0/'},
   ...:     credentials={
   ...:         'genomics': {
   ...:             'client_id': 'CL-AQ3EJLBNNDE7LJZYVGUOMM4WA5HBOHEL',
   ...:             'client_secret': 'CS-Y5MFWTTZU67LOIEBOWFT2LE7DEI3OPP7'},
   ...:          'identity': {
   ...:              'client_id': 'CL-7ICCDTTMGWK7VHTJIHCPWZZ7EEZBID7Z',
   ...:              'client_secret': 'CS-B7XBHYQLWURKBV3ZXVBGK7SXIZ7JGKTG'}})

In [3]: events_iterator = hc.get_events(after=0)

In [4]: event = next(events_iterator)

In [5]: event
Out[5]:
{u'eventType': u'accountUpdate',
 u'pacId': u'PC-XIMPMZE75Q5XQHDKS6EC3EDSWAQJF25A',
 u'sequenceNum': 2,
 u'timestamp': u'2016-08-05T21:08:35Z'}

In [6]: pacid = "PC-VCIOSK47ERXXIBPO5ZBOMW2HSNCQETCY"

In [7]: hc.get_customer(pacid)
Out[7]:
{u'email': u'joe@example.com',
 u'firstName': u'Test',
 u'lastName': u'User',
 u'supportId': u'US-X3SY-3PD9T'}

In [8]: hc.get_sample_status(pacid)[:3]
Out[8]:
[{u'status': u'Data Delivery Complete', u'timestamp': u'2016-11-16T18:21:13Z'},
 {u'status': u'Data Delivery Complete', u'timestamp': u'2016-11-16T18:17:52Z'},
 {u'status': u'Data Delivery Complete', u'timestamp': u'2016-11-16T01:49:23Z'}]

In [9]: hc.get_variants(pacid)[:2]

Developer quick start

hg clone git@github.com:reece/helix.git
cd helix
make devready
source venv/bin/activate

Makefile Commands

$ make
BASIC USAGE
  help -- display this help message
SETUP, INSTALLATION, PACKAGING
  venv: make a Python 3 virtual environment
  setup: setup/upgrade packages *in current environment*
  devready: create venv, install prerequisites, install pkg in develop mode
  develop: install package in develop mode
  install: install package
  bdist bdist_egg bdist_wheel build sdist: distribution options
  upload: upload to pypi
  upload_*: upload to named pypi service (requires config in ~/.pypirc)
TESTING
  test: execute tests
  tox: execute tests via tox
UTILITY TARGETS
  reformat: reformat code with yapf and commit
  docs -- make sphinx docs
  clean: remove temporary and backup files
  cleaner: remove files and directories that are easily rebuilt
  cleaner: remove files and directories that require more time/network fetches to rebuild

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
helix-0.1.0-py2.py3-none-any.whl (11.1 kB) Copy SHA256 hash SHA256 Wheel py2.py3
helix-0.1.0-py3.5.egg (17.0 kB) Copy SHA256 hash SHA256 Egg 3.5
helix-0.1.0.tar.gz (70.7 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page