Skip to content

Instantly share code, notes, and snippets.

View standage's full-sized avatar

Daniel Standage standage

View GitHub Profile
@joyrexus
joyrexus / README.md
Last active February 24, 2024 15:16
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@Lenbok
Lenbok / na12878-trio.ped
Created March 8, 2017 21:04
Example ped file for NA12878 trio.
#PED format pedigree
#
#fam-id/ind-id/pat-id/mat-id: 0=unknown
#sex: 1=male; 2=female; 0=unknown
#phenotype: -9=missing, 0=missing; 1=unaffected; 2=affected
#
#fam-id ind-id pat-id mat-id sex phen
1 NA12878 NA12891 NA12892 2 0
1 NA12891 0 0 1 0
1 NA12892 0 0 2 0
@jtleek
jtleek / jhudsl.R
Created December 19, 2016 17:03
making the jhu dsl gif
library(png)
library(ggforce)
library(animation)
library(tweenr)
jhu_png = readPNG("jhudsl.png")
x = rep(1:510,each=555)
y = rep(1:555,510)
val = jhu_png[,,3]
val = round(val)
@davedelong
davedelong / autologin.sh
Last active August 10, 2016 13:03
Programmatically switch to another user
#!/bin/bash
# A script to automatically switch to another user in macOS
# Invoke like this: `autologin.sh {user} {password}`
uid=`id -u $1`
/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -switchToUserID "$uid"
osascript <<EOD
@hadley
hadley / ds-training.md
Created March 13, 2015 18:49
My advise on what you need to do to become a data scientist...

If you were to give recommendations to your "little brother/sister" on things that they need to do to become a data scientist, what would those things be?

I think the "Data Science Venn Diagram" (http://drewconway.com/zia/2013/3/26/the-data-science-venn-diagram) is a great place to start. You need three things to be a good data scientist:

  • Statistical knowledge
  • Programming/hacking skills
  • Domain expertise

Statistical knowledge

@arq5x
arq5x / daniel.sh
Last active August 29, 2015 14:01
Merging adjacent BEDGRAPH intervals with coverage >= mincov
# assumes that the BEDGRAPH is the output of the bedtools genomecov tool using the -bga option.
$ cat foo.bedg
chr1 0 10 5
chr1 10 20 5
chr1 20 30 10
chr1 30 40 11
chr1 40 50 9
chr1 50 60 10
chr1 60 70 11
chr1 70 80 15
@shrayasr
shrayasr / OLD_OLD_OLD_install_tmux_osx_no_brew.html
Last active July 17, 2023 14:45
[OBSOLETE] Install tmux on OSX WITHOUT brew
# Create a directory
mkdir ~/tmux-install
cd ~/tmux-install
# Get the files
curl -OL http://downloads.sourceforge.net/tmux/tmux-1.5.tar.gz
curl -OL http://downloads.sourceforge.net/project/levent/libevent/libevent-2.0/libevent-2.0.16-stable.tar.gz
# Extract them
tar xzf tmux-1.5.tar.gz
@rgbkrk
rgbkrk / hubdecrypt.sh
Last active April 6, 2022 02:55
Encrypt a (short) file using someone's public key from github
#!/usr/bin/env bash
# HubCrypt
# ========
#
# Decrypt a file encrypted using hubencrypt (ok, it's just openssl + rsautl +
# your SSH keys). It needs the private key that matches your last public key
# listed at github.com/<user>.keys
#
@nathanhaigh
nathanhaigh / interleave_fastq.sh
Last active March 28, 2022 09:11
Interleave reads from 2 FASTQ files and output to STDOUT.
#!/bin/bash
# Usage: interleave_fastq.sh f.fastq r.fastq > interleaved.fastq
#
# Interleaves the reads of two FASTQ files specified on the
# command line and outputs a single FASTQ file of STDOUT.
#
# Can interleave 100 million paired reads (200 million total
# reads; a 2 x 22Gbyte files), in memory (/dev/shm), in 6m54s (414s)
#
# Latest code: https://gist.github.com/4544979
@nathanhaigh
nathanhaigh / deinterleave_fastq.sh
Last active May 6, 2024 06:38
deinterleave FASTQ files
#!/bin/bash
# Usage: deinterleave_fastq.sh < interleaved.fastq f.fastq r.fastq [compress]
#
# Deinterleaves a FASTQ file of paired reads into two FASTQ
# files specified on the command line. Optionally GZip compresses the output
# FASTQ files using pigz if the 3rd command line argument is the word "compress"
#
# Can deinterleave 100 million paired reads (200 million total
# reads; a 43Gbyte file), in memory (/dev/shm), in 4m15s (255s)
#