Example of a snakemake project
Download the repository from github
git clone https://github.com/LUMC/freebayes-snakemake.git
Install and activate the conda environment.
conda env create --file environment.yml
conda activate freebayes-snakemake
There are three levels where configuration options are set, in decreasing order of priority.
- Flags passed to snakemake using
--config
, or in the specified--configfile
. - Setting specified in the PEP project configuration, under the key
freebayes-snakemake
. - The default settings for the pipeline, as specified in the
common.smk
file.
The pipeline requires a single PEP configuration file, which specifies a csv sample table and a reference (example).
If you have multiple read pairs per sample, you can also specify a subsample table, with one line for each read pair (example).
Option | Type | Explanation |
---|---|---|
reference | Required file | Indexed reference file to use with mapping and variant calling |
capture_bed | Optional file | Add a section for picard CollectHsMetrics to the MultiQC report by specifying a capture bed file |
Use the following commands to activate the conda environment for the pipeline,
and run the example project configuration. This will create two output
folders, sample1
and sample2
, as well as a log
folder that contains
the log files from the pipeline.
conda activate freebayes-snakemake
snakemake --cores 1 --use-singularity --config pepfile=tests/pep/project_config.yaml
If you want to preserve the intermediate files of the pipeline, you can run
Snakemake with the --notemp
flag. Otherwise, all intermediate files will be
removed when they are no longer needed.