richardstoeckl/basecallNanopore
Snakemake Pipeline to automatically basecall Nanopore sequencing data with hybrid approach of simplex and duplex basecalling
Overview
Topics:
Latest release: v1.0.2, Last update: 2024-05-27
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/richardstoeckl/basecallNanopore . --tag v1.0.2
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
.
To configure this workflow, modify config/config.yaml
according to your needs, following the explanations provided in the file.
Here you should provide the paths to your intermediary/results/logs directories. The interim
directory will contain larger intermediary files. The results
directory will contain the final output of the pipeline. The log
directory will be used to store the log files for each step.
Here you should also write the name of your run file (see relevant section below).
Here you should give the paths to your guppy and/or dorado installation. Additionally you should change the given parameters to suit your compute setup.
The setup of the basecall runs is specified via comma-separated values files (.csv
).
Missing values can be specified by empty columns.
Depending on what you enter here, the pipeline will automatically adjust what will be done (e.g. which basecaller will be used and how many barcodes will be used).
You can use the config/runs_test.csv
file as a template.
Linting and formatting
Linting results
1Lints for snakefile /tmp/tmpmxvhfajh/richardstoeckl-basecallNanopore-8d272b1/workflow/rules/basecall.smk:
2 * Absolute path "/{barcode}_readIDs.txt" in line 320:
3 Do not define absolute paths inside of the workflow, since this renders
4 your workflow irreproducible on other machines. Use path relative to the
5 working directory instead, or make the path configurable via a config
6 file.
7 Also see:
8 https://snakemake.readthedocs.io/en/latest/snakefiles/configuration.html#configuration
9 * Mixed rules and functions in same snakefile.:
10 Small one-liner functions used only once should be defined as lambda
11 expressions. Other functions should be collected in a common module, e.g.
12 'rules/common.smk'. This makes the workflow steps more readable.
13 Also see:
14 https://snakemake.readthedocs.io/en/latest/snakefiles/modularization.html#includes
15
16Lints for rule guppy_simplex (line 34, /tmp/tmpmxvhfajh/richardstoeckl-basecallNanopore-8d272b1/workflow/rules/basecall.smk):
17 * Specify a conda environment or container for each rule.:
18 This way, the used software for each specific step is documented, and the
19 workflow can be executed on any machine without prerequisites.
20 Also see:
21 https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#integrated-package-management
22 https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#running-jobs-in-containers
23
24Lints for rule guppy_duplex (line 204, /tmp/tmpmxvhfajh/richardstoeckl-basecallNanopore-8d272b1/workflow/rules/basecall.smk):
25 * Specify a conda environment or container for each rule.:
26 This way, the used software for each specific step is documented, and the
27 workflow can be executed on any machine without prerequisites.
28 Also see:
29 https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#integrated-package-management
30 https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#running-jobs-in-containers
31
32Lints for rule concatenateGuppy (line 327, /tmp/tmpmxvhfajh/richardstoeckl-basecallNanopore-8d272b1/workflow/rules/basecall.smk):
33 * No log directive defined:
34 Without a log directive, all output will be printed to the terminal. In
35 distributed environments, this means that errors are harder to discover.
36 In local environments, output of concurrent jobs will be mixed and become
37 unreadable.
38 Also see:
39 https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
40 * Specify a conda environment or container for each rule.:
41 This way, the used software for each specific step is documented, and the
42 workflow can be executed on any machine without prerequisites.
43 Also see:
44 https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#integrated-package-management
45 https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#running-jobs-in-containers
46
47Lints for rule joinGuppySimplexAndDuplex (line 363, /tmp/tmpmxvhfajh/richardstoeckl-basecallNanopore-8d272b1/workflow/rules/basecall.smk):
48 * No log directive defined:
49 Without a log directive, all output will be printed to the terminal. In
50 distributed environments, this means that errors are harder to discover.
51 In local environments, output of concurrent jobs will be mixed and become
52 unreadable.
53 Also see:
54 https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
55 * Specify a conda environment or container for each rule.:
56 This way, the used software for each specific step is documented, and the
57 workflow can be executed on any machine without prerequisites.
58 Also see:
59 https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#integrated-package-management
60 https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#running-jobs-in-containers
61
62Lints for rule dorado_download (line 426, /tmp/tmpmxvhfajh/richardstoeckl-basecallNanopore-8d272b1/workflow/rules/basecall.smk):
63 * Specify a conda environment or container for each rule.:
64 This way, the used software for each specific step is documented, and the
65 workflow can be executed on any machine without prerequisites.
66 Also see:
67 https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#integrated-package-management
68 https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#running-jobs-in-containers
69
70Lints for rule dorado_simplex (line 463, /tmp/tmpmxvhfajh/richardstoeckl-basecallNanopore-8d272b1/workflow/rules/basecall.smk):
71 * Specify a conda environment or container for each rule.:
72 This way, the used software for each specific step is documented, and the
73 workflow can be executed on any machine without prerequisites.
74 Also see:
75 https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#integrated-package-management
76 https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#running-jobs-in-containers
77
78Lints for rule getReadIDsPerBarcode (line 525, /tmp/tmpmxvhfajh/richardstoeckl-basecallNanopore-8d272b1/workflow/rules/basecall.smk):
79 * No log directive defined:
80 Without a log directive, all output will be printed to the terminal. In
81 distributed environments, this means that errors are harder to discover.
82 In local environments, output of concurrent jobs will be mixed and become
83 unreadable.
84 Also see:
85 https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
86 * Specify a conda environment or container for each rule.:
87 This way, the used software for each specific step is documented, and the
88 workflow can be executed on any machine without prerequisites.
89 Also see:
90 https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#integrated-package-management
91 https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#running-jobs-in-containers
92
93Lints for rule dorado_duplex (line 576, /tmp/tmpmxvhfajh/richardstoeckl-basecallNanopore-8d272b1/workflow/rules/basecall.smk):
94 * Specify a conda environment or container for each rule.:
95 This way, the used software for each specific step is documented, and the
96 workflow can be executed on any machine without prerequisites.
97 Also see:
98 https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#integrated-package-management
99 https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#running-jobs-in-containers
Formatting results
1[DEBUG]
2[DEBUG]
3[DEBUG] In file "/tmp/tmpmxvhfajh/richardstoeckl-basecallNanopore-8d272b1/workflow/rules/basecall.smk": Formatted content is different from original
4[DEBUG]
5[INFO] 1 file(s) would be changed 😬
6[INFO] 2 file(s) would be left unchanged 🎉
7
8snakefmt version: 0.10.2