Rules to create a new Workflow Template

How to create a new Workflow Template

SPRthis package expand usethis package, providing automation to create systemPipeR workflows templates.

Installation

To install SPRthis using from BiocManager the following code:

if (!requireNamespace("BiocManager", quietly = TRUE)) {
  install.packages("BiocManager")
  BiocManager::install("dcassol/SPRthis")

Quick start to using to SPRthis

## Load the package
library(SPRthis)
## create Package
sprthis(wfName="SPRtest", analysis="SPRtest", path=tempdir())
## ✔ Creating '/tmp/RtmpUJVdef/SPRtest/'
## ✔ Setting active project to '/tmp/RtmpUJVdef/SPRtest'
## ✔ Creating 'R/'
## ✔ Writing 'DESCRIPTION'
## Package: SPRtest
## Title: SPRtest
## Version: 0.99.0
## Date: 2022-04-29
## Authors@R (parsed):
##     * First Last <first.last@example.com> [aut, cre] (YOUR-ORCID-ID)
## Description: This package provides a pre-configured workflow and reporting
##     template for SPRtest.
## License: Artistic-2.0
## URL: https://github.com/systemPipeR/SPRtest
## Imports:
##     systemPipeR (>= 1.25.0)
## Suggests:
##     BiocStyle,
##     knitr,
##     rmarkdown
## VignetteBuilder:
##     knitr
## biocViews: Infrastructure, ...
## Encoding: UTF-8
## Roxygen: list(markdown = TRUE)
## RoxygenNote: 7.1.2
## SystemRequirements: SPRtest can be used to run external command-line
##     software, but the corresponding tool needs to be installed on a
##     system.
## ✔ Writing 'NAMESPACE'
## ✔ Setting active project to '<no active project>'
## ✔ Setting active project to '/tmp/RtmpUJVdef/SPRtest'
## ✔ Adding 'testthat' to Suggests field in DESCRIPTION
## ✔ Setting Config/testthat/edition field in DESCRIPTION to '3'
## ✔ Creating 'tests/testthat/'
## ✔ Writing 'tests/testthat.R'
## ✔ Writing 'tests/testthat/test-SPRtest.R'
## • Edit 'tests/testthat/test-SPRtest.R'
## [1] "/tmp/RtmpUJVdef/SPRtest"
SPRtest/  
├── DESCRIPTION 
├── NAMESPACE 
├── README.md 
├── SPRtest.Rproj 
├── .gitignore
├── .Rbuildignore
├── .Rproj.user/  
├── R/
│   ├── functions.R
├── vignettes 
│   ├── bibtex.bib
│   ├── SPRtest.Rmd  
└── inst 
    ├── rmarkdown 
    │   └── templates
    │       └── SPRtest
    │           ├── template.yml
    │           └── skeleton
    │                 ├── batchtools.slurm.tmpl
    │                 ├── .batchtools.conf.R
    │                 ├── bibtex.bib 
    │                 ├── NEWS
    │                 ├── SPRconfig.yml
    │                 ├── skeleton.Rmd 
    │                 ├── targetsPE.txt 
    │                 ├── data/
    │                 ├── param/
    │                 └── results/

Help functions to create the package

Create the webiste for the package with pkgdown

Edit the _pkgdown.yml file and run:

pkgdown::build_site() 

Documentation with roxygen2

roxygen2::roxygenise()

Testing the code with testthat

To test the code, you can run

devtools::test()

Update R Markdown template on skeleton

path <- file.path("vignettes/SPRtest.Rmd")
skeleton_update(path)

Package available to genWorkenvir Function

After creating the new repository on GitHub systemPipeR Organization, please follow:

  • Rules:
    • The Workflow Template need to be available under systemPipeR Organization;
    • The repository needs to be public;
    • About setting:
      • Description: keywords in the description are required: “Workflow Template”;
      • Topics: we expected “systempiper” and “release” or “development” words on Topics section;
    • Branch name: To make simple, please name the branch as “master”.

Check availability of workflow templates

A collection of workflow templates are available, and it is possible to browse the current availability, as follows:

systemPipeRdata::availableWF(github = TRUE)
## $systemPipeRdata
## [1] "chipseq" "new"     "riboseq" "rnaseq"  "varseq" 
## 
## $github
##                     workflow                       branches version
## 1      systemPipeR/SPchipseq                         master release
## 2      systemPipeR/SPriboseq                         master release
## 3       systemPipeR/SPrnaseq cluster, master, singleMachine release
## 4       systemPipeR/SPvarseq                         master release
## 5      systemPipeR/SPatacseq                         master   devel
## 6        systemPipeR/SPblast                         master   devel
## 7      systemPipeR/SPclipseq                         master   devel
## 8       systemPipeR/SPdenovo                         master   devel
## 9          systemPipeR/SPhic                         master   devel
## 10   systemPipeR/SPmetatrans                         master   devel
## 11   systemPipeR/SPmethylseq                         master   devel
## 12    systemPipeR/SPmirnaseq                         master   devel
## 13 systemPipeR/SPpolyriboseq                         master   devel
## 14    systemPipeR/SPscrnaseq                         master   devel
##                                            html       description
## 1      https://github.com/systemPipeR/SPchipseq Workflow Template
## 2      https://github.com/systemPipeR/SPriboseq Workflow Template
## 3       https://github.com/systemPipeR/SPrnaseq Workflow Template
## 4       https://github.com/systemPipeR/SPvarseq Workflow Template
## 5      https://github.com/systemPipeR/SPatacseq Workflow Template
## 6        https://github.com/systemPipeR/SPblast Workflow Template
## 7      https://github.com/systemPipeR/SPclipseq Workflow Template
## 8       https://github.com/systemPipeR/SPdenovo Workflow Template
## 9          https://github.com/systemPipeR/SPhic Workflow Template
## 10   https://github.com/systemPipeR/SPmetatrans Workflow Template
## 11   https://github.com/systemPipeR/SPmethylseq Workflow Template
## 12    https://github.com/systemPipeR/SPmirnaseq Workflow Template
## 13 https://github.com/systemPipeR/SPpolyriboseq Workflow Template
## 14    https://github.com/systemPipeR/SPscrnaseq Workflow Template

This function returns the list of workflow templates available within the package and systemPipeR Project Organization on GitHub. Each one listed template can be created as described above.

Last modified 2022-04-29 : gh-pages (b256d52a)