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-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 / 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 / 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": [
@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],
[{
"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 / 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
@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