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-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-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-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-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 / 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 / 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 / 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 / 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 / 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