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 March 7, 2026 10:19
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 / knitr-hook-output-redact.Rmd
Created February 28, 2025 20:18
A minimal example that uses a knitr output hook to redact long alphanumeric strings. Motivated by https://fosstodon.org/@sckottie/114078121814425933
---
title: "Untitled"
output: html_document
date: "2025-02-28"
---
```{r setup, include=FALSE}
# knitr output hook to redact alphanumeric strings
#
# Adapted from
@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 / twitter-unfollowing.py
Created October 14, 2021 17:48
Unfollow all Twitter accounts that aren't following you back
#!/usr/bin/env python
# Unfollow all Twitter accounts that aren't following you back
#
# Twitter API:
# https://developer.twitter.com/en/docs/twitter-api
# https://github.com/python-twitter-tools/twitter
# https://developer.twitter.com/en/portal/projects/new
#
# Authentication:
@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 ->
@jdblischak
jdblischak / description-fields-reserved.txt
Last active June 17, 2021 15:05
R's DESCRIPTION fields documented in Writing R Extensions
Additional_repositories
Author
Authors@R
Biarch
BugReports
BuildVignettes
Built
ByteCompile
Classification/ACM
Classification/ACM-2012
calc3 <- function(sets)
{
sets <- check_sets(sets)
set_lengths <- vapply(sets, length, 0)
set_order <- order(set_lengths)
sets <- sets[set_order]
set_lengths <- set_lengths[set_order]
n_sets <- length(sets)
set_names <- names(sets)
@jdblischak
jdblischak / gpl-stats.R
Created July 26, 2019 16:12
Do CRAN packages that depend on the stats package use a copyleft license?
#!/usr/bin/env Rscript
# Do CRAN packages that depend on the stats package use a copyleft license?
# https://twitter.com/cimentadaj/status/1154420408508043264
Sys.Date()
## [1] "2019-07-26"
library(stringr)
@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).