CVUA-RRW/FooDMe

A reproducible and scalable snakemake workflow for the analysis of DNA metabarcoding experiments, with a special focus on food and feed samples.

Overview

Topics: ngs ngs-pipeline metabarcoding targeted-sequencing snakemake food-monitoring public-health food-authenticity workflow pipeline bioinformatics

Latest release: 1.7.2, Last update: 2024-09-19

Linting: linting: passed, Formatting:formatting: failed

Deployment

Step 1: Install Snakemake and Snakedeploy

Snakemake and Snakedeploy are best installed via the Mamba package manager (a drop-in replacement for conda). If you have neither Conda nor Mamba, it is recommended to install Miniforge. More details regarding Mamba can be found here.

When using Mamba, run

mamba create -c conda-forge -c bioconda --name snakemake snakemake snakedeploy

to install both Snakemake and Snakedeploy in an isolated environment. For all following commands ensure that this environment is activated via

conda activate snakemake

Step 2: Deploy workflow

With Snakemake and Snakedeploy installed, the workflow can be deployed as follows. First, create an appropriate project working directory on your system and enter it:

mkdir -p path/to/project-workdir
cd path/to/project-workdir

In all following steps, we will assume that you are inside of that directory. Then run

snakedeploy deploy-workflow https://github.com/CVUA-RRW/FooDMe . --tag 1.7.2

Snakedeploy will create two folders, workflow and config. The former contains the deployment of the chosen workflow as a Snakemake module, the latter contains configuration files which will be modified in the next step in order to configure the workflow to your needs.

Step 3: Configure workflow

To configure the workflow, adapt config/config.yml to your needs following the instructions below.

Step 4: Run workflow

The deployment method is controlled using the --software-deployment-method (short --sdm) argument.

To run the workflow with automatic deployment of all required software via conda/mamba, use

snakemake --cores all --sdm conda

Snakemake will automatically detect the main Snakefile in the workflow subfolder and execute the workflow module that has been defined by the deployment in step 2.

For further options such as cluster and cloud execution, see the docs.

Step 5: Generate report

After finalizing your data analysis, you can automatically generate an interactive visual HTML report for inspection of results together with parameters and code inside of the browser using

snakemake --report report.zip

Configuration

The following section is imported from the workflow’s config/README.md.

Workflow configuration

Configuration

To configure the workflow, modifiy config/config.yaml according to your needs.

For specific details about the parameters check the documentation.

Optimized configuration for 16S birds and mammals metabarcoding

A configuration file with optimized parameters (with no warranty!) for the analysis of 16S metabarcoding experiments of birds and mammals is included in this folder. You will still need to modify the indicated paths to match your own folder structure.

See for reference:

Denay, G.; Preckel, L.; Petersen, H.; Pietsch, K.; Wöhlke, A.; Brünen-Nieweler, C. Benchmarking and Validation of a Bioinformatics Workflow for Meat Species Identification Using 16S rDNA Metabarcoding. Foods 2023, 12, 968. https://doi.org/10.3390/foods12050968

Sample sheet

Add your samples to config/samples.tsv or use the the helper script from Bundes Insitut für Risikobewertung in ressources/creat_sampleSheet.sh.

Reference table

If using the benchmark mode, sdd information for your reference samples in the reference.tsv template. Note that proportions are given as fractions in the [0, 1] interval.

Parameter space exploration configuration

To configure a parameter space exploration analysis, modify the file config_paramspace.yaml according to your needs.

For specific details about the parameters check the documentation.

Linting and formatting

Linting results

None

Formatting results

[DEBUG] 
[DEBUG] 
[DEBUG] In file "/tmp/tmptxei69q1/CVUA-RRW-FooDMe-0aff60e/workflow/rules/reports.smk":  Formatted content is different from original
[DEBUG] 
[DEBUG] 
[DEBUG] 
[DEBUG] 
[DEBUG] 
[DEBUG] In file "/tmp/tmptxei69q1/CVUA-RRW-FooDMe-0aff60e/workflow/rules/vsearch.smk":  Formatted content is different from original
[DEBUG] 
[DEBUG] 
<unknown>:1: SyntaxWarning: invalid escape sequence '\q'
[DEBUG] In file "/tmp/tmptxei69q1/CVUA-RRW-FooDMe-0aff60e/workflow/rules/blast.smk":  Formatted content is different from original
[INFO] 3 file(s) would be changed 😬
[INFO] 6 file(s) would be left unchanged 🎉

snakefmt version: 0.10.2