Skip to content

Instantly share code, notes, and snippets.

View flekschas's full-sized avatar
👋

Fritz Lekschas flekschas

👋
View GitHub Profile
@flekschas
flekschas / index.html
Last active September 25, 2024 10:11
Custom styled scroll bar with 'margin'
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Custom scroll bar with 'margin'</title>
</head>
<body>
<div id="content"></div>
</body>
</html>
@flekschas
flekschas / Install-Cypher-Syntax-Highlight-ST3.md
Last active April 11, 2023 03:34
Add Syntax Highlighting for Cypher in Sublime Text 3

Credit goes to

  1. Jan Klaas Kollhof (and Fred Benenson)
  2. Chris Skardon

Installation

Since the original plugin has been developed for Sublime Text 2 we have to install it manually.

  1. Go to https://github.com/fredbenenson/sublime-cypher, download ZIP of the repo, extract the content and rename the folder to ‘Cypher’. You can download the original repo from https://github.com/kollhof/sublime-cypher but Fred Benenson introduced a handy fix for UTF-8 data, which hasn't integrated at the point of this writing.
@flekschas
flekschas / data.js
Last active February 23, 2016 16:59
Caleydo Web Tutorial - AngularJS heatmap integration
var DUMMY_DATA = [['ID','a','b','c','d','e'],
['1', 10, 9.14, 1, 2, 4],
['2', 8, 8.14, 1, 2, 4],
['3', 13, 8.74, 1, 2, 4],
['4', 9, 8.77, 1, 2, 4],
['5', 11, 9.26, 1, 2, 4],
['6', 14, 8.1, 1, 2, 4],
['7', 6, 6.13, 1, 2, 4],
['8', 4, 3.1, 1, 2, 4],
['9', 12, 9.13, 1, 2, 4],
@flekschas
flekschas / README.md
Last active November 16, 2022 16:14
Generate a random directed acyclic graph hierarchy graph and serialize as JSON

Generate random DAG in JSON

Generates a random directed acyclic graph and serializes it in JSON

Installation

  1. git clone https://gist.github.com/flekschas/0ea70dec4d92bc706e61 random-graph-json && cd random-graph-json
  2. mkvirtualenv -a $(pwd) random-graph-json [Optional but recommended]
  3. pip install -r requirements.txt
@flekschas
flekschas / download_nsd.sh
Created April 21, 2016 15:49
Grab all ISA-Tabs from Nature Scientific Data
#!/bin/bash
# Download Nature Scientific Data ISA Tabs
YEARS[0]=2014
YEARS[1]=2015
YEARS[2]=2016
NUM_ISA_TABS[0]=53
NUM_ISA_TABS[1]=76
[{
"url": "http://higlass.io/visualization/?config=B80L-PFiTLihXPGLcYvXbg",
"title": "Viewport projection",
"description": "Showing where the one view located by showing its position in another view",
"image": "https://cloud.githubusercontent.com/assets/932103/22489607/698b0e46-e7e6-11e6-9ba2-41ef7e416cd8.png"
}]
@flekschas
flekschas / rao-2014-gm12878-mbol-1kb-mres-chr22-loops-hipiler-v140.json
Last active December 5, 2019 21:14
HiPiler Example: Loop calls for chromosome 22 from Rao et al. (2014) GM12878 including distance-to-diagonal, noise, and sharpness measures. See http://hipiler.higlass.io for a live demo.
{
"fgm": {
"fragmentsServer": "//higlass.io/api/v1/",
"fragmentsPrecision": 2,
"fragmentsDims": 22,
"fragmentsBaseRes": 1000,
"fragments": [
["chrom1", "start1", "end1", "strand1", "chrom2", "start2", "end2", "strand2", "dataset", "zoomOutLevel", "size", "distance-to-diagonal", "noise", "sharpness", "_test"],
["chr22", 17395000, 17400000, "coding", "chr22", 17535000, 17540000, "coding", "CQMd6V_cRw6iCI_-Unl3PQ", 3, 25000000, 135000, 0.21559968240959723, 58.75532055518839, 1],
["chr22", 17400000, 17410000, "coding", "chr22", 17980000, 17990000, "coding", "CQMd6V_cRw6iCI_-Unl3PQ", 3, 100000000, 570000, 0.19905589933149648, 59.977490663167465, 1],
@flekschas
flekschas / rao-2014-gm12878-mbol-1kb-mres-telomeres-hipiler-v140.json
Last active December 5, 2019 21:15
HiPiler Example: Telomere contacts from Rao et al. (2014) GM12878. See https://flekschas.github.io/hipiler/ for a live demo.
{
"fgm": {
"fragmentsServer": "//higlass.io/api/v1/",
"fragmentsPrecision": 2,
"fragmentsNoBalance": true,
"fragmentsDims": 60,
"fragmentsBaseRes": 1000,
"fragments": [
["chrom1", "start1", "end1", "strand1", "chrom2", "start2", "end2", "strand2", "dataset", "zoomOutLevel"],
["chr1", 0, 1, "coding", "chr2", 0, 1, "coding", "CQMd6V_cRw6iCI_-Unl3PQ", 6],
@flekschas
flekschas / rao-2014-gm12878-vs-k562-mbol-1kb-mres-telomeres-hipiler-v140.json
Last active December 5, 2019 21:17
HiPiler Example: Telomere contacts from Rao et al. (2014) GM12878 vs K562. Using "group by location" and switching to the "variance cover mode" one can compare the telomeres in both cell lines. See https://flekschas.github.io/hipiler/ for a live demo.
{
"fgm": {
"fragmentsServer": "//higlass.io/api/v1/",
"fragmentsPrecision": 2,
"fragmentsNoBalance": true,
"fragmentsDims": 60,
"fragmentsBaseRes": 1000,
"fragments": [
["chrom1", "start1", "end1", "strand1", "chrom2", "start2", "end2", "strand2", "dataset", "zoomOutLevel", "cell-line"],
["chr1", 0, 1, "coding", "chr2", 0, 1, "coding", "CQMd6V_cRw6iCI_-Unl3PQ", 6, "GM12878"],
@flekschas
flekschas / rao-2014-gm12878-mbol-1kb-mres-chr4-tads-hipiler-v140.json
Last active December 5, 2019 21:17
HiPiler Example: TAD calls of Arrowhead for chromosome 4 from Rao et al. (2014) GM12878. TADs are normalized to 60x60 bins to support piling, the diagonal is excluded for better of-diagonal patterns, and the matrix is capped at the 99-percentile against outliers. See https://flekschas.github.io/hipiler/ for a live demo.
{
"fgm": {
"fragmentsServer": "//higlass.io/api/v1/",
"fragmentsPrecision": 2,
"fragmentsDims": 60,
"fragmentsPadding": 50,
"fragmentsBaseRes": 1000,
"fragmentsPercentile": 99,
"fragmentsIgnoreDiags": 1,
"fragments": [