helix软件包促进了与helix.com基因组学平台的交互作用
helix的Python项目详细描述
螺旋促进了与螺旋遗传学平台的相互作用。
安装
在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]
开发人员快速入门
hg clone git@github.com:reece/helix.git cd helix make devready source venv/bin/activate
生成文件命令
$ 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