1 ChIP-Seq Workflow

This workflow demonstrates how to use various utilities for building and running automated end-to-end analysis workflows for ChIP-Seq data. The full workflow can be found here: HTML, .Rmd, and .R.

1.1 Loading package and workflow template

Load the ChIP-Seq sample workflow into your current working directory.

library(systemPipeRdata)
genWorkenvir(workflow = "chipseq")
setwd("chipseq")

The working environment of the sample data loaded in the previous step contains the following preconfigured directory structure. Directory names are indicated in grey. Users can change this structure as needed, but need to adjust the code in their workflows accordingly.

  • chipseq/
    • This is the directory of the R session running the workflow.
    • Run script ( *.Rmd) and sample annotation (targets.txt) files are located here.
    • Note, this directory can have any name (e.g. chipseq). Changing its name does not require any modifications in the run script(s).
    • Important subdirectories:
      • param/
        • Stores parameter files such as: *.param, *.tmpl and *_run.sh.
      • data/
        • FASTQ samples
        • Reference FASTA file
        • Annotations
        • etc.
      • results/
        • Alignment, variant and peak files (BAM, VCF, BED)
        • Tabular result files
        • Images and plots
        • etc.

The following parameter files are included in each workflow template:

  1. targets.txt: initial one provided by user; downstream targets_*.txt files are generated automatically
  2. *.param: defines parameter for input/output file operations, e.g. trim.param, bwa.param, hisat2.param, …
  3. *_run.sh: optional bash script, e.g.: gatk_run.sh
  4. Compute cluster environment (skip on single machine):
    • .batchtools.conf.R: defines type of scheduler for batchtools. Note, it is necessary to point the right template accordingly to the cluster in use.
    • *.tmpl: specifies parameters of scheduler used by a system, e.g. Torque, SGE, Slurm, etc.

1.2 Run workflow

Next, run the chosen sample workflow systemPipeChIPseq (.Rmd) by executing from the command-line make -B within the chipseq directory. Alternatively, one can run the code from the provided *.Rmd template file from within R interactively.

Workflow includes following steps:

  1. Read preprocessing
    • Quality filtering (trimming)
    • FASTQ quality report
  2. Alignments: Bowtie2 or rsubread
  3. Alignment stats
  4. Peak calling: MACS2, BayesPeak
  5. Peak annotation with genomic context
  6. Differential binding analysis
  7. GO term enrichment analysis
  8. Motif analysis

2 Version Information

sessionInfo()
## R version 3.6.0 (2019-04-26)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 18.04.2 LTS
## 
## Matrix products: default
## BLAS:   /home/biocbuild/bbs-3.10-bioc/R/lib/libRblas.so
## LAPACK: /home/biocbuild/bbs-3.10-bioc/R/lib/libRlapack.so
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=C              
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## attached base packages:
## [1] stats4    parallel  stats     graphics  grDevices
## [6] utils     datasets  methods   base     
## 
## other attached packages:
##  [1] batchtools_0.9.11           data.table_1.12.2          
##  [3] ape_5.3                     ggplot2_3.1.1              
##  [5] systemPipeR_1.19.0          ShortRead_1.43.0           
##  [7] GenomicAlignments_1.21.0    SummarizedExperiment_1.15.0
##  [9] DelayedArray_0.11.0         matrixStats_0.54.0         
## [11] Biobase_2.45.0              BiocParallel_1.19.0        
## [13] Rsamtools_2.1.0             Biostrings_2.53.0          
## [15] XVector_0.25.0              GenomicRanges_1.37.0       
## [17] GenomeInfoDb_1.21.0         IRanges_2.19.0             
## [19] S4Vectors_0.23.0            BiocGenerics_0.31.0        
## [21] BiocStyle_2.13.0           
## 
## loaded via a namespace (and not attached):
##  [1] nlme_3.1-139             Category_2.51.0         
##  [3] bitops_1.0-6             bit64_0.9-7             
##  [5] RColorBrewer_1.1-2       progress_1.2.0          
##  [7] httr_1.4.0               Rgraphviz_2.29.0        
##  [9] backports_1.1.4          tools_3.6.0             
## [11] R6_2.4.0                 DBI_1.0.0               
## [13] lazyeval_0.2.2           colorspace_1.4-1        
## [15] withr_2.1.2              tidyselect_0.2.5        
## [17] prettyunits_1.0.2        bit_1.1-14              
## [19] compiler_3.6.0           graph_1.63.0            
## [21] formatR_1.6              rtracklayer_1.45.0      
## [23] bookdown_0.9             scales_1.0.0            
## [25] checkmate_1.9.1          genefilter_1.67.0       
## [27] RBGL_1.61.0              rappdirs_0.3.1          
## [29] stringr_1.4.0            digest_0.6.18           
## [31] rmarkdown_1.12           AnnotationForge_1.27.0  
## [33] pkgconfig_2.0.2          htmltools_0.3.6         
## [35] BSgenome_1.53.0          limma_3.41.0            
## [37] rlang_0.3.4              RSQLite_2.1.1           
## [39] GOstats_2.51.0           hwriter_1.3.2           
## [41] dplyr_0.8.0.1            VariantAnnotation_1.31.0
## [43] RCurl_1.95-4.12          magrittr_1.5            
## [45] GO.db_3.8.2              GenomeInfoDbData_1.2.1  
## [47] Matrix_1.2-17            Rcpp_1.0.1              
## [49] munsell_0.5.0            stringi_1.4.3           
## [51] yaml_2.2.0               edgeR_3.27.0            
## [53] zlibbioc_1.31.0          plyr_1.8.4              
## [55] grid_3.6.0               blob_1.1.1              
## [57] crayon_1.3.4             lattice_0.20-38         
## [59] splines_3.6.0            GenomicFeatures_1.37.0  
## [61] annotate_1.63.0          hms_0.4.2               
## [63] locfit_1.5-9.1           knitr_1.22              
## [65] pillar_1.3.1             rjson_0.2.20            
## [67] base64url_1.4            codetools_0.2-16        
## [69] biomaRt_2.41.0           XML_3.98-1.19           
## [71] glue_1.3.1               evaluate_0.13           
## [73] latticeExtra_0.6-28      BiocManager_1.30.4      
## [75] gtable_0.3.0             purrr_0.3.2             
## [77] assertthat_0.2.1         xfun_0.6                
## [79] xtable_1.8-4             survival_2.44-1.1       
## [81] tibble_2.1.1             pheatmap_1.0.12         
## [83] AnnotationDbi_1.47.0     memoise_1.1.0           
## [85] brew_1.0-6               GSEABase_1.47.0

3 Funding

This project was supported by funds from the National Institutes of Health (NIH) and the National Science Foundation (NSF).