systemPipeR
systemPipeR
{.flexbox .vcenter .smaller}
Workflow steps with input/output file operations are controlled by SYSargs
objects.
Each SYSargs
instance is constructed from a targets
file and a param
file.
Only input provided by user is initial targets
file. Subsequent targets
instances are created automatically.
Any number of predefined or custom workflow steps are supported.
systemPipeRdata
: template workflowssystemPipeR
. rsubread
, Bowtie2/Tophat2
edgeR
or DESeq2
gsnap
, bwa
VariantTools
, GATK
, BCFtools
VariantTools
and VariantAnnotation
VariantAnnotation
rsubread
, Bowtie2
MACS2
, BayesPeak
Tophat2
(or any other RNA-Seq aligner)Workflow templates for:
Install required packages
if (!requireNamespace("BiocManager", quietly=TRUE)) install.packages("BiocManager") BiocManager::install("systemPipeR") # Install systemPipeR from Bioconductor BiocManager::install("tgirke/systemPipeRdata", build_vignettes=TRUE, dependencies=TRUE) # From github
Load packages and accessing help
library("systemPipeR"); library("systemPipeRdata")
library("systemPipeR") library("systemPipeRdata")
Access help
library(help="systemPipeR") vignette("systemPipeR")
Targets
file organizes samples {.smaller}Structure of targets
file for single-end (SE) library
targetspath <- system.file("extdata", "targets.txt", package="systemPipeR") read.delim(targetspath, comment.char = "#")[1:3,1:5]
Structure of targets
file for paired-end (PE) library
targetspath <- system.file("extdata", "targetsPE.txt", package="systemPipeR") read.delim(targetspath, comment.char = "#")[1:3,1:4]
SYSargs
: targets
& param
{.smaller}SYSargs
instances are constructed from a targets
file and a param
file. The param
file contains the settings for running command-line software.
parampath <- system.file("extdata", "tophat.param", package="systemPipeR") (args <- suppressWarnings(systemArgs(sysma=parampath, mytargets=targetspath)))
Slots and accessor functions have the same names
names(args)[c(5,8,13)]
Return command-line arguments for given software, here Tophat2
for 1st sample.
sysargs(args)[1]
## tophat -p 4 -o SRR446027_1.fastq.tophat tair10.fasta SRR446027_1.fastq .SRR446027_2.fastq
Run command-line tool, here Tophat2
, on single machine. Command-line tool needs to be installed for this.
runCommandline(args)
Submit command-line or R processes to a computer cluster with a queueing system.
clusterRun(args, ...)
The last step requires additional resource allocation arguments. For details please visit the main manual here.
Generate workflow template, e.g. "rnaseq", "varseq" or "chipseq"
### <b> genWorkenvir(workflow="varseq", mydirname=NULL) ### </b> setwd("varseq")
Command-line alternative for generating workflow environments
```{.sh generate_workenvir_from_shell, eval=FALSE, cache=TRUE}
$ echo 'library(systemPipeRdata);
genWorkenvir(workflow="varseq", mydirname=NULL)' | R --slave
## Workflow template structure The workflow templates generated by _`genWorkenvir`_ contain the following preconfigured directory structure: <br></br> ```r ### <b> workflow_name/ # *.Rnw/*.Rmd scripts, targets file, etc. param/ # parameter files for command-line software data/ # inputs e.g. FASTQ, reference, annotations results/ # analysis result files ### </b>
The above structure can be customized as needed, but for first-time users it is easier to keep changes to a minimum.
*.Rnw
template file (or *.Rmd
or *.R
versions).{.sh run_make, eval=FALSE}
$ make -B
Analysis reports in PDF or HTML format are autogenerated when running a workflow using standard R resources for scientific report generation including knitr
and rmarkdown
, respectively.
Integration of ReportingTools is also straightforward.
.param
filesAdd the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.