Skip to content

Instantly share code, notes, and snippets.

View stephenturner's full-sized avatar

Stephen Turner stephenturner

View GitHub Profile
# Install ggrepel package if needed
# install.packages("devtools")
# devtools::install_github("slowkow/ggrepel")
library(ggrepel)
p+geom_text_repel(data=filter(results, padj<0.05), aes(label=Gene))
# Load packages
library(dplyr)
library(ggplot2)
# Read data from the web
url = "https://gist.githubusercontent.com/stephenturner/806e31fce55a8b7175af/raw/1a507c4c3f9f1baaa3a69187223ff3d3050628d4/results.txt"
results = read.table(url, header=TRUE)
results = mutate(results, sig=ifelse(results$padj<0.05, "FDR<0.05", "Not Sig"))
@stephenturner
stephenturner / fakemicrobiome.md
Created December 22, 2015 15:05
fake microbiome paper generated with dadadodo

We harbor a broad patterns that are characteristic of immune systems have been shown to maximize energy harvest in support the diversity increases The Adaptive Immune system: the importance storage, as HIV, is effect in utero and can play a number of contracting other pathogens.

Dysenteriae some eukaryotic patient, or comes from H; sclerosis taxa and in the loss of bacteria altering virulence that take a community composition of Trichomonas cells the study of known from a host, genetics, with the microbiota human cells T cells, and the population

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 1700 A084 6537 FA09 D2CE D188 3A2A 7CDA BFE4 2C57

To claim this, I am signing this object:

pop_name geo_region maxlon minlon maxlat minlat
Ami EastAsia 121E 121.5E 24N 22.5N
Hakka EastAsia 105E 122E 35N 22N
Biaka Africa 15E 20E 5N 2N
Mbuti Africa 26E 30E 3N 0N
@stephenturner
stephenturner / expressed_or_not.R
Last active June 6, 2021 03:17
are genes "expressed?"
library(dplyr)
library(readr)
# Get data from http://dx.doi.org/10.6084/m9.figshare.1601975
browseURL("http://dx.doi.org/10.6084/m9.figshare.1601975")
countdata <- read_csv("http://files.figshare.com/2439061/GSE37704_featurecounts.csv")
head(countdata)
metadata <- read_csv("http://files.figshare.com/2439060/GSE37704_metadata.csv")
head(metadata)
# get data. requires sra toolkit http://www.ncbi.nlm.nih.gov/books/NBK158899/
prefetch SRR493366
fastq-dump --outdir . --split-files SRR493366.sra
# run sailfish
time sailfish index gencode.v21.pc_transcripts.fa -o gencode.v21.human.grch38
sailfish quant -i gencode.v21.human.grch38 -l IU \
-1 SRR493366_1.fastq -2 SRR493366_2.fastq \
-o SRR493366 -p 3 --useVBOpt -g gencode.v21.annotation.gtf
@stephenturner
stephenturner / install-gcc48-linuxbrew-centos6.md
Last active October 23, 2025 06:09
Installing gcc 4.8 and Linuxbrew on CentOS 6

Installing gcc 4.8 and Linuxbrew on CentOS 6

The GCC distributed with CentOS 6 is 4.4.7, which is pretty outdated. I'd like to use gcc 4.8+. Also, when trying to install Linuxbrew you run into a dependency loop where Homebrew's gcc depends on zlib, which depends on gcc. Here's how I solved the problem.

Note: Requires sudo privileges.

Resources:

---
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 / build-hdf5.sh
Created August 31, 2015 18:29
building hdf5 without root
# Run these lines
cd /path/to/wherever/it/should/go
wget http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.15-patch1.tar.gz
tar -zxvf hdf5-1.8.15-patch1.tar.gz
cd hdf5-1.8.15-patch1
./configure --disable-parallel --without-szlib --without-pthread --prefix=$(pwd)
make && make install
# Add this to your .bashrc
export HDF5="/path/to/wherever/it/should/go/hdf5-1.8.15-patch1"