Skip to content

Instantly share code, notes, and snippets.

Mitchell Stanton-Cook mscook

Block or report user

Report or block mscook

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am mscook on github.
  • I am mscook (https://keybase.io/mscook) on keybase.
  • I have a public key whose fingerprint is 753D EE5F F52A 8D99 D5CE 6F9E 3250 99BF BFC2 08D4

To claim this, I am signing this object:

View RethinkDBError
015-06-18T04:20:30.719185558 0.017922s error: Error in src/arch/io/timer/timerfd_provider.cc at line 18:
2015-06-18T04:20:30.719599764 0.018326s error: Guarantee failed: [fd != -1] (errno 1 - Operation not permitted) Could not create timer
2015-06-18T04:20:30.719676100 0.018402s error: Backtrace:
2015-06-18T04:20:30.720274794 0.019002s error: Error in src/arch/io/timer/timerfd_provider.cc at line 18:
2015-06-18T04:20:30.720465822 0.019192s error: Guarantee failed: [fd != -1] (errno 1 - Operation not permitted) Could not create timer
2015-06-18T04:20:30.720554637 0.019281s error: Backtrace:
2015-06-18T04:20:30.737817554 0.036561s error: Error in src/arch/io/timer/timerfd_provider.cc at line 18:
2015-06-18T04:20:30.738007288 0.036733s error: Guarantee failed: [fd != -1] (errno 1 - Operation not permitted) Could not create timer
2015-06-18T04:20:30.738081646 0.036807s error: Backtrace:
2015-06-18T04:20:30.777285267 0.076028s error: Error in src/arch/io/timer/timerfd_provider.cc at line 18:
@mscook
mscook / counter_dec.py
Created Sep 4, 2014
counter decorator
View counter_dec.py
print 80*"="+"\nThe 'counter' decorator\n"+80*"="
def scount(wrapped):
def inner(*args, **kwargs):
inner.counter +=1
return wrapped(*args, **kwargs)
inner.counter = 0
return inner
@scount
View skipIf_dec.py
##############################################################################
#
# Handling arguments
#
# This is a wrapt decorator equivalent to Colton Meyers' skipIf presented
# from about the 15 minute mark in his PyCon 2014 talk
#
##############################################################################
import wrapt
View gist:ef7499fc9d2138f17c7f
| => brew list
ansible blast cd-hit freetype glibmm harfbuzz intltool libpng open-mpi pkg-config ray tmux
aspell boost cloog gcc gmp hicolor-icon-theme isl libsigc++ openssl popt readline vcftools
atk boost-build cmake gdbm gobject-introspection icu4c jpeg libtiff pango python samtools velvet
atkmm bwa coreutils gdk-pixbuf gsl igv libevent libyaml pangomm python3 spades vim
autoenv cairo ctags gettext gtk+ igvtools libffi little-cms pcre qualimap sqlite wget
bdw-gc cairomm fontconfig glib gtkmm inkscape libmpc mpfr pixman quast sratoolkit xz
View gist:23abcd53934f75c6239b
diff --git a/SeqFindR/blast.py b/SeqFindR/blast.py
index 62fb750..cfee667 100644
--- a/SeqFindR/blast.py
+++ b/SeqFindR/blast.py
@@ -77,6 +77,7 @@ def run_BLAST(query, database, args):
:returns: the path of the blast.xml file
"""
+ out_xml = database.split('/')[-1]+"_blast.xml"
protein = False
View d3.v2.js
(function(){if (!Date.now) Date.now = function() {
return +new Date;
};
try {
document.createElement("div").style.setProperty("opacity", 0, "");
} catch (error) {
var d3_style_prototype = CSSStyleDeclaration.prototype,
d3_style_setProperty = d3_style_prototype.setProperty;
d3_style_prototype.setProperty = function(name, value, priority) {
d3_style_setProperty.call(this, name, value + "", priority);
View data_fetcher.py
#!/usr/bin/env python
# Copyright 2014 Beatson Laboratory Licensed under the
# Educational Community License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may
# obtain a copy of the License at
#
# http://www.osedu.org/licenses/ECL-2.0
#
# Unless required by applicable law or agreed to in writing,
@mscook
mscook / q64_q33.py
Created May 12, 2014
Use seqret to go q64 --> q33
View q64_q33.py
import glob
import os
inf = glob.glob("*.gz")
for f in inf:
tmp = f.split(".gz")[0]
os.system("cp "+f+" .original/")
os.system("gunzip "+f)
os.system("seqret fastq-illumina::"+tmp+" fastq::"+tmp+".33")
@mscook
mscook / get_PHRED.py
Created May 12, 2014
Gives an idea on what PHRED encoding
View get_PHRED.py
import glob
import os
inf = glob.glob("*.gz")
rlen = 76.0
for f in inf:
tmp = f.split(".fastq.gz")[0]
os.system("zcat "+f+" | head -n 4 | tail -n 1 > "+tmp)
with open(tmp) as fin:
You can’t perform that action at this time.