Skip to content

Instantly share code, notes, and snippets.

Fritz Lekschas flekschas

Block or report user

Report or block flekschas

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@flekschas
flekschas / convert_with_clodius.sh
Created Nov 9, 2018
Script to do convert data with Clodius in the cloud cleanly. Created by Alex Reynolds
View convert_with_clodius.sh
#!/bin/bash
ENVIRONMENT=$1
ASSEMBLY=$2
RESOLUTION=$3
STATES=$4
STATESFN=$5
MARKSFN=$6
FILETOMOVESRC=$7
FILETOMOVEDEST=$8
@flekschas
flekschas / index.js
Created Oct 19, 2018
A small library for rigid body transformations for WebGL.
View index.js
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 / conclusion.md
Created Jul 31, 2018
Performance of Object.keys vs Object.values for getting the number of props of an object
View conclusion.md

Results

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

Conclusion

View delay-promise.js
const delayPromise = (duration) => (...args) => new Promise((resolve) => {
setTimeout(() => { resolve(...args); }, duration);
});
export default delayPromise;
@flekschas
flekschas / instructions.md
Last active Jul 5, 2018
Install iPython Widget in Jupyter Notebook and JupyterLab
View instructions.md

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 / rao-2014-gm12878-chr4-arrowhead-tads.csv
Created Jun 18, 2018
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.
View rao-2014-gm12878-chr4-arrowhead-tads.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 17 columns, instead of 2. in line 8.
chrom1,start1,end1,strand1,chrom2,start2,end2,strand2,dataset,zoomOutLevel,server,coords,corner-score,U-var,L-var,U-sign,L-sign
4,69285000,70075000,+,4,69285000,70075000,+,CQMd6V_cRw6iCI_-Unl3PQ,0,//higlass.io,hg19,0.098279,0.20712,0.43713,0.4001,0.40554
4,18680000,20260000,+,4,18680000,20260000,+,CQMd6V_cRw6iCI_-Unl3PQ,0,//higlass.io,hg19,0.58392,0.31563,0.32759,0.5282,0.42433
4,42985000,44635000,+,4,42985000,44635000,+,CQMd6V_cRw6iCI_-Unl3PQ,0,//higlass.io,hg19,0.71638,0.29186,0.32687,0.61341,0.53275
4,60060000,60985000,+,4,60060000,60985000,+,CQMd6V_cRw6iCI_-Unl3PQ,0,//higlass.io,hg19,0.60764,0.29093,0.28665,0.41713,0.40194
4,8640000,9145000,+,4,8640000,9145000,+,CQMd6V_cRw6iCI_-Unl3PQ,0,//higlass.io,hg19,0.80964,0.2152,0.33994,0.47216,0.60157
4,22960000,24440000,+,4,22960000,24440000,+,CQMd6V_cRw6iCI_-Unl3PQ,0,//higlass.io,hg19,0.6919,0.25365,0.22566,0.43577,0.53228
4,125265000,126205000,+,4,125265000,126205000,+,CQMd6V_cRw6iCI_-Unl3PQ,0,//higlass.io,hg19,0.96028,0.23641,0.23654,0.47578,0.55353
4,12099000
@flekschas
flekschas / data-visualization-type-catalogs.md
Created May 14, 2018
Data Visualization Type Catalogs
View data-visualization-type-catalogs.md
@flekschas
flekschas / rao-2014-gm12878-template
Last active Jun 17, 2018
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…
View rao-2014-gm12878-template
{
"fgm": {
"fragmentsServer": "//higlass.io/api/v1/",
"fragmentsPrecision": 2,
"fragmentsDims": 60,
"fragmentsPadding": 50,
"fragmentsBaseRes": 1000,
"fragmentsPercentile": 99,
"fragmentsIgnoreDiags": 1,
"fragments": [
@flekschas
flekschas / rao-2014-gm12878-mbol-1kb-mres-chr4-tads.json
Last active Jun 17, 2018
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.
View rao-2014-gm12878-mbol-1kb-mres-chr4-tads.json
{
"fgm": {
"fragmentsServer": "//higlass.io/api/v1/",
"fragmentsPrecision": 2,
"fragmentsDims": 60,
"fragmentsPadding": 50,
"fragmentsBaseRes": 1000,
"fragmentsPercentile": 99,
"fragmentsIgnoreDiags": 1,
"fragments": [
@flekschas
flekschas / rao-2014-gm12878-vs-k562-mbol-1kb-mres-telomeres.json
Last active Jun 18, 2018
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.
View rao-2014-gm12878-vs-k562-mbol-1kb-mres-telomeres.json
{
"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"],
["1", 0, 1, "coding", "2", 0, 1, "coding", "CQMd6V_cRw6iCI_-Unl3PQ", 6, "GM12878"],
You can’t perform that action at this time.