Skip to content

Instantly share code, notes, and snippets.

View stephenturner's full-sized avatar

Stephen Turner stephenturner

View GitHub Profile
@stephenturner
stephenturner / thedress_heatmap.r
Created February 27, 2015 20:27
the dress heatmap
library(NMF)
set.seed(42)
m1 <- matrix(rnorm(20000*5, mean=0), nrow=5)
m2 <- matrix(rnorm(20000*5, mean=1.2), nrow=5)
m <- cbind(t(m1), t(m2))
myiqr <- apply(m, 1, var, na.rm=T)
mostvar <- order(myiqr, decreasing=T)[1:20]
hmat <- m[mostvar, ]
aheatmap(hmat, col=colorRampPalette(c("#806E46", "#968264", "#8794BE", "#838CC3", "#656581"))(100), labRow=NA, labCol=NA, scale="row")

Keybase proof

I hereby claim:

  • I am stephenturner on github.
  • I am turner (https://keybase.io/turner) on keybase.
  • I have a public key whose fingerprint is C3FF 1534 9B0A AA92 67B0 7461 32DB A6EC 08E5 BE05

To claim this, I am signing this object:

install.packages("dynamicTreeCut")
install.packages("RPMM")
install.packages("sqldf")
install.packages("parallel")
install.packages("data.table")
install.packages("shiny")
install.packages("ggplot2")
install.packages("plyr")
install.packages("dplyr")
install.packages("tidyr")
---
title: "Untitled"
author: "Stephen Turner"
date: "September 14, 2015"
output: html_document
---
# Introduction
Here's some introductory text in the document that I'm actually compiling.
@stephenturner
stephenturner / run_step0.pl
Created November 12, 2010 19:48
run_step0.pl
#!/usr/bin/env perl
# runs step 0 on all chromosomes
# produces the group files and the tarballed
# sets for running step1 and step 2 on
use strict;
# create and store distributions for the top 25 models from permutation testing
# for both the model p-value and interaction p-value
@stephenturner
stephenturner / run_step1.pl
Created November 12, 2010 19:57
run_step1.pl
#!/usr/bin/env perl
# runs step 1 on all chromosomes
# produces the input for step 2 results
# submits a pbs job for every chromosome specified
use strict;
# create and store distributions for the top 25 models from permutation testing
# for both the model p-value and interaction p-value
@stephenturner
stephenturner / impute_1000genomes.pbs
Created November 12, 2010 20:01
impute_1000genomes.pbs
#!/bin/bash
#PBS -M youremailaddress@domain.com
#PBS -m abe
#PBS -S /bin/bash
#PBS -l nodes=1:ppn=1
#PBS -W x=NODESET:FIRSTOF:FEATURE:opteron:x86
#PBS -l walltime=96:00:00
#PBS -l cput=96:00:00
#PBS -l pmem=3000mb
@stephenturner
stephenturner / impute_step1.sh
Created November 12, 2010 20:03
impute_step1.sh
#!/bin/bash
#
# Jacki Buros
# Step 1 impute
# check params
if [ -z $prefix ]
then
echo "$(date) | param 'prefix' not defined. Exiting."
return $ERR_DELETE_FILES
@stephenturner
stephenturner / impute_step0.sh
Created November 12, 2010 19:51
impute_step0.sh
#!/bin/bash
# For running step0 of the imputation procedure
# Splits files and creates random subset for step 1 of imputation
# adapted from original script written by Jacki Buros
# arguments are
# 1) plink bed source file
@stephenturner
stephenturner / impute_1000genomes_himem.pbs
Created November 12, 2010 20:00
impute_1000genomes_himem.pbs
#!/bin/bash
#PBS -M youremailaddress@domain.com
#PBS -m abe
#PBS -S /bin/bash
#PBS -l nodes=1:ppn=1
#PBS -W x=NODESET:FIRSTOF:FEATURE:opteron:x86
#PBS -l walltime=96:00:00
#PBS -l cput=96:00:00
#PBS -l pmem=8000mb