Skip to content

Instantly share code, notes, and snippets.

View roryk's full-sized avatar
😷

Rory Kirchner roryk

😷
View GitHub Profile
@roryk
roryk / gist:10662773
Created April 14, 2014 16:23
libmaus 0.0.104 OSX patch
diff -rupN libmaus-0.0.104-release-20140221093548/src/libmaus/aio/PosixFdInput.hpp new/src/libmaus/aio/PosixFdInput.hpp
--- libmaus-0.0.104-release-20140221093548/src/libmaus/aio/PosixFdInput.hpp 2014-02-21 04:36:04.000000000 -0500
+++ new/src/libmaus/aio/PosixFdInput.hpp 2014-04-14 12:21:04.000000000 -0400
@@ -46,7 +46,10 @@ namespace libmaus
public:
static int getDefaultFlags()
{
+ #ifndef __APPLE__
return O_RDONLY|O_NOATIME|O_LARGEFILE;
+ #endif
diff -rupN libmaus-0.0.104-release-20140221093548/src/libmaus/aio/PosixFdInput.hpp new/src/libmaus/aio/PosixFdInput.hpp
--- libmaus-0.0.104-release-20140221093548/src/libmaus/aio/PosixFdInput.hpp 2014-02-21 04:36:04.000000000 -0500
+++ new/src/libmaus/aio/PosixFdInput.hpp 2014-04-14 12:21:04.000000000 -0400
@@ -46,7 +46,10 @@ namespace libmaus
public:
static int getDefaultFlags()
{
+ #ifndef __APPLE__
return O_RDONLY|O_NOATIME|O_LARGEFILE;
+ #endif
import gffutils
import os
gtf = "path/to/your/gtf/file"
def get_gtf_db(gtf, in_memory=False):
db_file = ":memory:" if in_memory else gtf + ".db"
if in_memory or not os.path.exists(db_file):
db = gffutils.create_db(gtf, dbfn=db_file)
if in_memory:

Keybase proof

I hereby claim:

  • I am roryk on github.
  • I am roryk (https://keybase.io/roryk) on keybase.
  • I have a public key whose fingerprint is 7C28 113B F748 6132 2854 81AD 06E8 EF6A D433 A483

To claim this, I am signing this object:

@roryk
roryk / gist:3aade4cc66af6db93496
Created October 27, 2014 21:15
STAR error 2.4.0e with --quantMode
STAR version=STAR_2.4.0e
STAR compilation time,server,dir=Fri Oct 24 10:43:53 EDT 2014 verona.cshl.edu:/sonas-hs/gingeras/nlsas_norepl/user/dobin/STAR/STAR.sandbox/source
##### DEFAULT parameters:
versionSTAR 20201
versionGenome 20101 20200
parametersFiles -
runMode alignReads
runThreadN 1
genomeDir ./GenomeDir/
genomeLoad NoSharedMemory
@roryk
roryk / gist:16b3240c12f09d6c9619
Created December 3, 2014 18:54
commander.txt
MOD_NAME=Commander's Choice - LW
AUTHOR=Peasly Wellbott
DESCRIPTION=Choose the class of your Squaddies! When being prompted to pick a Squaddie's first skill, the "Cycle Soldier" buttons on the bottom of the screen will instead cycle the soldier's class! Does not affect MECs or any soldier who has locked in their specialty, but should work for reward soldiers and special soldiers.
Version: 1.0
Compatible with XCOM Long War versions:
- All hopefully
>chrM
GTTAATGTAGCTTAATAACAAAGCAAAGCACTGAAAATGCTTAGATGGAT
AATTGTATCCCATAAACACAAAGGTTTGGTCCTGGCCTTATAATTAATTA
GAGGTAAAATTACACATGCAAACCTCCATAGACCGGTGTAAAATCCCTTA
AACATTTACTTAAAATTTAAGGAGAGGGTATCAAGCACATTAAAATAGCT
TAAGACACCTTGCCTAGCCACACCCCCACGGGACTCAGCAGTGATAAATA
TTAAGCAATAAACGAAAGTTTGACTAAGTTATACCTCTTAGGGTTGGTAA
ATTTCGTGCCAGCCACCGCGGTCATACGATTAACCCAAACTAATTATCTT
CGGCGTAAAACGTGTCAACTATAAATAAATAAATAGAATTAAAATCCAAC
TTATATGTGAAAATTCATTGTTAGGACCTAAACTCAATAACGAAAGTAAT
@roryk
roryk / gist:cb554de6b096592fd2d8
Last active August 29, 2015 14:19
example coverage flagging
import numpy
import scipy.stats as stats
def outlier_resistant(coverage):
median = float(numpy.median(coverage))
deviations = [abs(x - median) for x in coverage]
# median absolute deviation estimator of the standard deviation
mad = 1.4826 * float(numpy.median(deviations))
return int(median), int(mad)
@roryk
roryk / gist:fda5c55fb732ea06a1b5
Created September 21, 2015 04:03
sparsehash-build-issues
[ 51%] Performing build step for 'libsparsehash'
cd /tmp/sailfish20150920-18016-i304l8/sailfish-0.7.4/external/sparsehash-sparsehash-2.0.2 && /Applications/Xcode.app/Contents/Developer/usr/bin/make
[ -d src/sparsehash/internal ] || mkdir -p src/sparsehash/internal
echo "/*" > src/sparsehash/internal/_sparsehash_config
echo " * NOTE: This file is for internal use only." >> src/sparsehash/internal/_sparsehash_config
echo " * Do not use these #defines in your own program!" >> src/sparsehash/internal/_sparsehash_config
echo " */" >> src/sparsehash/internal/_sparsehash_config
awk '{prevline=currline; currline=$0;} \
/^#/ {in_second_file = 1;} \
!in_second_file {if (currline !~ /^ *$/) {inc[currline]=0}}; \
@roryk
roryk / gist:4291793
Created December 15, 2012 06:45
Steps through elisp to find an error.
; from http://newsgroups.derkeiler.com/Archive/Comp/comp.emacs/2005-12/msg00064.html saved for posterity
(defalias 'puffer-lesen 'eval-buffer-or-region-step-by-step)
(defun eval-buffer-or-region-step-by-step ()
"Stepps through region if activated, otherwise takes the whole buffer
evaluating last-sexp and messaging point. As `eval-last-sexp' exits
encountering an error, you may easily pick the last point.
Attention: Commands changing the current-buffer as `find-file' will
derail the check."
(interactive)