Skip to content

Commit

Permalink
add package info and tool info to all wf
Browse files Browse the repository at this point in the history
  • Loading branch information
lz100 committed Aug 4, 2023
1 parent a2e4328 commit ff35bf3
Show file tree
Hide file tree
Showing 16 changed files with 1,401 additions and 977 deletions.
22 changes: 22 additions & 0 deletions ..Rproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Version: 1.0

RestoreWorkspace: No
SaveWorkspace: No
AlwaysSaveHistory: Default

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 4
Encoding: UTF-8

RnwWeave: Sweave
LaTeX: pdfLaTeX

AutoAppendNewline: Yes
StripTrailingWhitespace: Yes

BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageCheckArgs: --no-build-vignettes --no-tests
PackageRoxygenize: rd,collate,namespace
2 changes: 1 addition & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
^\.github
^docs
vignettes/*_cache

^\.Rhistory
^.*\.Rproj$
^\.Rproj\.user$
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,5 @@ docs/articles/systemPipeRIBOseq_files/*
docs/articles/systemPipeRNAseq_files/*
docs/articles/systemPipeRdata_files/*
docs/articles/systemPipeVARseq_files/*

*.Rproj
.Rproj.user
.Rhistory
37 changes: 31 additions & 6 deletions inst/extdata/workflows/chipseq/systemPipeChIPseq.Rmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "ChIP-Seq Workflow Template"
author: "Author: Daniela Cassol ([email protected]) and Thomas Girke ([email protected])"
author: "Author: First Last Name"
date: "Last update: `r format(Sys.time(), '%d %B, %Y')`"
output:
BiocStyle::html_document:
Expand Down Expand Up @@ -141,6 +141,11 @@ sal
The `systemPipeR` package needs to be loaded [@H_Backman2016-bt].

```{r load_SPR, message=FALSE, eval=FALSE, spr=TRUE}
cat(crayon::blue$bold("To use this workflow, following R packages are expected:\n"))
cat(c("'ggbio", "ChIPseeker", "GenomicFeatures", "GenomicRanges", "Biostrings",
"seqLogo", "BCRANK", "readr'\n"), sep = "', '")
targetspath <- system.file("extdata", "targetsPE_chip.txt", package = "systemPipeR")
###pre-end
appendStep(sal) <- LineWise(code = {
library(systemPipeR)
}, step_name = "load_SPR")
Expand Down Expand Up @@ -168,7 +173,7 @@ later, we used the `getColumn` function to extract a named vector.
```{r fastq_report, eval=FALSE, message=FALSE, spr=TRUE}
appendStep(sal) <- LineWise(
code = {
targets <- read.delim("targetsPE_chip.txt", comment.char = "#")
targets <- read.delim(targetspath, comment.char = "#")
updateColumn(sal, step = "load_SPR", position = "targetsWF") <- targets
fq_files <- getColumn(sal, "load_SPR", "targetsWF", column = 1)
fqlist <- seeFastq(fastq = fq_files, batchsize = 10000, klength = 8)
Expand Down Expand Up @@ -200,7 +205,7 @@ All the parameters are defined on the `preprocessReads-pe.yml` file.
```{r preprocessing, message=FALSE, eval=FALSE, spr=TRUE}
appendStep(sal) <- SYSargsList(
step_name = "preprocessing",
targets = "targetsPE_chip.txt", dir = TRUE,
targets = targetspath, dir = TRUE,
wf_file = "preprocessReads/preprocessReads-pe.cwl",
input_file = "preprocessReads/preprocessReads-pe.yml",
dir_path = system.file("extdata/cwl", package = "systemPipeR"),
Expand Down Expand Up @@ -292,7 +297,7 @@ to multiple locations. To achieve this, users want to remove the argument settin
appendStep(sal) <- SYSargsList(
step_name = "bowtie2_alignment",
dir = TRUE,
targets = "targetsPE_chip.txt",
targets = targetspath,
wf_file = "workflow-bowtie2/workflow_bowtie2-pe.cwl",
input_file = "workflow-bowtie2/workflow_bowtie2-pe.yml",
dir_path = system.file("extdata/cwl", package = "systemPipeR"),
Expand Down Expand Up @@ -840,13 +845,33 @@ If you are running on a single machine, use following code as an example to chec
if some tools used in this workflow are in your environment **PATH**. No warning
message should be shown if all tools are installed.

## Tools used
To check command-line tools used in this workflow, use `listCmdTools`, and use `listCmdModules`
to check if you have a modular system.

The following code will print out tools required in your custom SPR project in the report.
In case you are running the workflow for the first and do not have a project yet, or you
just want to browser this workflow, following code displays the tools required by default.
```{r list_tools}
if(file.exists(file.path(".SPRproject", "SYSargsList.yml"))) {
local({
sal <- systemPipeR::SPRproject(resume = TRUE)
systemPipeR::listCmdTools(sal)
systemPipeR::listCmdModules(sal)
})
} else {
cat(crayon::blue$bold("Tools and modules required by this workflow are:\n"))
cat(c("BLAST 2.14.0+"), sep = "\n")
}
```


## Session Info
This is the session information for rendering this report. To access the session information
of workflow running, check HTML report of `renderLogs`.
```{r eval=TRUE}
```{r report_session_info, eval=TRUE}
sessionInfo()
```

# Funding

This project was supported by funds from the National Institutes of
Expand Down
486 changes: 268 additions & 218 deletions inst/extdata/workflows/chipseq/systemPipeChIPseq.html

Large diffs are not rendered by default.

33 changes: 29 additions & 4 deletions inst/extdata/workflows/riboseq/systemPipeRIBOseq.Rmd
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
---
title: "RIBO-Seq Workflow Template"
author: "Author: Daniela Cassol ([email protected]) and Thomas Girke ([email protected])"
author: "Author: First Last Name"
date: "Last update: `r format(Sys.time(), '%d %B, %Y')`"
output:
BiocStyle::html_document:
toc_float: true
code_folding: show
package: systemPipeR
vignette: |
%\VignetteIndexEntry{WF: RIBO-Seq Workflow Template}
%\VignetteEncoding{UTF-8}
%\VignetteIndexEntry{WF: RIBO-Seq Workflow Template}
%\VignetteEngine{knitr::rmarkdown}
fontsize: 14pt
bibliography: bibtex.bib
editor_options:
chunk_output_type: console
---

<!--
Expand Down Expand Up @@ -194,14 +196,17 @@ sal
The `systemPipeR` package needs to be loaded [@H_Backman2016-bt].

```{r load_SPR, message=FALSE, eval=FALSE, spr=TRUE}
cat(crayon::blue$bold("To use this workflow, following R packages are expected:\n"))
cat(c("'rtracklayer", "GenomicFeatures", "grid", "BiocParallel", "DESeq2",
"ape", "edgeR", "biomaRt", "BBmisc", "pheatmap","ggplot2'\n"), sep = "', '")
###pre-end
appendStep(sal) <- LineWise(
code = {
library(systemPipeR)
library(rtracklayer)
library(GenomicFeatures)
library(ggplot2)
library(grid)
library(BiocParallel)
library(DESeq2, quietly=TRUE)
library(ape, warn.conflicts=FALSE)
library(edgeR)
Expand Down Expand Up @@ -1094,7 +1099,27 @@ making it easier to check any standard output (`stdout`) or standard error
sal <- renderLogs(sal)
```

# Version Information
## Tools used
To check command-line tools used in this workflow, use `listCmdTools`, and use `listCmdModules`
to check if you have a modular system.

The following code will print out tools required in your custom SPR project in the report.
In case you are running the workflow for the first and do not have a project yet, or you
just want to browser this workflow, following code displays the tools required by default.
```{r list_tools}
if(file.exists(file.path(".SPRproject", "SYSargsList.yml"))) {
local({
sal <- systemPipeR::SPRproject(resume = TRUE)
systemPipeR::listCmdTools(sal)
systemPipeR::listCmdModules(sal)
})
} else {
cat(crayon::blue$bold("Tools and modules required by this workflow are:\n"))
cat(c("hisat2/2.1.0", "samtools/1.14"), sep = "\n")
}
```

## Report Information
This is the session information for rendering this report. To access the session information
of workflow running, check HTML report of `renderLogs`.
```{r sessionInfo_final, eval=TRUE}
Expand Down
505 changes: 275 additions & 230 deletions inst/extdata/workflows/riboseq/systemPipeRIBOseq.html

Large diffs are not rendered by default.

30 changes: 27 additions & 3 deletions inst/extdata/workflows/rnaseq/systemPipeRNAseq.Rmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "RNA-Seq Workflow Template"
author: "Author: Daniela Cassol ([email protected]) and Thomas Girke ([email protected])"
author: "Author: First Last Name"
date: "Last update: `r format(Sys.time(), '%d %B, %Y')`"
output:
BiocStyle::html_document:
Expand Down Expand Up @@ -129,6 +129,10 @@ sal
The `systemPipeR` package needs to be loaded [@H_Backman2016-bt].

```{r load_SPR, message=FALSE, eval=FALSE, spr=TRUE}
cat(crayon::blue$bold("To use this workflow, following R packages are expected:\n"))
cat(c("'GenomicFeatures", "BiocParallel", "DESeq2",
"ape", "edgeR", "biomaRt", "pheatmap","ggplot2'\n"), sep = "', '")
###pre-end
appendStep(sal) <- LineWise(code = {
library(systemPipeR)
}, step_name = "load_SPR")
Expand Down Expand Up @@ -636,7 +640,7 @@ appendStep(sal) <- LineWise(
![](results/heatmap1.png)
<div align="center">Figure 6: Heat Map with Hierarchical Clustering Dendrograms of DEGs</div></br>

## Version Information
## Workflow Information

```{r sessionInfo, eval=FALSE, spr=TRUE}
appendStep(sal) <- LineWise(
Expand Down Expand Up @@ -724,7 +728,27 @@ making it easier to check any standard output (`stdout`) or standard error
sal <- renderLogs(sal)
```

## Session Info
## Tools used
To check command-line tools used in this workflow, use `listCmdTools`, and use `listCmdModules`
to check if you have a modular system.

The following code will print out tools required in your custom SPR project in the report.
In case you are running the workflow for the first and do not have a project yet, or you
just want to browser this workflow, following code displays the tools required by default.
```{r list_tools}
if(file.exists(file.path(".SPRproject", "SYSargsList.yml"))) {
local({
sal <- systemPipeR::SPRproject(resume = TRUE)
systemPipeR::listCmdTools(sal)
systemPipeR::listCmdModules(sal)
})
} else {
cat(crayon::blue$bold("Tools and modules required by this workflow are:\n"))
cat(c("trimmomatic/0.39", "samtools/1.14", "hisat2/2.1.0"), sep = "\n")
}
```

## Report Session Info
This is the session information for rendering this report. To access the session information
of workflow running, check HTML report of `renderLogs`.
```{r report_session_info, eval=TRUE}
Expand Down
458 changes: 253 additions & 205 deletions inst/extdata/workflows/rnaseq/systemPipeRNAseq.html

Large diffs are not rendered by default.

41 changes: 35 additions & 6 deletions inst/extdata/workflows/varseq/systemPipeVARseq.Rmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "VAR-Seq Workflow Template"
author: "Author: Daniela Cassol ([email protected]) and Thomas Girke ([email protected])"
author: "Author: First Last Name"
date: "Last update: `r format(Sys.time(), '%d %B, %Y')`"
output:
BiocStyle::html_document:
Expand Down Expand Up @@ -143,10 +143,13 @@ The `systemPipeR` package needs to be loaded [@H_Backman2016-bt].
```{r load_SPR, message=FALSE, eval=FALSE, spr=TRUE}
# Some samples in the test dataset do not work well in VARseq, and VARseq workflow
# takes long time to process each sample. To better test and speed up the test workflow,
# sample set is reduced to the first 8 samples.
# sample set is reduced to the first 13 samples.
# Please REMOVE the next two lines in your real analysis
cat(crayon::red$bold("Some samples in targets are removed for test workflow. Please change the template to disable this in your real analysis.\n"))
writeLines(readLines("targetsPE.txt")[1:13], "targetsPE.txt")
cat(crayon::blue$bold("To use this workflow, following R packages are expected:\n"))
cat(c("'GenomicFeatures", "VariantAnnotation", "GenomicFeatures", "ggbio", "ggplot2'\n"), sep = "', '")
###pre-end
appendStep(sal) <- LineWise(
code = {
Expand Down Expand Up @@ -957,10 +960,15 @@ appendStep(sal) <- LineWise(
![](results/plot_variant.png)
<div align="center">Figure 3: Plot variants with programmatically.</div></br>

## Version Information
## Workflow Information

```{r sessionInfo}
sessionInfo()
```{r sessionInfo, eval=FALSE, spr=TRUE}
appendStep(sal) <- LineWise(
code = {
sessionInfo()
},
step_name = "sessionInfo",
dependency = "plot_variant")
```

# Running workflow
Expand Down Expand Up @@ -1040,7 +1048,28 @@ making it easier to check any standard output (`stdout`) or standard error
sal <- renderLogs(sal)
```

## Session Info
## Tools used
To check command-line tools used in this workflow, use `listCmdTools`, and use `listCmdModules`
to check if you have a modular system.

The following code will print out tools required in your custom SPR project in the report.
In case you are running the workflow for the first and do not have a project yet, or you
just want to browser this workflow, following code displays the tools required by default.
```{r list_tools}
if(file.exists(file.path(".SPRproject", "SYSargsList.yml"))) {
local({
sal <- systemPipeR::SPRproject(resume = TRUE)
systemPipeR::listCmdTools(sal)
systemPipeR::listCmdModules(sal)
})
} else {
cat(crayon::blue$bold("Tools and modules required by this workflow are:\n"))
cat(c("trimmomatic/0.39", "samtools/1.14", "gatk/4.2.0.0", "bcftools/1.15",
"bwa/0.7.17"), sep = "\n")
}
```

## Report Session Info
This is the session information for rendering this report. To access the session information
of workflow running, check HTML report of `renderLogs`.
```{r report_session_info, eval=TRUE}
Expand Down
620 changes: 340 additions & 280 deletions inst/extdata/workflows/varseq/systemPipeVARseq.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion vignettes/SPblast.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ if(file.exists(file.path(".SPRproject", "SYSargsList.yml"))) {
})
} else {
cat(crayon::blue$bold("Tools and modules required by this workflow are:\n"))
cat(c("BLAST 2.14.0+"), sep = "\n")
cat(c("bowtie2/2.4.5", "samtools/1.14", "macs2"), sep = "\n")
}
```

Expand Down
Loading

0 comments on commit ff35bf3

Please sign in to comment.