Skip to content

Instantly share code, notes, and snippets.

View jdblischak's full-sized avatar

John Blischak jdblischak

View GitHub Profile
@jdblischak
jdblischak / README.md
Last active January 29, 2025 23:15
rnaseq-de-tutorial

Differential expression analysis with edgeR

This is a tutorial I have presented for the class Genomics and Systems Biology at the University of Chicago. In this course the students learn about study design, normalization, and statistical testing for genomic studies. This is meant to introduce them to how these ideas are implemented in practice. The specific example is a differential expression analysis with edgeR starting with a table of counts and ending with a list of differentially expressed genes.

Past versions:

@jdblischak
jdblischak / README.md
Last active May 29, 2018 22:08
snakemake_vmem_usage

Testing Snakemake virtual memory usage

John Blischak 2014-05-14

Multiple users have observed that submitting jobs via Snakemake requires much more memory than is necessary to run the command (e.g. mailing list post, [Bitbucket issue][issue]).

@jdblischak
jdblischak / rename.py
Created September 2, 2014 18:36
Quick example of renaming files in nested directory structure
# Renames all files using name of directory.
# e.g. sample_name_1/s_1_sequence.txt.gz -> sample_name_1_s_1_sequence.txt.gz
import glob
import shutil
filepaths = glob.glob("sample_name_*/s_*_sequence.txt.gz")
new_names = [x.replace("/", "_") for x in filepaths]
[shutil.copyfile(x[0], x[1]) for x in zip(filepaths, new_names)]
@jdblischak
jdblischak / batch-install.sh
Last active August 29, 2015 14:23
Testing pysam installation with Python3
#!/bin/bash
for VERSION in 3.3.6 3.4.0 3.4.1 3.4.2 3.4.3
do
bash install-python.sh $VERSION
bash install-pysam.sh $VERSION
done
@jdblischak
jdblischak / README.md
Last active March 29, 2019 02:40
kallisto vs. Subread for yeast RNA-seq analysis

Comparing speed for yeast RNA-seq analysis - kallisto vs. Subread

Introduction

[kallisto][] is a new method for processing RNA-seq data. By pseudoaligning reads to a transcriptome instead of aligning reads to a genome, the quantification step is much faster. While the computational speedup will be huge for projects with many samples and/or with organisms with large genomes, I was curious how much time would be saved using [kallisto][] on a small RNA-seq project for an organism with a smaller genome. To perform this comparison, I downloaded 6 fastq files from a recent yeast RNA-seq study on GEO. I chose [Subread][subread] as the comparison method because it performs read alignment but is optimized for quickly obtaining gene counts (it soft clips reads instead of trying to map exact exon-exon boundaries).

@jdblischak
jdblischak / build-r.sh
Created December 1, 2016 16:10
Install local copy of R from source
#!/bin/bash
# Install local copy of R from source.
# To run:
# bash build-r.sh >& log.txt
# Version of R to install (must be part of the R 3.0 series)
VERSION=3.3.2
# Directory to install R. If not already present, creates bin, lib and share
@jdblischak
jdblischak / Makefile
Last active February 10, 2025 18:06
Hide supplement but retain cross-referencing with LaTeX
NAME := main
all: $(NAME).pdf
%.pdf: %.tex
sed -i s/'\\includeonly'/'%\\includeonly'/ $(NAME).tex
pdflatex -shell-escape $(NAME)
# Insert additional calls to pdflatex or bibtex here,
# depending on the complexity of your document
@jdblischak
jdblischak / hgen-473-rna-seq.R
Last active November 5, 2024 13:51
RNA-seq analysis with R/Bioconductor
# HGEN 473 - Genomics
# Spring 2017
# Tuesday, May 9 & Thursday, May 11
#
# RNA-seq analysis with R/Bioconductor
#
# John Blischak
#
# Last updated: 2020-04-08
@jdblischak
jdblischak / conda-forge-cran.R
Last active October 31, 2017 22:02
Helper script to identify conda-forge R packages that have more recent versions released on CRAN
#!/usr/bin/env conda-execute
# Helper script to identify conda-forge R packages that have more recent
# versions released on CRAN.
#
# Usage:
#
# conda execute conda-forge-cran.R
#
# or
@jdblischak
jdblischak / gh-pull-request.R
Created November 2, 2017 21:06
Create PR with R
#!/usr/bin/env Rscript
# This example code implements the fork and pull request workflow for GitHub
# directly from R using the packages gh and git2r. gh provides an R interface to
# the GitHub REST API v3, and git2r provides an R interface to libgit2. It
# submits the Pull Request to the practice repository Spoon-Knife.
#
# The following sequence of steps are performed:
#
# authenticate -> fork -> clone -> branch -> edit -> add -> commit -> push ->