This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
import redis | |
import random | |
import pylibmc | |
import sys | |
r = redis.Redis(host = 'localhost', port = 6389) | |
mc = pylibmc.Client(['localhost:11222']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Line # Hits Time Per Hit % Time Line Contents | |
============================================================== | |
627 def expected_mutual_information(contingency, n_samples): | |
628 """Calculate the expected mutual information for two labelings.""" | |
629 25 82 3.3 0.0 R, C = contingency.shape | |
630 25 53 2.1 0.0 N = n_samples | |
631 25 1059 42.4 0.0 a = np.sum(contingency, axis=1, dtype='int') | |
632 25 932 37.3 0.0 b = np.sum(contingency, axis=0, dtype='int') | |
633 25 58 2.3 0.0 emi = 0 | |
634 1839 4005 2.2 0.0 for i in range(R): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NOTE the /Modules/ | |
./configure --prefix=/vol1/home/brentp/installed/ \ | |
--with-python-config-dir=/vol1/home/brentp/src/python/Python-2.7.2/Modules/ \ | |
--enable-pythoninterp=yes --with-features=huge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ORG=hg19 | |
USER=brentp | |
# from: http://nsaunders.wordpress.com/2011/05/18/how-to-create-a-partial-ucsc-genome-mysql-database/ | |
# create database | |
mysql -u $USER -e "CREATE DATABASE $ORG"; | |
mkdir -p ucsc-data/$ORG | |
cd ucsc-data/$ORG | |
for table in knownGene refGene ensGene kgXref chromInfo cpgIslandExt cytoBand |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
%prog [options] files | |
""" | |
import optparse | |
import sys | |
import gzip | |
from itertools import izip | |
def nopen(f, mode="rb"): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function clone(object) | |
local dict = {} | |
local function clone(object) | |
if (type(object) ~= "table") then | |
return object | |
elseif (dict[object]) then | |
return dict[object] | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install libtool | |
git clone git://dnaa.git.sourceforge.net/gitroot/dnaa/dnaa dnaa-git | |
cd dnaa-git | |
# bfast required. see above gist | |
cp -r ../bfast-git ./bfast | |
# samtools require. see above gist. | |
cp -r ../samtools-svn/ ./samtools | |
sh autogen.sh && ./configure && make && sudo make install |
NewerOlder