Skip to content

Instantly share code, notes, and snippets.

View flekschas's full-sized avatar
👋

Fritz Lekschas flekschas

👋
View GitHub Profile
@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 / 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 / data-visualization-type-catalogs.md
Created May 14, 2018 14:09
Data Visualization Type Catalogs
@flekschas
flekschas / rao-2014-gm12878-template
Last active June 17, 2018 22:50
This is a simplified template for a view configuration on Rao et al. (2014) GM12878 served from http://higlass.io. Please refer to https://github.com/flekschas/hipiler/wiki/Data#config-file how to configure the snippets (`fgm` part). In essence you need to replace the `fgm.fragments` with a double array of BEDPE like locations. This example cont…
{
"fgm": {
"fragmentsServer": "//higlass.io/api/v1/",
"fragmentsPrecision": 2,
"fragmentsDims": 60,
"fragmentsPadding": 50,
"fragmentsBaseRes": 1000,
"fragmentsPercentile": 99,
"fragmentsIgnoreDiags": 1,
"fragments": [
@flekschas
flekschas / instructions.md
Last active July 5, 2018 14:06
Install iPython Widget in Jupyter Notebook and JupyterLab

Get a Jupyter Notebook and JupyterLab compatible widget setup

Install packages

conda install -c conda-forge jupyterlab
conda install -c conda-forge ipywidgets
conda install -c conda-forge cookiecutter

jupyter labextension install @jupyter-widgets/jupyterlab-manager
@flekschas
flekschas / delay-promise.js
Created July 15, 2018 22:28
Delay promise chain
const delayPromise = (duration) => (...args) => new Promise((resolve) => {
setTimeout(() => { resolve(...args); }, duration);
});
export default delayPromise;
@flekschas
flekschas / index.js
Created October 19, 2018 02:02
A small library for rigid body transformations for WebGL.
import { quat, vec3 } from 'gl-matrix';
import * as rbt from './rigid-body-transform.js';
const myFancyRbt = rbt.create();
// Rotate 45 degree around the x axis
const r = rbt.create({ r: quat.fromEuler(45, 0, 0) });
myFancyRbt.multiply(r);
// Translate
@flekschas
flekschas / convert_with_clodius.sh
Created November 9, 2018 19:53
Script to do convert data with Clodius in the cloud cleanly. Created by Alex Reynolds
#!/bin/bash
ENVIRONMENT=$1
ASSEMBLY=$2
RESOLUTION=$3
STATES=$4
STATESFN=$5
MARKSFN=$6
FILETOMOVESRC=$7
FILETOMOVEDEST=$8
@flekschas
flekschas / rao-2014-gm12878-chr4-arrowhead-tads-hipiler-v140.csv
Last active December 5, 2019 21:12
HiPiler CSV example: Arrowhead TAD calls for chromosome 4 from Rao et al. (2014) GM12878 including the corner score, U-var, L-var, U-sign, and L-sign. Go to http://hipiler.higlass.io and drag this file onto the page to explore the data.
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 17 columns, instead of 14. in line 7.
chrom1,start1,end1,strand1,chrom2,start2,end2,strand2,dataset,zoomOutLevel,server,coords,corner-score,U-var,L-var,U-sign,L-sign
chr4,69285000,70075000,+,chr4,69285000,70075000,+,CQMd6V_cRw6iCI_-Unl3PQ,0,//higlass.io,hg19,0.098279,0.20712,0.43713,0.4001,0.40554
chr4,18680000,20260000,+,chr4,18680000,20260000,+,CQMd6V_cRw6iCI_-Unl3PQ,0,//higlass.io,hg19,0.58392,0.31563,0.32759,0.5282,0.42433
chr4,42985000,44635000,+,chr4,42985000,44635000,+,CQMd6V_cRw6iCI_-Unl3PQ,0,//higlass.io,hg19,0.71638,0.29186,0.32687,0.61341,0.53275
chr4,60060000,60985000,+,chr4,60060000,60985000,+,CQMd6V_cRw6iCI_-Unl3PQ,0,//higlass.io,hg19,0.60764,0.29093,0.28665,0.41713,0.40194
chr4,8640000,9145000,+,chr4,8640000,9145000,+,CQMd6V_cRw6iCI_-Unl3PQ,0,//higlass.io,hg19,0.80964,0.2152,0.33994,0.47216,0.60157
chr4,22960000,24440000,+,chr4,22960000,24440000,+,CQMd6V_cRw6iCI_-Unl3PQ,0,//higlass.io,hg19,0.6919,0.25365,0.22566,0.43577,0.53228
chr4,125265000,126205000,+,chr4,125265000,126205000,+,CQMd6V_cRw6iCI_-Unl3PQ,0,//higlass.io,hg19,0.96028,