Skip to content

Instantly share code, notes, and snippets.

View alexpreynolds's full-sized avatar
👋
Hello

Alex Reynolds alexpreynolds

👋
Hello
  • Altius Institute for Biomedical Sciences
  • Seattle, WA USA
View GitHub Profile
@alexpreynolds
alexpreynolds / README.md
Created February 5, 2024 08:28 — forked from manzt/README.md
minimal higlass + vite

minimal higlass vite

pnpm install
pnpm dev
@alexpreynolds
alexpreynolds / example.bed
Created October 25, 2022 08:15
Example of a BED file to bring into index.html
chr7 5563000 5573000 TxFlnk 10.26175 +
chr17 39843800 39853800 TxFlnk 10.16751 +
chr6 32935400 32945400 TxFlnk 10.10112 +
chr22 39915200 39925200 TxFlnk 10.02993 +
chr17 79475800 79485800 TxFlnk 9.96371 +
chr11 65264200 65274200 TxFlnk 9.72111 +
chr19 3977800 3987800 TxFlnk 9.71104 +
chr12 56551000 56561000 TxFlnk 9.69233 +
chr1 234739400 234749400 TxFlnk 9.66319 +
chr20 42085400 42095400 TxFlnk 9.66160 +
@alexpreynolds
alexpreynolds / index.html
Created October 25, 2022 08:12
Client-side BED file upload demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Client-side BED file upload test</title>
</head>
@alexpreynolds
alexpreynolds / app.js
Created October 25, 2022 08:02
Basic local web server running on port 3000
const PORT_NUMBER = 3000;
// Requiring express for routing
const express = require('express');
// Creating app from express
const app = express();
// Requiring in-built file system
const fs = require('fs');
@alexpreynolds
alexpreynolds / blog.pl
Created August 23, 2022 21:29
Homebrew blog: blog.pl
#!/usr/bin/perl -w
use strict;
# Utility to help format my notes, progress, results etc in atomic chunks,
# so they can be organized by project, data, technology, "todo" lists, etc.
if (@ARGV < 1) {
die " Usage: $0 <new | parse> \n";
# Hidden optional arguments, not tested lately: [tag-list or +/-days]\n";
}
@alexpreynolds
alexpreynolds / blog0.css
Created August 23, 2022 21:27
Homebrew blog: blog0.css
p.todo { color:red; margin:0; padding:0; font-size:0.8em; }
p.done { color:green; margin:0; padding:0; font-size:0.7em; }
p.info { color:gray; margin:0; padding:0; font-size:0.8em; }
p.tags { color:gray; margin:0; padding:0; font-size:0.7em; }
p.cwd{ color:gray; margin:0; padding:0; font-size:0.8em; }
p.src { color:gray; margin:0; padding:0; font-size:0.8em; }
p.subject { color:black; margin:0; padding:0; font-size:1.5em; font-weight:bolder; }
.novel { color:green; font-weight:bolder; }
.xfac { color:#B80000; font-weight:bolder; }
.jaspar { color:#3399FF; font-weight:bolder; }
@alexpreynolds
alexpreynolds / .textblogrc
Created August 23, 2022 21:25
Homebrew blog: .textblogrc
weblocal /home/areynolds/public_html
webroot /~areynolds
blogdir blog
@alexpreynolds
alexpreynolds / split_scores_by_chr.py
Created July 15, 2022 06:51
Split scores file by chromosome
#!/usr/bin/env python
import gzip
ASSEMBLY = "hg38"
chromosome_sizes = { "hg38" :
[
{
"name": 1,
"size": 248956422
@alexpreynolds
alexpreynolds / aggregate_scores.py
Created July 15, 2022 06:49
Aggregation of epilogos score data per Hilbert curve order
#!/usr/bin/env python
import sys
import math
import pandas as pd
import numpy as np
from scipy import stats
import json
from json import JSONEncoder
import zipfile
@alexpreynolds
alexpreynolds / crop_and_stitch.py
Created July 13, 2022 20:12
Make a montage of cropped data browser snapshots
#!/usr/bin/env python
import subprocess
import sys
from os import listdir
from os.path import isfile, join
import time
# image, crop dimensions
img_dir = sys.argv[1]