Skip to content

nh13/snakemake-pytest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Language Actions Status Code Style Type Checked PEP8 License


Snakemake with Pytest example

This demonstrates how to test your Snakefile with pytest. Snakemake will be run in --dryrun mode to verify that the inputs in the all rule can be generated. It will also make sure there are no syntax errors and run linting (--lint). This is done all programatically (no "shelling out")

Caveats

This does not support the checkpoint directive.

This does not support testing on real data and having the rules actually run. This is something you should do. Set the dryrun parameter to False in the call to snakemake.snakemake. Make sure that your input files "make sense" given the workflow you are running. Also make sure any required software is installed or accessible. For example, a small set of reads in a FASTQ as input over a single exon to test variant calling. And then make sure bwa, samtools, and gatk4 are installed.

Installation

conda env create --file src/environment.yml
  • Activate the snakemake-pytest conda environment
conda activate snakemake-pytest
  • Run the integration tests
bash ci/check.sh

About

Snakemake with pytest example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published