lacklab/epens-snakemake
Snakemake pipeline for the analysis of ePENS (ChIP-exo) data
Overview
Topics:
Latest release: None, Last update: 2024-11-18
Linting: linting: failed, Formatting: formatting: failed
Deployment
Step 1: Install Snakemake and Snakedeploy
Snakemake and Snakedeploy are best installed via the Mamba package manager (a drop-in replacement for conda). If you have neither Conda nor Mamba, it is recommended to install Miniforge. More details regarding Mamba can be found here.
When using Mamba, run
mamba create -c conda-forge -c bioconda --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
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/lacklab/epens-snakemake . --tag None
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
.
Edit these files:
-
config.yaml
: The config file. Only used parameters are:
SAMPLES
which points to samples.tsv
BWA_INDEX
which points to the BWA index prefix
CHR_SIZES
which points to the chrom.sizes file (formatted as tab-separated; chrom name in the 1st column, size in the 2nd)
-
samples.tsv
: A tab-separated file with the following example should be provided to specify the units (technical replicates or lanes):
sample | unit | fq1 | fq2 |
---|---|---|---|
N1_rep1 | 1 | data/SRR653223_1.fastq.gz | data/SRR653223_2.fastq.gz |
N1_rep2 | 1 | data/SRR653224_1.fastq.gz | data/SRR653224_2.fastq.gz |
sample: Sample name (same as in samples.tsv)
unit: Unit (tech. rep such as sequencing lane) no
fq1: Path to the 1st FASTQ file
fq2: Path to the 2nd FASTQ file
IF THE FILE DOESN'T EXIST, IT WILL TRY TO DOWNLOAD FROM SRA USING PREFETCH
Linting and formatting
Linting results
1/tmp/tmpo5brfeum/workflow/rules/signal.smk:49: SyntaxWarning: invalid escape sequence '\/'
2/tmp/tmpo5brfeum/workflow/rules/signal.smk:63: SyntaxWarning: invalid escape sequence '\/'
3Lints for rule prefetch (line 1, /tmp/tmpo5brfeum/workflow/rules/sra.smk):
4 * No log directive defined:
5 Without a log directive, all output will be printed to the terminal. In
6 distributed environments, this means that errors are harder to discover.
7 In local environments, output of concurrent jobs will be mixed and become
8 unreadable.
9 Also see:
10 https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
11
12Lints for rule dump_fastq (line 11, /tmp/tmpo5brfeum/workflow/rules/sra.smk):
13 * No log directive defined:
14 Without a log directive, all output will be printed to the terminal. In
15 distributed environments, this means that errors are harder to discover.
16 In local environments, output of concurrent jobs will be mixed and become
17 unreadable.
18 Also see:
19 https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
20
21Lints for rule bwa_mem_samblaster (line 1, /tmp/tmpo5brfeum/workflow/rules/map.smk):
22 * No log directive defined:
23 Without a log directive, all output will be printed to the terminal. In
24 distributed environments, this means that errors are harder to discover.
25 In local environments, output of concurrent jobs will be mixed and become
26 unreadable.
27 Also see:
28 https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
29
30Lints for rule merge_DNA_treplicates (line 15, /tmp/tmpo5brfeum/workflow/rules/map.smk):
31 * No log directive defined:
32 Without a log directive, all output will be printed to the terminal. In
33 distributed environments, this means that errors are harder to discover.
34 In local environments, output of concurrent jobs will be mixed and become
35 unreadable.
36 Also see:
37 https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
38
39Lints for rule filter (line 31, /tmp/tmpo5brfeum/workflow/rules/map.smk):
40 * No log directive defined:
41 Without a log directive, all output will be printed to the terminal. In
42 distributed environments, this means that errors are harder to discover.
43 In local environments, output of concurrent jobs will be mixed and become
44 unreadable.
45 Also see:
46 https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
47
48Lints for rule bamtobed (line 1, /tmp/tmpo5brfeum/workflow/rules/signal.smk):
49 * No log directive defined:
50 Without a log directive, all output will be printed to the terminal. In
51 distributed environments, this means that errors are harder to discover.
52 In local environments, output of concurrent jobs will be mixed and become
53 unreadable.
54 Also see:
55 https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
56
57Lints for rule get_signals (line 11, /tmp/tmpo5brfeum/workflow/rules/signal.smk):
58 * No log directive defined:
59 Without a log directive, all output will be printed to the terminal. In
60 distributed environments, this means that errors are harder to discover.
61 In local environments, output of concurrent jobs will be mixed and become
62 unreadable.
63 Also see:
64 https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
65 * Specify a conda environment or container for each rule.:
66 This way, the used software for each specific step is documented, and the
67 workflow can be executed on any machine without prerequisites.
68 Also see:
69 https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#integrated-package-management
70 https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#running-jobs-in-containers
71
72Lints for rule convert_to_bw (line 34, /tmp/tmpo5brfeum/workflow/rules/signal.smk):
73 * No log directive defined:
74 Without a log directive, all output will be printed to the terminal. In
75 distributed environments, this means that errors are harder to discover.
76 In local environments, output of concurrent jobs will be mixed and become
77 unreadable.
78 Also see:
79 https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
80
81Lints for rule run_epest (line 1, /tmp/tmpo5brfeum/workflow/rules/epest.smk):
82 * No log directive defined:
83 Without a log directive, all output will be printed to the terminal. In
84 distributed environments, this means that errors are harder to discover.
85 In local environments, output of concurrent jobs will be mixed and become
86 unreadable.
87 Also see:
88 https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
Formatting results
1[DEBUG]
2[DEBUG] In file "/tmp/tmpo5brfeum/workflow/rules/epest.smk": Formatted content is different from original
3[DEBUG]
4[DEBUG] In file "/tmp/tmpo5brfeum/workflow/Snakefile": Formatted content is different from original
5[DEBUG]
6<unknown>:1: SyntaxWarning: invalid escape sequence '\/'
7[DEBUG] In file "/tmp/tmpo5brfeum/workflow/rules/signal.smk": Formatted content is different from original
8[DEBUG]
9[DEBUG] In file "/tmp/tmpo5brfeum/workflow/rules/map.smk": Formatted content is different from original
10[DEBUG]
11[DEBUG] In file "/tmp/tmpo5brfeum/workflow/rules/common.smk": Formatted content is different from original
12[DEBUG]
13[DEBUG] In file "/tmp/tmpo5brfeum/workflow/rules/sra.smk": Formatted content is different from original
14[INFO] 6 file(s) would be changed 😬
15
16snakefmt version: 0.10.2