This workflow combines several modules to build a workflow for ancient environmental DNA (aeDNA) analyses and QC:
- Filipe G. Vieira
These workflows require:
The easiet way to deploy snakemake is to install pixi and use the included environment.
-
Clone this repository to your local system
-
Test
pixienvironment:pixi run snakemake --version -
Configure workflow according to your needs via editing the file
config/config.yaml. -
Add samples to analyze:
- Add samples to
config/samples.tsv(columnsampleis mandatory). - For each sample, add one or more sequencing units (runs, lanes, libraries or replicates) to
config/units.tsv, as well as adapters used, and path to FASTQ files (if paired-end, useR{Read}to representR1/R2files). - Missing values can be specified by empty columns or by writing
NA. - To facilitate things, the helper script
make_units.pyis provided that, from a list of FASTQ files, generates a folder structure with all necessary files to run (NB: always manually check files before running workflow!).
- Add samples to
-
Define your
TOKEN
export GITHUB_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- Test your configuration:
5.1. Perform a dry-run:
pixi run snakemake --snakefile <path to Snakfile> --configfile config/config.yaml --dry-run
5.2. Confirm workflow analyses by checking the DAG:
pixi run snakemake --snakefile <path to Snakfile> --configfile config/config.yaml --dag | dot -Tsvg > dag.svg
5.3. Optionaly, create all needed conda environments beforehand:
pixi run snakemake --snakefile <path to Snakfile> --configfile config/config.yaml --jobs 1 --conda-create-envs-only
- Execute the workflow, using
$Ncores, either:
6.1. locally:
pixi run snakemake --snakefile <path to Snakfile> --configfile config/config.yaml --jobs $N --software-deployment-method conda
6.2. in a SLURM cluster environment:
pixi run snakemake --snakefile <path to Snakfile> --configfile config/config.yaml --jobs $N --software-deployment-method conda --executor slurm
6.3. Optionally, you can also use binaries from local modules, by adding env-modules to --software-deployment-method:
pixi run snakemake [...] --software-deployment-method env-modules conda [...]
- After successful execution, you can create a self-contained interactive HTML report:
pixi run snakemake --snakefile <path to Snakfile> --configfile config/config.yaml --report report.html