Skip to content

Instantly share code, notes, and snippets.

View kaizhao86's full-sized avatar

Kai Zhao kaizhao86

  • Indianapolis, IN
View GitHub Profile
from PyQt4 import Qt,QtCore,QtGui
import operator,os,sys,sqlite3,time
def joinMsats(parent,conn,c,MAXGAP,MINFLANK):
c.execute("CREATE INDEX IF NOT EXISTS iML1 on msatLocations(readname)")
c.execute("CREATE INDEX IF NOT EXISTS iML2 on msatLocations(readname,start)")
parent.emit(QtCore.SIGNAL("log"),"%s Starting to join msat loci"%time.strftime('%I:%M%p'))
import Bio.SeqIO,fnmatch,gzip,itertools,math,numpy,os,re,sqlite3,subprocess,sys,tarfile,xlsxwriter
from multiprocessing import Pool #used for simple multicore processing, yeehaw!
conn = sqlite3.connect("limb-nouveau.sqlite3",check_same_thread=False);
#this allows sqlite to work in a multithreaded environment
c=conn.cursor()
PATH = "/home/zhaok/Data/20140702_limb/"
#For each of our enhancer near genes of interest, make a new table that are for orthologs in non-mouse species,
c.execute("DROP TABLE IF EXISTS enhancerOrthologs")
import Bio.SeqIO,gzip,fnmatch,itertools,math,numpy,os,re,sqlite3,subprocess,sys,tarfile,xlsxwriter
"""
This program reads in our list of known mouse enhancers (from publications), Gli3-binding sites,
and H3k27ac marks. For the k27ac marks, we merge adjacent CHIP-seq binding positions
"""
conn = sqlite3.connect("limb-nouveau.sqlite3")
#Connect to local sqlite3 database
c=conn.cursor()
@kaizhao86
kaizhao86 / DW5800GPS.md
Last active October 18, 2015 19:38
Enabling Dell Wireless 5800 (DW5800) Novatel E362 Verizon 4G PCI-E card's GPS

Use the following Hayes AT command through the diag com port:

AT$NWGPSSTART=3,1,4,250,50,255

@kaizhao86
kaizhao86 / .bashrc
Created May 5, 2015 23:35
Kai's bashrc
#saves lots of history
#Incorporates Ubuntu's default .bashrc and bash_completion (need to install separately)
PS1='\u@\h \W \$ '
stty stop undef # to unmap ctrl-s
shopt -s histappend
HISTFILESIZE=1000000
HISTSIZE=1000000
HISTCONTROL=ignoreboth
@kaizhao86
kaizhao86 / .screenrc
Created May 5, 2015 23:32
Kai's screenrc
#taken from who knows where.
# no annoying audible bell, please
vbell on
# detach on hangup
autodetach on
# don't display the copyright page
startup_message off