This is a (working) template repository designed for scientific projects where data is processed using Snakemake.
All required tools are automatically installed by Snakemake using conda environments or singularity/apptainer containers, however Snakemake itself needs to be installed first. Load a software module with Snakemake, use a native install, or use the environment.yml file to create a conda environment for this particular project using fx conda env create -n <snakemake_template> -f environment.yml.
Adjust the config.yaml files under both config/ and profiles/ accordingly, then simply run snakemake --profile profiles/<subfolder> or submit a SLURM job using the slurm_submit.sbatch example script.
The usage of this workflow is also described in the Snakemake Workflow Catalog.
- Replace
<owner>and<repo>with the correct values in thisREADME.mdas well as in files under.github/workflows/. - Replace
<snakemake_template>with the workflow/project name (can be the same as<repo>) here as well as in theenvironment.ymlandslurm_submit.sbatchfiles. - Add more requirements to the
environment.ymlfile oryamlfiles underworkflow/envs/if needed. Note that the channel order is important as the default conda config used in the Tests GitHub action has strict mode enabled, and snakemake recommends it.- Consider running
snakemake --containerizeafterwards to generate aDockerfile. A GitHub action will automatically build and publish it.
- Consider running
- Fill in fields in this
README.mdfile, in particular provide a proper description of what the workflow does with any relevant details and configuration. - Enable release-please by allowing GitHub actions to approve pull requests (repo Settings->Actions->General->Check allow at the very bottom)
- The workflow will automatically appear in the public Snakemake workflow catalog once the repository has been made public and the GitHub actions provided with this template repo succeed. The link under "Usage" will point to the usage instructions if
<owner>and<repo>were correctly set. If you don't want to publish the workflow just delete.github/workflows/,.template/, and.snakemake-workflow-catalog.yml. - Consider the license - Choose a license
- Start developing your workflow
- Consider adding a brief summary of all workflow steps to this readme file
- Remember to properly describe all available options in the
config/config.yamlfile in theconfig/README.mdfile - Add minimal test data and a
config/config.yamlfile under.test/for unit tests. - Before commiting anything, always run
snakefmt workflow/rules/*,snakemake --lint, andsnakemake --directory ./test --cores 8to avoid actions failing.
- Lastly, DELETE this TODO section when finished with all of the above!