systemPipeRdata 2.2.0
Note: the most recent version of this vignette can be found here.
Note: if you use systemPipeR
and systemPipeRdata
in published research, please cite:
Backman, T.W.H and Girke, T. (2016). systemPipeR: Workflow and Report Generation Environment. BMC Bioinformatics, 17: 388. 10.1186/s12859-016-1241-0.
systemPipeRdata
is a helper package
to generate with a single command workflow templates that are intended to be
used by its parent package systemPipeR
(H Backman and Girke 2016).
The systemPipeR project provides a suite of R/Bioconductor packages for designing,
building and running end-to-end analysis workflows on local machines, HPC clusters
and cloud systems, while generating at the same time publication quality analysis reports.
To test workflows quickly or design new ones from existing templates, users can
generate with a single command workflow instances fully populated with sample data
and parameter files required for running a chosen workflow.
Pre-configured directory structure of the workflow environment and the sample data
used by systemPipeRdata
are described here.
systemPipeRdata
package provides a demo sample FASTQ files used in the
workflow reporting vignettes. The chosen data set SRP010938
obtains 18
paired-end (PE) read sets from Arabidposis thaliana (Howard et al. 2013). To
minimize processing time during testing, each FASTQ file has been subsetted to
90,000-100,000 randomly sampled PE reads that map to the first 100,000
nucleotides of each chromosome of the A. thalina genome. The corresponding
reference genome sequence (FASTA) and its GFF annotation files (provided in the
same download) have been truncated accordingly. This way the entire test sample
data set requires less than 200MB disk storage space. A PE read set has been
chosen for this test data set for flexibility, because it can be used for
testing both types of analysis routines requiring either SE (single-end) reads
or PE reads.
The systemPipeRdata
package is available at Bioconductor and can be installed from within R as follows:
if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager")
BiocManager::install("systemPipeRdata")
Also, it is possible to install the development version from Bioconductor.
BiocManager::install("systemPipeRdata", version = "devel", build_vignettes = TRUE,
dependencies = TRUE) # Installs Devel version from Bioconductor
library("systemPipeRdata") # Loads the package
library(help = "systemPipeRdata") # Lists package info
vignette("systemPipeRdata") # Opens vignette
Load one of the available workflows into your current working directory.
The following does this for the rnaseq
workflow template. The name of the resulting
workflow directory can be specified under the mydirname
argument. The default NULL
uses the name of the chosen workflow. An error is issued if a directory of the same
name and path exists already.
genWorkenvir(workflow = "systemPipeR/SPrnaseq", mydirname = "rnaseq")
setwd("rnaseq")
On Linux and OS X systems the same can be achieved from the command-line of a terminal with the following commands.
$ Rscript -e "systemPipeRdata::genWorkenvir(workflow='systemPipeR/SPrnaseq', mydirname='rnaseq')"
This template provides some common steps for a RNAseq
workflow. One can add, remove, modify
workflow steps by operating on the sal
object.
sal <- SPRproject()
sal <- importWF(sal, file_path = "systemPipeVARseq.Rmd", verbose = FALSE)
Next, we can run the entire workflow from R with one command:
sal <- runWF(sal)
systemPipeR
workflows instances can be visualized with the plotWF
function.
plotWF(sal)
systemPipeR
compiles all the workflow execution logs in one central location,
making it easier to check any standard output (stdout
) or standard error
(stderr
) for any command-line tools used on the workflow or the R code stdout.
sal <- renderLogs(sal)
Also, the technical report can be generated using renderReport
function.
sal <- renderReport(sal)
A collection of workflow templates are available, and it is possible to browse the current availability, as follows:
availableWF(github = TRUE)
This function returns the list of workflow templates available within the package and systemPipeR Organization on GitHub. Each one listed template can be created as described above.
The workflow template choose from Github will be installed as an R package, and also it creates the environment with all the settings and files to run the demo analysis.
genWorkenvir(workflow="systemPipeR/SPrnaseq", mydirname="NULL")
setwd("SPrnaseq")
Besides, it is possible to choose different versions of the workflow template,
defined through other branches on the GitHub Repository. By default, the master
branch is selected, however, it is possible to define a different branch with the ref
argument.
genWorkenvir(workflow="systemPipeR/SPrnaseq", ref = "singleMachine")
setwd("SPrnaseq")
Also, it is possible to download a specific workflow script for your analysis.
The URL can be specified under url
argument and the R Markdown file name in
the urlname
argument. The default NULL
copies the current version available in the chose template.
genWorkenvir(workflow="systemPipeR/SPrnaseq", url = "https://raw.githubusercontent.com/systemPipeR/systemPipeRNAseq/cluster/vignettes/systemPipeRNAseq.Rmd",
urlname = "rnaseq_V-cluster.Rmd")
setwd("rnaseq")
It is possible to create a new workflow structure from RStudio
menu File -> New File -> R Markdown -> From Template -> systemPipeR New WorkFlow
.
This interactive option creates the same environment as demonstrated above.
Figure 1: Selecting workflow template within RStudio.
The workflow templates generated by genWorkenvir
contain the following preconfigured directory structure:
CWL param
and input.yml
files need to be in the same subdirectory.Note: Directory names are indicated in green. Users can change this structure as needed, but need to adjust the code in their workflows accordingly.
Figure 2: systemPipeR’s preconfigured directory structure.
The location of the sample data provided by systemPipeRdata
can be returned as a list
.
pathList()[1:2]
## $targets
## [1] "/tmp/RtmpA6azB3/Rinst2f1fd57d524e4/systemPipeRdata/extdata/param/targets.txt"
##
## $targetsPE
## [1] "/tmp/RtmpA6azB3/Rinst2f1fd57d524e4/systemPipeRdata/extdata/param/targetsPE.txt"
sessionInfo()
## R version 4.2.1 (2022-06-23)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 20.04.5 LTS
##
## Matrix products: default
## BLAS: /home/biocbuild/bbs-3.16-bioc/R/lib/libRblas.so
## LAPACK: /home/biocbuild/bbs-3.16-bioc/R/lib/libRlapack.so
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_GB 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 stats graphics grDevices utils
## [6] datasets methods base
##
## other attached packages:
## [1] systemPipeRdata_2.2.0 systemPipeR_2.4.0
## [3] ShortRead_1.56.0 GenomicAlignments_1.34.0
## [5] SummarizedExperiment_1.28.0 Biobase_2.58.0
## [7] MatrixGenerics_1.10.0 matrixStats_0.62.0
## [9] BiocParallel_1.32.0 Rsamtools_2.14.0
## [11] Biostrings_2.66.0 XVector_0.38.0
## [13] GenomicRanges_1.50.0 GenomeInfoDb_1.34.0
## [15] IRanges_2.32.0 S4Vectors_0.36.0
## [17] BiocGenerics_0.44.0 BiocStyle_2.26.0
##
## loaded via a namespace (and not attached):
## [1] sass_0.4.2 jsonlite_1.8.3
## [3] bslib_0.4.0 assertthat_0.2.1
## [5] BiocManager_1.30.19 latticeExtra_0.6-30
## [7] GenomeInfoDbData_1.2.9 remotes_2.4.2
## [9] yaml_2.3.6 pillar_1.8.1
## [11] lattice_0.20-45 glue_1.6.2
## [13] digest_0.6.30 RColorBrewer_1.1-3
## [15] colorspace_2.0-3 htmltools_0.5.3
## [17] Matrix_1.5-1 pkgconfig_2.0.3
## [19] bookdown_0.29 zlibbioc_1.44.0
## [21] scales_1.2.1 jpeg_0.1-9
## [23] tibble_3.1.8 generics_0.1.3
## [25] ggplot2_3.3.6 cachem_1.0.6
## [27] cli_3.4.1 magrittr_2.0.3
## [29] crayon_1.5.2 deldir_1.0-6
## [31] evaluate_0.17 fansi_1.0.3
## [33] hwriter_1.3.2.1 tools_4.2.1
## [35] formatR_1.12 lifecycle_1.0.3
## [37] stringr_1.4.1 interp_1.1-3
## [39] munsell_0.5.0 DelayedArray_0.24.0
## [41] compiler_4.2.1 jquerylib_0.1.4
## [43] rlang_1.0.6 grid_4.2.1
## [45] RCurl_1.98-1.9 htmlwidgets_1.5.4
## [47] bitops_1.0-7 rmarkdown_2.17
## [49] gtable_0.3.1 codetools_0.2-18
## [51] DBI_1.1.3 R6_2.5.1
## [53] knitr_1.40 dplyr_1.0.10
## [55] fastmap_1.1.0 utf8_1.2.2
## [57] stringi_1.7.8 parallel_4.2.1
## [59] Rcpp_1.0.9 vctrs_0.5.0
## [61] png_0.1-7 tidyselect_1.2.0
## [63] xfun_0.34
This project was supported by funds from the National Institutes of Health (NIH) and the National Science Foundation (NSF).
H Backman, Tyler W, and Thomas Girke. 2016. “systemPipeR: NGS workflow and report generation environment.” BMC Bioinformatics 17 (1): 388. https://doi.org/10.1186/s12859-016-1241-0.
Howard, Brian E, Qiwen Hu, Ahmet Can Babaoglu, Manan Chandra, Monica Borghi, Xiaoping Tan, Luyan He, et al. 2013. “High-Throughput RNA Sequencing of Pseudomonas-Infected Arabidopsis Reveals Hidden Transcriptome Complexity and Novel Splice Variants.” PLoS One 8 (10): e74183. https://doi.org/10.1371/journal.pone.0074183.