Skip to content

Commit

Permalink
finish up readme
Browse files Browse the repository at this point in the history
  • Loading branch information
KasperSkytte committed Jan 10, 2024
1 parent b2799ea commit 25121f6
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 19 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# Snakemake workflow: `<name>`
# Snakemake workflow: `<snakemake_template>`

[![Snakemake](https://img.shields.io/badge/snakemake-≥6.3.0-brightgreen.svg)](https://snakemake.github.io)
[![Snakemake](https://img.shields.io/badge/snakemake-≥7.18.2-brightgreen.svg)](https://snakemake.github.io)
[![GitHub actions status](https://github.com/<owner>/<repo>/workflows/Tests/badge.svg?branch=main)](https://github.com/<owner>/<repo>/actions?query=branch%3Amain+workflow%3ATests)

This is a template repository designed for scientific projects where data is processed using [Snakemake](https://snakemake.readthedocs.io/).

A Snakemake workflow for `<description>`

## Requirements
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 `mamba env create -n <snakemake_template> -f environment.yml`.

## Usage

The usage of this workflow is described in the [Snakemake Workflow Catalog](https://snakemake.github.io/snakemake-workflow-catalog/?usage=<owner>%2F<repo>).

If you use this workflow in a paper, don't forget to give credits to the authors by citing the URL of this (original) <repo>sitory and its DOI (see above).
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](https://snakemake.github.io/snakemake-workflow-catalog/?usage=<owner>%2F<repo>).

# TODO

* Replace `<owner>` and `<repo>` everywhere in the template (also under .github/workflows) with the correct `<repo>` name and owning user or organization.
* Replace `<name>` with the workflow name (can be the same as `<repo>`).
* Replace `<description>` with a description of what the workflow does.
* The workflow will occur in the snakemake-workflow-catalog once it has been made public. Then the link under "Usage" will point to the usage instructions if `<owner>` and `<repo>` were correctly set.
* Replace `<owner>` and `<repo>` with the correct values in this `README.md` as 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 the `environment.yml` and `slurm_submit.sbatch` files.
* Add more requirements to the `environment.yml` file if needed, however tools for each Snakemake rule should **NOT** go here, they should be configured separately for each rule instead in `yaml` files under `envs/`.
* Fill in fields in this `README.md` file, in particular provide a proper description of what the workflow does with any relevant details and configuration.
* The workflow will occur in the public Snakemake workflow catalog once the repository has been made public and the provided GitHub actions finish correctly. Then the link under "Usage" will point to the usage instructions if `<owner>` and `<repo>` were correctly set.
* DELETE this **TODO** section when finished with all of the above.
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: snakemake_template
name: <snakemake_template>
channels:
- bioconda
- conda-forge
Expand Down
5 changes: 3 additions & 2 deletions profiles/biocloud/config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#command with which to start SLURM jobs
#command with which to submit rules as SLURM jobs
cluster:
mkdir -p logs/{rule}/ &&
sbatch
Expand Down Expand Up @@ -31,4 +31,5 @@ rerun-incomplete: True
scheduler: greedy
max-status-checks-per-second: 5
cluster-cancel: scancel
cluster-status: extras/slurm-status.sh #script to get job status for snakemake
#script to get job status for snakemake, unfortunately neccessary
cluster-status: extras/slurm-status.sh
6 changes: 3 additions & 3 deletions slurm_submit.sbatch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/bash -l
#SBATCH --job-name=snakemake_template
#SBATCH --job-name=<snakemake_template>
#SBATCH --output=job_%j_%x.out
#SBATCH --nodes=1
#SBATCH --ntasks=1
Expand All @@ -14,7 +14,7 @@
set -eu

# Activate conda environment with only snakemake
conda activate snakemake_template
conda activate <snakemake_template>

# Start workflow using ressources defined in the profile. Snakemake itself
# requires nothing, 1CPU + 1G mem is enough
Expand All @@ -23,7 +23,7 @@ conda activate snakemake_template
snakemake --dag | dot -Tsvg > results/dag.svg

# Main workflow
snakemake --forceall --profile profiles/biocloud
snakemake --profile profiles/biocloud

# Optionally generate a report once finished
snakemake --report results/report.html

0 comments on commit 25121f6

Please sign in to comment.