KasperSkytte/snakemake_savont

Minimalistic amplicon workflow with ASVs generated by savont

Overview

Latest release: v1.0.1, Last update: 2026-02-21

Linting: linting: passed, Formatting: formatting: failed

Deployment

Step 1: Install Snakemake and Snakedeploy

Snakemake and Snakedeploy are best installed via the Conda. It is recommended to install conda via Miniforge. Run

conda create -c conda-forge -c bioconda -c nodefaults --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

For other installation methods, refer to the Snakemake and Snakedeploy documentation.

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/KasperSkytte/snakemake_savont . --tag v1.0.1

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

To run the workflow using apptainer/singularity, use

snakemake --cores all --sdm apptainer

To run the workflow using a combination of conda and apptainer/singularity for software deployment, use

snakemake --cores all --sdm conda apptainer

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.

Configuration

The configuration file config.yaml is used to set various options used throughout the workflow.

Option

Default value

Description

input_dir

".test/nanopore_run_xyz123/fastq_pass"

The input folder is expected to contain a subfolder for each sampleID/barcode, in which all fastq files will be concatenated, and the subfolder names used as sample IDs downstream. For nanopore this is usually the “fastq_pass” folder with demultiplexed reads.

output_dir

"output"

Folder for the results.

tmp_dir

"tmp"

Folder for temporary files, which are deleted by default after a succesful run.

log_dir

"logs"

Folder for logs for each rule.

savont_asv_args

"--minimum-base-quality 25 --quality-value-cutoff 98 --min-read-length 400 --max-read-length 700"

Options passed on to the savont asv command directly, except input, output, and threads.

classify_sintax

True

Whether to classify the ASVs using usearch -sintax.

db_sintax

".test/db_sintax.fa"

Path to the taxonomic reference database used to classify the ASVs in SINTAX format.

classify_sintax_args

"-strand both -sintax_cutoff 0.8"

Options passed on to the usearch -sintax command directly, except input, output, database, and threads.

classify_savont

True

Whether to classify the ASVs using savont classify.

classify_savont_db

"silva"

Which database to use for savont classify. Valid options are "silva" or "emu". Required database files will be automatically downloaded if not present in classify_savont_db_download_dir.

classify_savont_db_download_dir

./databases

Folder for database files used for savont classify.

classify_savont_args

""

Options passed on to the savont classify command directly, except input, output, database, and threads.

max_threads

32

Max number of threads to use for any individual rule. Ensure this is a factor of the --cores value specified when running the workflow to avoid waste.

sample_sep

"_"

Separator used for the usearch -otutab and fastx_relabel commands.

cutadapt_args

"-g AGRGTTYGATYMTGGCTCAG...GTTTGGCACCTCGATGTCG --revcomp --discard-untrimmed"

Options passed on to cutadapt directly. Input, output, and threads are added automatically. This is required for trimming and orienting reads correctly according to primers. To skip the cutadapt step simply set this to "".

rarefy_abund_table

False

Whether to also produce a rarefied abundance table or not.

rarefy_sample_size

2000

Rarefy abundance table to an equal sample size. Both a rarefied and an unrarefied abundance table will be generated.

Have a look in the .test directory for minimal example files.

Linting and formatting

Linting results

All tests passed!

Formatting results

 1[DEBUG] 
 2[DEBUG] 
 3[DEBUG] 
 4[DEBUG] In file "/tmp/tmp5gwrd9iw/KasperSkytte-snakemake_savont-f7cbf61/workflow/Snakefile":  Formatted content is different from original
 5[DEBUG] 
 6[DEBUG] 
 7[INFO] 1 file(s) would be changed 😬
 8[INFO] 4 file(s) would be left unchanged 🎉
 9
10snakefmt version: 0.11.4