Skip to content

Instantly share code, notes, and snippets.

View andrewgiessel's full-sized avatar
🧬
hackhackhack

andrew giessel andrewgiessel

🧬
hackhackhack
View GitHub Profile
on open dropped_dir
tell application "Terminal"
set dirname to do shell script "perl -e \"print quotemeta ('" & POSIX path of item 1 of dropped_dir & "');\""
do script "cd " & dirname & "; ipython notebook --pylab; exit"
end tell
end open
# Load the BSgenome package and download the hg19 reference sequence
# For documentation see http://www.bioconductor.org/packages/release/bioc/html/BSgenome.html
source("http://www.bioconductor.org/biocLite.R")
biocLite("BSgenome")
biocLite("BSgenome.Hsapiens.UCSC.hg19") #installs the human genome (~850 MB download).
library('BSgenome.Hsapiens.UCSC.hg19')
# Function to pull flanking sequence. Defaults to +/- 10 bp
getflank <- function(position, alleles="[N/N]", chr="chr12", offset=10) {
PREFIX=$HOME
VERSION=1.2.3
# Install Protocol Buffers
wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.bz2
tar -xf protobuf-2.4.1.tar.bz2
cd protobuf-2.4.1
./configure --prefix=$PREFIX
make
make install
@andrewgiessel
andrewgiessel / disconnect.rb
Created September 13, 2012 14:50 — forked from gljeremy/disconnect.rb
bulk-export run data from Garmin Connect
#!/usr/bin/env ruby
## disconnect
# ./disconnect.rb -u yourusername [-o /your/path] [-p yourhttpproxyserver]
#
# This is a command-line utility for the bulk-downloading of run data from
# the connect.garmin.com web application, which has lackluster export
# capabilities.
#
@andrewgiessel
andrewgiessel / archive_tweets.py
Created July 31, 2012 21:39 — forked from tmcw/archive_tweets.py
Archive Tweets
import requests, os, glob, json
you = 'giessel'
data = 'tweets'
try: os.mkdir(data)
except Exception: pass
def run(max_id = False):
already = glob.glob("%s/*.json" % data)
@andrewgiessel
andrewgiessel / Python Install with Macports
Created October 30, 2011 16:30 — forked from alexbw/PythonInstallwithMacports
Python installation w/ MacPorts
# Install Macports
# We'll install a relatively high-level package first, with a lot of dependencies,
# so that we pick up everything along the way
# Chaco is an enthought plotting package that'll
sudo port install py26-chaco
sudo port select python python26
sudo port install py26-ipython