Skip to content

Instantly share code, notes, and snippets.

View roryk's full-sized avatar
😷

Rory Kirchner roryk

😷
View GitHub Profile
@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)
>chrM
GTTAATGTAGCTTAATAACAAAGCAAAGCACTGAAAATGCTTAGATGGAT
AATTGTATCCCATAAACACAAAGGTTTGGTCCTGGCCTTATAATTAATTA
GAGGTAAAATTACACATGCAAACCTCCATAGACCGGTGTAAAATCCCTTA
AACATTTACTTAAAATTTAAGGAGAGGGTATCAAGCACATTAAAATAGCT
TAAGACACCTTGCCTAGCCACACCCCCACGGGACTCAGCAGTGATAAATA
TTAAGCAATAAACGAAAGTTTGACTAAGTTATACCTCTTAGGGTTGGTAA
ATTTCGTGCCAGCCACCGCGGTCATACGATTAACCCAAACTAATTATCTT
CGGCGTAAAACGTGTCAACTATAAATAAATAAATAGAATTAAAATCCAAC
TTATATGTGAAAATTCATTGTTAGGACCTAAACTCAATAACGAAAGTAAT
@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
@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

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:

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:
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
@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