1 Ribo-Seq Workflow

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

1.1 Loading package and workflow template

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

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

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.

  • riboseq/
    • 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. riboseq). 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 systemPipeRIBOseq (.Rmd) by executing from the command-line make -B within the ribseq directory. Alternatively, one can run the code from the provided *.Rmd template file from within R interactively.

Workflow includes following steps:

  1. Read preprocessing
    • Adaptor trimming and quality filtering
    • FASTQ quality report
  2. Alignments: HISAT2 (or any other RNA-Seq aligner)
  3. Alignment stats
  4. Compute read distribution across genomic features
  5. Adding custom features to workflow (e.g. uORFs)
  6. Genomic read coverage along transcripts
  7. Read counting
  8. Sample-wise correlation analysis
  9. Analysis of differentially expressed genes (DEGs)
  10. GO term enrichment analysis
  11. Gene-wise clustering
  12. Differential ribosome binding (translational efficiency)

1.2.1 Render report in HTML and PDF format

rmarkdown::render("systemPipeRIBOseq.Rmd", "html_document")
rmarkdown::render("systemPipeRIBOseq.Rmd", "pdf_document")

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] DESeq2_1.25.0               batchtools_0.9.11          
##  [3] data.table_1.12.2           ape_5.3                    
##  [5] ggplot2_3.1.1               systemPipeR_1.19.0         
##  [7] ShortRead_1.43.0            GenomicAlignments_1.21.0   
##  [9] SummarizedExperiment_1.15.0 DelayedArray_0.11.0        
## [11] matrixStats_0.54.0          Biobase_2.45.0             
## [13] BiocParallel_1.19.0         Rsamtools_2.1.0            
## [15] Biostrings_2.53.0           XVector_0.25.0             
## [17] GenomicRanges_1.37.0        GenomeInfoDb_1.21.0        
## [19] IRanges_2.19.0              S4Vectors_0.23.0           
## [21] BiocGenerics_0.31.0         BiocStyle_2.13.0           
## 
## loaded via a namespace (and not attached):
##   [1] colorspace_1.4-1         rjson_0.2.20            
##   [3] hwriter_1.3.2            htmlTable_1.13.1        
##   [5] base64enc_0.1-3          rstudioapi_0.10         
##   [7] bit64_0.9-7              AnnotationDbi_1.47.0    
##   [9] codetools_0.2-16         splines_3.6.0           
##  [11] geneplotter_1.63.0       knitr_1.22              
##  [13] Formula_1.2-3            annotate_1.63.0         
##  [15] cluster_2.0.9            GO.db_3.8.2             
##  [17] pheatmap_1.0.12          graph_1.63.0            
##  [19] BiocManager_1.30.4       compiler_3.6.0          
##  [21] httr_1.4.0               GOstats_2.51.0          
##  [23] backports_1.1.4          assertthat_0.2.1        
##  [25] Matrix_1.2-17            lazyeval_0.2.2          
##  [27] limma_3.41.0             formatR_1.6             
##  [29] acepack_1.4.1            htmltools_0.3.6         
##  [31] prettyunits_1.0.2        tools_3.6.0             
##  [33] gtable_0.3.0             glue_1.3.1              
##  [35] GenomeInfoDbData_1.2.1   Category_2.51.0         
##  [37] dplyr_0.8.0.1            rappdirs_0.3.1          
##  [39] Rcpp_1.0.1               nlme_3.1-139            
##  [41] rtracklayer_1.45.0       xfun_0.6                
##  [43] stringr_1.4.0            XML_3.98-1.19           
##  [45] edgeR_3.27.0             zlibbioc_1.31.0         
##  [47] scales_1.0.0             BSgenome_1.53.0         
##  [49] VariantAnnotation_1.31.0 hms_0.4.2               
##  [51] RBGL_1.61.0              RColorBrewer_1.1-2      
##  [53] yaml_2.2.0               gridExtra_2.3           
##  [55] memoise_1.1.0            biomaRt_2.41.0          
##  [57] rpart_4.1-15             latticeExtra_0.6-28     
##  [59] stringi_1.4.3            RSQLite_2.1.1           
##  [61] genefilter_1.67.0        checkmate_1.9.1         
##  [63] GenomicFeatures_1.37.0   rlang_0.3.4             
##  [65] pkgconfig_2.0.2          bitops_1.0-6            
##  [67] evaluate_0.13            lattice_0.20-38         
##  [69] purrr_0.3.2              labeling_0.3            
##  [71] htmlwidgets_1.3          bit_1.1-14              
##  [73] tidyselect_0.2.5         GSEABase_1.47.0         
##  [75] AnnotationForge_1.27.0   plyr_1.8.4              
##  [77] magrittr_1.5             bookdown_0.9            
##  [79] R6_2.4.0                 Hmisc_4.2-0             
##  [81] base64url_1.4            DBI_1.0.0               
##  [83] pillar_1.3.1             foreign_0.8-71          
##  [85] withr_2.1.2              survival_2.44-1.1       
##  [87] RCurl_1.95-4.12          nnet_7.3-12             
##  [89] tibble_2.1.1             crayon_1.3.4            
##  [91] rmarkdown_1.12           progress_1.2.0          
##  [93] locfit_1.5-9.1           grid_3.6.0              
##  [95] blob_1.1.1               Rgraphviz_2.29.0        
##  [97] digest_0.6.18            xtable_1.8-4            
##  [99] brew_1.0-6               munsell_0.5.0

3 Funding

This research was funded by National Science Foundation Grants IOS-0750811 and MCB-1021969, and a Marie Curie European Economic Community Fellowship PIOF-GA-2012-327954.