Skip to content

Instantly share code, notes, and snippets.

@pkerpedjiev
Created January 6, 2020 05:15
Show Gist options
  • Save pkerpedjiev/fdc23aa705c0c7fed80255dfef14a9d2 to your computer and use it in GitHub Desktop.
Save pkerpedjiev/fdc23aa705c0c7fed80255dfef14a9d2 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"%load_ext autoreload\n",
"%autoreload 2"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"import higlass\n",
"import higlass.tilesets\n",
"from higlass.client import Track, View"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"yoo\n",
"expanse\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "18deec6583ee4aae874476375008a668",
"version_major": 2,
"version_minor": 0
},
"image/png": "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAEumlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS41LjAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgeG1sbnM6ZXhpZj0iaHR0cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iCiAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90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BQDQBbQ50XuBkAKqQ0pnQBGXsz43ktbOn6YSry4D0A2rGjhYRNwVhE8yUx1SOv96+e4P8n2uJsyu5r7fa3IAwHOAtkqAVUE8tClYbycO6d0xOJ3cDyAy+30UuM0FQNYKLsyshQ6dufRvylqW369wbd894SpJ+rDxIg5FKlHIEotUHBuZbZHAAx7FS4aYnjcfkcCdJQIA7AfudRuUNK2tErijRHELeD4eFb96iK1Sca6ACRS+Ui0TXzLx+ubpiVjtwMUNTm6fDM3Y3jmmxUYVUB3iTsWj4kGnpB1Hh7VvRucO/zNv9gK9BUGdzZTApNuojqPDWiwt3u5RGAAhGPUEcGoi8dR0ieIAqmBMAkNuAx+vLevfEJS2p5wbU6QYk6TvflfW0xYxn66/aV+pEOWa+FEC3wEz/zdEUBXjT9SFYjIeFQngUydH3bAU3bDq1hoipIq+nrbIQnZ/voXNntcNSwH6gNO6Ye1YKwhFkKxfp30Mmes4HhWTwLv5fhnxDiAMnFgriPVB+eb3zzSM5wAy1g0YS76bM+JZWxOIsE8c776/8p3sd35TWgWcBmoK5LgOtMaj4me7wVeOj8j+wZn3/p4z9+aPBRQx2bRe22680Jg7e5ad0fGomCLdHxR6zXiqRFAVFyMV6q6l4isAMhDngO0sn46SIG72iW93bPQ1n3/prrP5voWeZkHS93wXOPb6Rafj2Mhs+2ORss972iILdj5Fu5jMujgAPAmUu4UoZqtuo3TD8gMtwG5gG+kHTE0mxx/ArnhUjLsF+A/qg322q+VaHAAAAABJRU5ErkJggg==",
"text/plain": [
"HiGlassDisplay(viewconf={'editable': True, 'views': [{'uid': 'ejPGX2G9TumfAqHrAhIdgA', 'tracks': {'top': [], '…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"view1 = View([\n",
" #Track(track_type='top-axis', position='top'),\n",
" Track(track_type='heatmap', \n",
" position='center',\n",
" tileset_uuid='CQMd6V_cRw6iCI_-Unl3PQ',\n",
" server=\"http://higlass.io/api/v1/\",\n",
" height=250,\n",
" options={ 'valueScaleMax': 0.5 }),\n",
"])\n",
"\n",
"display, server, viewconf = higlass.display([view1])\n",
"display"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.2"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"state": {
"0c2c323160f2435cbcc75a76bb1376f3": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.1.0",
"model_name": "LayoutModel",
"state": {}
},
"feacf09da9ed4dec9e510690436c38ad": {
"model_module": "higlass-jupyter",
"model_module_version": "0.3.0",
"model_name": "HiGlassDisplayModel",
"state": {
"_dom_classes": [],
"_model_data": [],
"_view_count": null,
"auth_token": "",
"bounded": null,
"cursor_location": [],
"dark_mode": false,
"default_track_options": {},
"dom_element_id": "ju7fmt",
"height": 0,
"layout": "IPY_MODEL_0c2c323160f2435cbcc75a76bb1376f3",
"location": [
0,
99.99999999999999,
35.968586387434556,
64.03141361256544
],
"options": {},
"renderer": "",
"select_mode": false,
"selection": [],
"selection_on_alt": false,
"viewconf": {
"editable": true,
"exportViewUrl": "http://higlass.io/api/v1/viewconfs",
"locationLocks": {
"locksByViewUid": {},
"locksDict": {}
},
"trackSourceServers": [
"http://higlass.io/api/v1"
],
"valueScaleLocks": {
"locksByViewUid": {},
"locksDict": {}
},
"views": [
{
"initialXDomain": [
0,
99.99999999999999
],
"initialYDomain": [
35.968586387434556,
64.03141361256544
],
"layout": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"tracks": {
"bottom": [],
"center": [
{
"height": 250,
"options": {
"backgroundColor": "#eeeeee",
"colorRange": [
"white",
"rgba(245,166,35,1.0)",
"rgba(208,2,27,1.0)",
"black"
],
"colorbarBackgroundColor": "#ffffff",
"colorbarPosition": "topRight",
"extent": "full",
"heatmapValueScaling": "log",
"labelBottomMargin": 0,
"labelLeftMargin": 0,
"labelPosition": "bottomRight",
"labelRightMargin": 0,
"labelShowResolution": true,
"labelTopMargin": 0,
"maxZoom": null,
"minHeight": 100,
"minWidth": 100,
"mousePositionColor": "#000000",
"name": "Rao et al. (2014) GM12878 MboI (allreps) 1kb",
"scaleEndPercent": "1.00000",
"scaleStartPercent": "0.00000",
"showMousePosition": false,
"showTooltip": false,
"trackBorderColor": "black",
"trackBorderWidth": 0,
"valueScaleMax": 0.5
},
"server": "http://higlass.io/api/v1/",
"tilesetUid": "CQMd6V_cRw6iCI_-Unl3PQ",
"transforms": [
{
"name": "ICE",
"value": "weight"
}
],
"type": "heatmap",
"uid": "bi9l8ToWRy-4EcR_1-Xrew"
}
],
"gallery": [],
"left": [],
"right": [],
"top": [],
"whole": []
},
"uid": "XL_OwbsERXu5LG0DzdiRjg"
}
],
"zoomLocks": {
"locksByViewUid": {},
"locksDict": {}
}
}
}
}
},
"version_major": 2,
"version_minor": 0
}
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment