Skip to content

Instantly share code, notes, and snippets.

@le23petit
Last active December 20, 2015 01:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save le23petit/6048828 to your computer and use it in GitHub Desktop.
Save le23petit/6048828 to your computer and use it in GitHub Desktop.
Overview of the scripts called in order to produce a full RNA-seq analysis
## The first R script reads in parameters from a project-specific file that is specified in the script. This should be the only time that variables ## are specified and hard-coded. Everything downstream of this first file takes on the variables assigned here.
source("R_pipeline_R521G_readParamFile.R")
#source("R_pipeline_WTTG_readParamFile.R")
## This script loads the Biocinstaller and downloads/updates all necessary libraries for the project and analysis
source("R_pipeline_libraries.R")
## During this first script, you may be asked to press "a/s/n" (a or s or n) to indicate
## whether you wish to update all, some, or none of the packages. I suggest "a"
## if you have time (which you should given that the rest of this script takes forever).
## This next script uses QuasR to preprocess the FASTQ files located in the read repository according to
## criteria like base quality and genome complexity. The reads that remain after filtering are used in
## the next step
source("R_pipeline_preprocess.R")
## Aligns read to the mouse (M. musculus) genome. The choice of genome is hard-coded, which should be changed eventually.
source("R_pipeline_align.R")
## This script produces statistics and graphics of the read qualities, insert size dimensions, nucleotide frequencies, mapping frequencies,
## and a number of other useful diagnostic values.
source("R_pipeline_qcrep_stats.R")
## A small script that uploads a DEXSeq-specific annotation of the mouse as well as the Bioconductor mouse transcript database
source("R_pipeline_makeDb.R")
## A script that produces count matrices at the gene and exon levels from the annotated genome and the data
source("R_pipeline_countTables.R")
## A script that normalizes the gene count matrix using CQN and EDASeq (all combinations of within- and between-lane normalization)
source("R_pipeline_normalization.R")
## A script that produces visualizations of pre-normalization statistics (counts, gc-bias, length-bias, mean vs. variance plots, etc...)
## and places them in a dedicated folder
source("R_pipeline_visual_EDAbeforeNorm.R")
## The next three scripts perform similar visualizations of post-normalization statistics for the different normalizations
## within EDASeq (median, upper, and full between-lane normalization) and CQN
source("R_pipeline_visual_EDA_afterBLane_MedianNorm.R")
source("R_pipeline_visual_EDA_afterBLane_UpperNorm.R")
source("R_pipeline_visual_EDA_afterBLane_FullNorm.R")
source("R_pipeline_visual_CQN_afterNorm.R")
## To perform independent filtering of genes based on the Jaccard filter and a 40% quantile removal, we use HTSeqFilter and a home-made script to filter prior to EDASeq and CQN normalization.
source("R_pipeline_Jfiltnormalization.R")
source("R_pipeline_40filtnormalization.R")
## We use edgeR to run the equivalent of a t-test comparing the means from independent samples having unequal variances. The underlying distribution is the negative binomial. The t-test is run on the unfiltered, the Jaccard-filtered, and the 40th-quantile-filtered datasets.
source("R_pipeline_runedgeR.R")
source("R_pipeline_Jfilt_runedgeR.R")
source("R_pipeline_40filt_runedgeR.R")
## These three scripts produce M vs. A plots (fold-change versus expression) for the three types of filtering.
source("R_pipeline_visual_edgeMA.R")
source("R_pipeline_visual_Jfilt_edgeMA.R")
source("R_pipeline_visual_40filt_edgeMA.R")
##
source("R_pipeline_visual_postNormDEG.R")
source("R_pipeline_visual_phist_unfilt_edgeR.R")
source("R_pipeline_visual_phist_Jfilt_edgeR.R")
source("R_pipeline_visual_phist_40filt_edgeR.R")
source("R_pipeline_outedgeR.R")
source("R_pipeline_prepareDEXSeqCountTable.R")
source("R_pipeline_applyFiltersDEXSeq.R")
source("R_pipeline_createECS.R")
source("R_pipeline_visual_MvsDispDEXSeq.R")
source("R_pipeline_testforDEU.R")
source("R_pipeline_MAplotDEX.R")
source("R_pipeline_goseqDE.R")
save.image(file=paste(as.character(project_name),"_RScript.RData", sep=""))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment