{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "# Import coolbox\n", "import sys\n", "sys.path.insert(0, \"../\")\n", "from coolbox.api import *" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Run the cell below to start a coolbox browser.**" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "scrolled": false }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "779dd9a926524793a0f4ecbb221f60c1", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(VBox(children=(HBox(children=(Dropdown(index=8, options=('chr1', 'chr2', 'chr3', 'chr4', 'chr5'…" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "DATA_DIR = f\"../tests/test_data\"\n", "test_interval = \"chr9:4000000-6000000\"\n", "test_itv = test_interval.replace(':', '_').replace('-', '_')\n", "\n", "cool1 = Cool(f\"{DATA_DIR}/cool_{test_itv}.mcool\")\n", "\n", "frame = XAxis() + \\\n", " cool1 + Title(\"Hi-C(.cool)\") + \\\n", " Spacer(0.5) + \\\n", " Virtual4C(cool1, \"chr9:4986000-4986000\") + Title(\"Virtual4C\") + \\\n", " Spacer(0.5) + \\\n", " BAM(f\"{DATA_DIR}/bam_{test_itv}.bam\") + Title(\"BAM Coverage\") +\\\n", " Spacer(0.5) + \\\n", " Arcs(f\"{DATA_DIR}/bedpe_{test_itv}.bedpe\") + Inverted() + Title(\"Arcs(BEDPE)\") + \\\n", " Spacer(0.1) + \\\n", " Arcs(f\"{DATA_DIR}/pairs_{test_itv}.pairs\") + Inverted() + Title(\"Arcs(Pairs)\") + \\\n", " GTF(f\"{DATA_DIR}/gtf_{test_itv}.gtf\", length_ratio_thresh=0.005) + TrackHeight(6) + Title(\"GTF Annotation\") + \\\n", " Spacer(0.1) + \\\n", " BigWig(f\"{DATA_DIR}/bigwig_{test_itv}.bw\") + Title(\"BigWig\") + \\\n", " BedGraph(f\"{DATA_DIR}/bedgraph_{test_itv}.bg\") + Title(\"BedGraph\") + \\\n", " Spacer(1) + \\\n", " BED(f\"{DATA_DIR}/bed_{test_itv}.bed\") + TrackHeight(10) + Title(\"BED Annotation\")\n", "\n", "frame.properties['width'] = 45\n", "bsr = Browser(frame)\n", "bsr.goto(test_interval)\n", "bsr.show()" ] } ], "metadata": { "@webio": { "lastCommId": null, "lastKernelId": null }, "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.7.9" } }, "nbformat": 4, "nbformat_minor": 4 }