Skip to content

Instantly share code, notes, and snippets.

View audy's full-sized avatar

Austin Richardson audy

View GitHub Profile
This is Illumina's Quality scores in ascending order:
B - The Worst
C
D
E
F
G
H
I
while($line = <DATA>)
{
if($line =~ /^>/)
{
$go = 0;
chomp $line;
chop $line;
$line =~ s/^>//;
if (exists $heads{"$line"}) {
print OUT ">$line\n";
# use 24-hour time format!
import time, os, sys
wh, wm = [ int(i) for i in sys.argv[1].split(':') ]
while True:
hour, minute = list(time.localtime())[3:5]
if hour >= wh and minute >= wm:
break # Snap!
from googlevoice import Voice
from googlevoice.util import input
voice = Voice()
voice.login(email='[email protected]', passwd='yourpasswrd')
voice.send_sms('123-456-7890', 'DONE!')
@audy
audy / matrix.py
Created October 28, 2010 22:47
a cute little matrix object
class matrix(list):
""" A cute little matrix object """
def __init__(self, x, y):
""" initialize """
[ self.append([0]*x) for i in range(y) ]
def __repr__(self):
""" niceprint """
return '\n'.join([ ' '.join([str(j) for j in i]) for i in self ])
@audy
audy / needlemanwunsch.py
Created October 28, 2010 23:24
I seem to need this from time to time. It isn't very efficient but it works.
def nw(a, b):
""" Returns Levenstein distance of two strings using NW """
a = ' ' + a
b = ' ' + b
class matrix(list):
""" A cute little matrix object """
def __init__(self, x, y):
""" initialize """
[ self.append([0]*x) for i in range(y) ]
@audy
audy / dataset.fa
Created October 29, 2010 00:24
putting this here in case my house catches on fire.
>sp|P16250|HIS4_STRCO Phosphoribosyl isomerase A OS=Streptomyces coelicolor GN=priA PE=1 SV=1
MSKLELLPAVDVRDGQAVRLVHGESGTETSYGSPLEAALAWQRSGAEWLHLVDLDAAFGT
GDNRALIAEVAQAMDIKVELSGGIRDDDTLAAALATGCTRVNLGTAALETPEWVAKVIAE
HGDKIAVGLDVRGTTLRGRGWTRDGGDLYETLDRLNKEGCARYVVTDIAKDGTLQGPNLE
LLKNVCAATDRPVVASGGVSSLDDLRAIAGLVPAGVEGAIVGKALYAKAFTLEEALEATS
>sp|Q9WYG7|PYRF_THEMA Orotidine 5'-phosphate decarboxylase OS=Thermotoga maritima GN=pyrF PE=1 SV=1
MTPVLSLDMEDPIRFIDENGSFEVVKVGHNLAIHGKKIFDELAKRNLKIILDLKFCDIPS
TVERSIKSWDHPAIIGFTVHSCAGYESVERALSATDKHVFVVVKLTSMEGSLEDYMDRIE
KLNKLGCDFVLPGPWAKALREKIKGKILVPGIRMEVKADDQKDVVTLEEMKGIANFAVLG
REIYLSENPREKIKRIKEMRL
@audy
audy / velvet.qsub.sh
Created November 3, 2010 18:29
qsub script for running velvet on SGE cluster
#!/bin/sh
#$ -N velvet
#$ -m e
#$ -e sge_velvet.err
#$ -o sge_velvet.out
#$ -M [email protected]
#$ -q all.q
#$ -l mem_free=4G
@audy
audy / ndimensionalvector.py
Created November 3, 2010 21:11
an n dimensional vector
import sys
import math
class Vector(object):
" A vector "
def __init__(self, *args):
self.dimensions = ( i for i in args )
@property
def length(self):
@audy
audy / config.log
Created November 8, 2010 17:19
when I tried to install R with homebrew...
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by R configure 2.11.1, which was
generated by GNU Autoconf 2.65. Invocation command line was
$ ./configure --prefix=/usr/local/Cellar/r/2.11.1 --with-aqua --enable-R-framework --with-lapack
## --------- ##
## Platform. ##