Skip to content

Instantly share code, notes, and snippets.

View slhogle's full-sized avatar

Shane Hogle slhogle

View GitHub Profile

Linkage Disequilibrium Calculation

This is complete taken from Ryan D on biostar: http://www.biostars.org/p/2909/#16419

It takes a region in a format like "chr2:1234-3456". If an rs number is specified after the region, it will output the R^2 for every SNP in that region with the requested SNP; otherwise, it is all-vs-all.

@slhogle
slhogle / downloadChunks.py
Created September 15, 2018 11:09 — forked from gourneau/downloadChunks.py
Download large files with Python urllib2 to a temp directory
import os
import urllib2
import math
def downloadChunks(url):
"""Helper to download large files
the only arg is a url
this file will go to a temp directory
the file will also be downloaded
in chunks and print out how much remains