Skip to content

Library of useful functions I like to use with my differential expression pipelines.

Notifications You must be signed in to change notification settings

kmuench/DESeqAid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DESeqAid

Functions to make my DESeq2 life easier

Introduction | Usage | Examples | Reflections

Introduction

During my PhD, I did a fair amount of RNA-Seq analysis, often using DESeq2. I created this library to speed my mRNA-Seq analysis and make it slightly more modular. These are mostly designed to make my life slightly easier, e.g. by bunding my visualization settings into a single function, or processing the DESeq output in the way I like.

I rely on this library for my 16p paper code.

Many thanks to Hilary Parker for enriching the community by providing this easy-to-read guide to writing R packages.

Data exploration

  • checkSVs(): explore whether your surrogate variables (from SVA) correlated with known sources of variance
  • distPCA(): plots Principal Component Analysis
  • plotPCA_pickPCs(): plots Principal Component Analysis using the DESeq2 method, but lets you pick which principal components to visualize
  • sampSimilarityHeatmap(): heatmap of sample correlation

Functions for cleaning up the DESeq output a little

  • deseq_coef(): DESeq output given a DESeq coefficient
  • deseq_contrasts(): DESeq output given a contrast specified in design matrix
  • add_lfcShrink(): adds shrunken log FCs to DESeq results table
  • addHUGOnames(): if you did DE using ensembl genes, adds a column of corresponding HUGO gene names

Functions for visualizing DESeq output

  • DE_heatmap(): makes a heatmap from a count table in the way I wanted at that time
  • theoBarPlot(): ordered bar plot of gene expression, named after the advisor who encouraged its development
  • fcSortBarPlot_lfcShrink(): The Theo Palmer bar plot, but using shrunken logFCs
  • heatmapSexGenes(): heatmap of sex-linked genes
  • makeVolcanoPlot(): volcano plot from DESeq output

Usage

Install

First - of course - clone the repo:

git clone https://github.com/kmuench/DESeqAid.git

In order to load this package, you'll need to install the devtools package. In R:

install.packages("devtools")
library("devtools")

Finally, in R, navigate to the same working directory as the DESeqAid dir. In R:

install("DESeqAid")

Great! Now it's installed, and if you want to load it in the future, simply add to your R script:

library("DESeqAid")

Examples

You can find example uses of this library throughout my 16p_resource code - for example,

To-Do List

  • Make the functions more flexible so that they're not so wedded to a particular formatting of data
  • Include more flags in arguments that let you use different versions of similar code (e.g., labels or no)
  • You call this modular, past me? This could be more modular

About

Library of useful functions I like to use with my differential expression pipelines.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages