niekwit/cut_and_run
Snakemake workflow for Cut & Run
Overview
Latest release: v0.5.0, Last update: 2026-01-08
Linting: linting: failed, Formatting: formatting: failed
Topics: bioinformatics ngs-analysis snakemake snakemake-workflow
Wrappers: bio/bedtools/intersect bio/bowtie2/build bio/cutadapt/pe bio/fastqc bio/picard/markduplicates bio/samtools/faidx bio/samtools/index bio/samtools/sort bio/trim_galore/pe
Deployment
Step 1: Install Snakemake and Snakedeploy
Snakemake and Snakedeploy are best installed via the Conda. It is recommended to install conda via Miniforge. Run
conda create -c conda-forge -c bioconda -c nodefaults --name snakemake snakemake snakedeploy
to install both Snakemake and Snakedeploy in an isolated environment. For all following commands ensure that this environment is activated via
conda activate snakemake
For other installation methods, refer to the Snakemake and Snakedeploy documentation.
Step 2: Deploy workflow
With Snakemake and Snakedeploy installed, the workflow can be deployed as follows. First, create an appropriate project working directory on your system and enter it:
mkdir -p path/to/project-workdir
cd path/to/project-workdir
In all following steps, we will assume that you are inside of that directory. Then run
snakedeploy deploy-workflow https://github.com/niekwit/cut_and_run . --tag v0.5.0
Snakedeploy will create two folders, workflow and config. The former contains the deployment of the chosen workflow as a Snakemake module, the latter contains configuration files which will be modified in the next step in order to configure the workflow to your needs.
Step 3: Configure workflow
To configure the workflow, adapt config/config.yml to your needs following the instructions below.
Step 4: Run workflow
The deployment method is controlled using the --software-deployment-method (short --sdm) argument.
To run the workflow with automatic deployment of all required software via conda/mamba, use
snakemake --cores all --sdm conda
Snakemake will automatically detect the main Snakefile in the workflow subfolder and execute the workflow module that has been defined by the deployment in step 2.
For further options such as cluster and cloud execution, see the docs.
Step 5: Generate report
After finalizing your data analysis, you can automatically generate an interactive visual HTML report for inspection of results together with parameters and code inside of the browser using
snakemake --report report.zip
Configuration
The following section is imported from the workflow’s config/README.md.
Describe how to configure the workflow (using config.yaml and maybe additional files). All of them need to be present with example entries inside of the config folder.
Linting and formatting
Linting results
1/tmp/tmptbhtycw5/niekwit-cut_and_run-dd734ee/workflow/scripts/general_functions.smk:139: SyntaxWarning: invalid escape sequence '\d'
2 if not re.match(".*_[\d]$", sample):
3/tmp/tmptbhtycw5/niekwit-cut_and_run-dd734ee/workflow/scripts/general_functions.smk:210: SyntaxWarning: invalid escape sequence '\d'
4 conditions = list(set(re.sub("_[\d]$", "", x) for x in csv["sample"].tolist()))
5ValueError in file "/tmp/tmptbhtycw5/niekwit-cut_and_run-dd734ee/workflow/scripts/general_functions.smk", line 156:
6Following files not found:
7reads/WT_1_R1_001.fastq.gz
8reads/WT_1_R2_001.fastq.gz
9reads/WT_2_R1_001.fastq.gz
10reads/WT_2_R2_001.fastq.gz
11 File "/tmp/tmptbhtycw5/niekwit-cut_and_run-dd734ee/workflow/Snakefile", line 28, in <module>
12 File "/tmp/tmptbhtycw5/niekwit-cut_and_run-dd734ee/workflow/scripts/general_functions.smk", line 156, in samples
Formatting results
1[DEBUG]
2[DEBUG] In file "/tmp/tmptbhtycw5/niekwit-cut_and_run-dd734ee/workflow/rules/scale_factors.smk": Formatted content is different from original
3[DEBUG]
4[DEBUG] In file "/tmp/tmptbhtycw5/niekwit-cut_and_run-dd734ee/workflow/rules/deeptools.smk": Formatted content is different from original
5[DEBUG]
6[DEBUG] In file "/tmp/tmptbhtycw5/niekwit-cut_and_run-dd734ee/workflow/rules/fastqc.smk": Formatted content is different from original
7[DEBUG]
8[DEBUG] In file "/tmp/tmptbhtycw5/niekwit-cut_and_run-dd734ee/workflow/rules/bigwig.smk": Formatted content is different from original
9[DEBUG]
10[WARNING] In file "/tmp/tmptbhtycw5/niekwit-cut_and_run-dd734ee/workflow/Snakefile": Keyword "input" at line 48 has comments under a value.
11 PEP8 recommends block comments appear before what they describe
12(see https://www.python.org/dev/peps/pep-0008/#id30)
13[DEBUG] In file "/tmp/tmptbhtycw5/niekwit-cut_and_run-dd734ee/workflow/Snakefile": Formatted content is different from original
14[DEBUG]
15[WARNING] In file "/tmp/tmptbhtycw5/niekwit-cut_and_run-dd734ee/workflow/rules/mapping.smk": Keyword "shell" at line 34 has comments under a value.
16 PEP8 recommends block comments appear before what they describe
17(see https://www.python.org/dev/peps/pep-0008/#id30)
18[WARNING] In file "/tmp/tmptbhtycw5/niekwit-cut_and_run-dd734ee/workflow/rules/mapping.smk": Keyword "shell" at line 108 has comments under a value.
19 PEP8 recommends block comments appear before what they describe
20(see https://www.python.org/dev/peps/pep-0008/#id30)
21[DEBUG] In file "/tmp/tmptbhtycw5/niekwit-cut_and_run-dd734ee/workflow/rules/mapping.smk": Formatted content is different from original
22[DEBUG]
23[WARNING] In file "/tmp/tmptbhtycw5/niekwit-cut_and_run-dd734ee/workflow/rules/peaks.smk": Keyword "output" at line 15 has comments under a value.
24 PEP8 recommends block comments appear before what they describe
25(see https://www.python.org/dev/peps/pep-0008/#id30)
26[WARNING] In file "/tmp/tmptbhtycw5/niekwit-cut_and_run-dd734ee/workflow/rules/peaks.smk": Keyword "output" at line 72 has comments under a value.
27 PEP8 recommends block comments appear before what they describe
28(see https://www.python.org/dev/peps/pep-0008/#id30)
29[WARNING] In file "/tmp/tmptbhtycw5/niekwit-cut_and_run-dd734ee/workflow/rules/peaks.smk": Keyword "output" at line 133 has comments under a value.
30 PEP8 recommends block comments appear before what they describe
31(see https://www.python.org/dev/peps/pep-0008/#id30)
32[WARNING] In file "/tmp/tmptbhtycw5/niekwit-cut_and_run-dd734ee/workflow/rules/peaks.smk": Keyword "output" at line 190 has comments under a value.
33 PEP8 recommends block comments appear before what they describe
34(see https://www.python.org/dev/peps/pep-0008/#id30)
35[WARNING] In file "/tmp/tmptbhtycw5/niekwit-cut_and_run-dd734ee/workflow/rules/peaks.smk": Keyword "output" at line 247 has comments under a value.
36 PEP8 recommends block comments appear before what they describe
37(see https://www.python.org/dev/peps/pep-0008/#id30)
38[WARNING] In file "/tmp/tmptbhtycw5/niekwit-cut_and_run-dd734ee/workflow/rules/peaks.smk": Keyword "output" at line 299 has comments under a value.
39 PEP8 recommends block comments appear before what they describe
40(see https://www.python.org/dev/peps/pep-0008/#id30)
41[WARNING] In file "/tmp/tmptbhtycw5/niekwit-cut_and_run-dd734ee/workflow/rules/peaks.smk": Keyword "shell" at line 314 has comments under a value.
42 PEP8 recommends block comments appear before what they describe
43(see https://www.python.org/dev/peps/pep-0008/#id30)
44[DEBUG] In file "/tmp/tmptbhtycw5/niekwit-cut_and_run-dd734ee/workflow/rules/peaks.smk": Formatted content is different from original
45[DEBUG]
46[WARNING] In file "/tmp/tmptbhtycw5/niekwit-cut_and_run-dd734ee/workflow/rules/resources.smk": Keyword "shell" at line 51 has comments under a value.
47 PEP8 recommends block comments appear before what they describe
48(see https://www.python.org/dev/peps/pep-0008/#id30)
49[DEBUG] In file "/tmp/tmptbhtycw5/niekwit-cut_and_run-dd734ee/workflow/rules/resources.smk": Formatted content is different from original
50[DEBUG]
51[DEBUG] In file "/tmp/tmptbhtycw5/niekwit-cut_and_run-dd734ee/workflow/rules/deduplication.smk": Formatted content is different from original
52[DEBUG]
53[DEBUG] In file "/tmp/tmptbhtycw5/niekwit-cut_and_run-dd734ee/workflow/rules/trimming.smk": Formatted content is different from original
54[DEBUG]
55[DEBUG] In file "/tmp/tmptbhtycw5/niekwit-cut_and_run-dd734ee/workflow/rules/plotting.smk": Formatted content is different from original
56[INFO] 11 file(s) would be changed 😬
57
58snakefmt version: 0.11.2