Skip to content

Instantly share code, notes, and snippets.

View flekschas's full-sized avatar
👋

Fritz Lekschas flekschas

👋
View GitHub Profile
@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 / data-visualization-type-catalogs.md
Created May 14, 2018 14:09
Data Visualization Type Catalogs
@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,
@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 / conclusion.md
Created July 31, 2018 14:59
Performance of Object.keys vs Object.values for getting the number of props of an object

Results

Let's get started!
VM73:13 Object.keys took: 20234.000000054948msecs
VM73:19 Object.values took: 5987.800000002608msecs

Conclusion

@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 / _pilingjs.json
Last active February 9, 2021 20:22
Book Covers
{
"title": "Book Covers",
"thumbnail": "https://user-images.githubusercontent.com/932103/89745160-d952b780-da7f-11ea-9af4-54a3fd205e07.jpg"
}
@flekschas
flekschas / _pilingjs.json
Last active September 22, 2020 22:10
Matrices
{
"title": "Matrices",
"subtitle": "Hi-C Loop Patterns",
"thumbnail": "https://user-images.githubusercontent.com/932103/90644105-5b6e7900-e202-11ea-8fa3-3f9c4c469f19.jpg"
}