Skip to content

Commit

Permalink
dev: report addition
Browse files Browse the repository at this point in the history
  • Loading branch information
tdayris committed Nov 22, 2023
1 parent 22ac3c1 commit 7d3386e
Show file tree
Hide file tree
Showing 11 changed files with 77,341 additions and 7 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,10 @@ jobs:
with:
directory: .test
snakefile: workflow/Snakefile
args: "--use-conda --use-singularity --show-failed-logs --cores 2 --conda-cleanup-pkgs cache"
args: "--use-conda --use-singularity --show-failed-logs --cores 2 --conda-cleanup-pkgs cache"
- name: Test report
uses: snakemake/snakemake-github-action@v1.22.0
with:
directory: .test
snakefile: workflow/Snakefile
args: "--use-conda --use-singularity --cores 2 --report report.zip"
6 changes: 3 additions & 3 deletions .snakemake-workflow-catalog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ usage:
flags: FAIR Bowtie2 Sambamba Snakemake Ensembl
software-stack-deployment:
conda: true
singularity: false
singularity+conda: false
report: false
singularity: true
singularity+conda: true
report: true
2 changes: 2 additions & 0 deletions .test/genomes.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
species,build,release
saccharomyces_cerevisiae,R64-1-1,110
7 changes: 6 additions & 1 deletion .test/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@ snakefiles := \


.PHONY: all
all: pipeline.txt
all: report.txt


report.txt: pipeline.txt
mamba activate test-snakemake-wrappers && \
snakemake -s ../workflow/Snakefile \
--report report.html


pipeline.txt: format.txt linter.txt
mamba activate test-snakemake-wrappers && \
Expand Down
77,268 changes: 77,268 additions & 0 deletions .test/report.html

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# 2.1.0

## Features:

* Add report texts

## Documentation

* Fastp citation

# 2.0.0

## Features:
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ The usage of this workflow is described in the [Snakemake workflow catalog](http

### Bowtie2 Mapping

| Step | Meta-Wrapper | Wrapper |
| Step | Meta-Wrapper | Wrapper |
| ------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| Bowtie2-build | [bowtie2-sambamba meta-wrapper](https://snakemake-wrappers.readthedocs.io/en/v2.13.0/meta-wrappers/bowtie2_sambamba.html) | [bowtie2-build](https://snakemake-wrappers.readthedocs.io/en/v2.13.0/wrappers/bowtie2/build.html) |
| Fastp | | [fastp](https://snakemake-wrappers.readthedocs.io/en/stable/wrappers/fastp.html) |
| Bowtie2-align | [bowtie2-sambamba meta-wrapper](https://snakemake-wrappers.readthedocs.io/en/v2.13.0/meta-wrappers/bowtie2_sambamba.html) | [bowtie2-align](https://snakemake-wrappers.readthedocs.io/en/v2.13.0/wrappers/bowtie2/align.html) |
| Sambamba sort | [bowtie2-sambamba meta-wrapper](https://snakemake-wrappers.readthedocs.io/en/v2.13.0/meta-wrappers/bowtie2_sambamba.html) | [sambamba-sort](https://snakemake-wrappers.readthedocs.io/en/v2.13.0/wrappers/sambamba/sort.html) |

Expand Down
6 changes: 6 additions & 0 deletions workflow/report/multiqc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This HTML_ file contains quality reports of both Fastp_ and Picard_.
It is a stand-alone file, and can be opened in your favorite web-browser.

.. _HTML: https://en.wikipedia.org/wiki/HTML
.. _Fastp: https://snakemake-wrappers.readthedocs.io/en/v2.13.0/wrappers/fastp.html
.. _Picard: https://snakemake-wrappers.readthedocs.io/en/stable/wrappers/picard/collectmultiplemetrics.html
31 changes: 31 additions & 0 deletions workflow/report/workflows.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Matierial and methods
=====================

Raw fastq files were trimmed using Fastp_ [#fastppaper]_ . Cleaned reads were aligned
over indexed Ensembl genome with Bowtie2_ [#bowtie2paper]_. Sambamba_ [#sambambapaper]_
was used to sort, filter, mark duplicates, and compress aligned reads. Quality
controls were done using Picard_ [#picardpaper]_. Quality repord produced during both
trimming and mapping steps have been aggregated with MultiQC_ [#multiqcpaper]_. The
whole pipeline was powered by Snakemake_ [#snakemakepaper]_.

This pipeline is freely available on Github_

.. [#fastppaper] Chen, Shifu, et al. "fastp: an ultra-fast all-in-one FASTQ preprocessor." Bioinformatics 34.17 (2018): i884-i890.
.. [#bowtie2paper] Langmead, Ben, and Steven L. Salzberg. "Fast gapped-read alignment with Bowtie 2." Nature methods 9.4 (2012): 357-359.
.. [#sambambapaper] Tarasov, Artem, et al. "Sambamba: fast processing of NGS alignment formats." Bioinformatics 31.12 (2015): 2032-2034.
.. [#picardpaper] McKenna, Aaron, et al. "The Genome Analysis Toolkit: a MapReduce framework for analyzing next-generation DNA sequencing data." Genome research 20.9 (2010): 1297-1303.
.. [#multiqcpaper] Ewels, Philip, et al. "MultiQC: summarize analysis results for multiple tools and samples in a single report." Bioinformatics 32.19 (2016): 3047-3048.
.. [#snakemakepaper] Köster, Johannes, and Sven Rahmann. "Snakemake—a scalable bioinformatics workflow engine." Bioinformatics 28.19 (2012): 2520-2522.
.. _Sambamba: https://snakemake-wrappers.readthedocs.io/en/v2.13.0/wrappers/sambamba.html
.. _Bowtie2: https://snakemake-wrappers.readthedocs.io/en/v2.13.0/wrappers/bowtie2.html
.. _Fastp: https://snakemake-wrappers.readthedocs.io/en/v2.13.0/wrappers/fastp.html
.. _Picard: https://snakemake-wrappers.readthedocs.io/en/v2.13.0/wrappers/picard/collectmultiplemetrics.html
.. _MultiQC: https://snakemake-wrappers.readthedocs.io/en/v2.13.0/wrappers/multiqc.html
.. _Snakemake: https://snakemake.readthedocs.io
.. _Github: https://github.com/tdayris/fair_bowtie2_mapping

:Authors:
Thibault Dayris

:Version: 2.1.0 of 11/22/2023
1 change: 1 addition & 0 deletions workflow/rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ snakemake.utils.validate(genomes, "../schemas/genomes.schema.yaml")

snakemake_wrappers_version: str = "v2.13.0"

report: "../report/workflows.rst"

wildcard_constraints:
sample=r"|".join(samples.sample_id),
Expand Down
6 changes: 5 additions & 1 deletion workflow/rules/multiqc.smk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ rule multiqc_report:
input:
unpack(get_multiqc_report_input),
output:
"results/QC/MultiQC.html",
report(
"results/QC/MultiQC.html",
caption="../report/multiqc.rst",
category="Quality Controls",
),
"results/QC/MultiQC_data.zip",
params:
extra="--zip-data-dir",
Expand Down

0 comments on commit 7d3386e

Please sign in to comment.