Wheeler-Lab/InDelCoordinateCorrection
None
Overview
Topics:
Latest release: None, Last update: 2023-06-23
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/Wheeler-Lab/InDelCoordinateCorrection . --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
.
Configuration
In order to use this workflow, you need to customise the given example config/config.yaml
file for your purposes. Please see the example here:
samples_directory: resources/samples # This could be customized to any directory in which the sequencing samples are stored.
experiments:
reference:
genome_sequence: resources/reference_genome_sequence.fasta # The fasta and gff files need to be provided (TriTrypDB sequence files can be automatically downloaded).
genome_annotations: resources/reference_genome_annotations.gff
cellline1:
parent: reference
samples:
- SRR0000000 # samples can alternatively be SRA accession numbers, which will be automatically downloaded.
- cellline1_run2
cellline2:
parent: reference
samples:
- cellline2_run1 # This is assumed to refer to the paired end fastq files <samples_directory>/cellline2/cellline2_run1_1.fq.gz and <samples_directory>/cellline2/cellline2_run1_2.fq.gz
- cellline2_run2
cellline1_clone1:
parent: cellline1
samples:
- cellline1_clone1_run1
- cellline1_clone1_run2
cellline1_clone2:
parent: cellline1
samples:
- cellline1_clone2_run1
- cellline1_clone2_run2
cellline2_clone1:
parent: cellline2
samples:
- cellline2_clone1_run1
- cellline2_clone1_run2
cellline2_clone2:
parent: cellline2
samples:
- cellline2_clone2_run1
- cellline2_clone2_run2
Details
-
samples_directory
: This points to the location of the sequencing samples fastq files. It could be anywhere, but is usually inresources/samples
. -
experiments
: This is a list of cell lines describing the relationship tree we want to analyse. Every entry underneath is the name of a cell line. -
genome_sequence
: For reference genomes, this is the location of the.fasta
file holding the genome sequence. It's not needed for any other entry in theexperiments
list, only for reference genomes. In special cases, this can be downloaded automatically (see below). -
genome_annotations
: Similar togenome_sequence
, this is the location of the.gff
file holding the genome annotation features. -
parent
: This gives the name of the cell line entry of the parent of the current cell line. If it is not given, the current entry is assumed to be a reference genome. -
samples
: Holds a list of sequencing samples associated with this cell line entry. Any entry in this list can be in the form ofSRR123456789
when it is assumed to be an SRA accession number and will be automatically downloaded. Otherwise, if given ascellline1_clone1_run1
, it is assumed to refer to the paired-end fastq files in the location<samples_directory>/cellline1_clone1_run1_1.fq.gz
and<samples_directory>/cellline1_clone1_run1_2.fq.gz
.
Automatic downloading from TriTrypDB
If the genome_sequence
entry is of the form TriTrypDB-<version>_<organism>_Genome.fasta
, it will be automatically downloaded from TriTrypDB.
Linting and formatting
Linting results
1Lints for snakefile /tmp/tmpdnafr6_8/workflow/Snakefile:
2 * Mixed rules and functions in same snakefile.:
3 Small one-liner functions used only once should be defined as lambda
4 expressions. Other functions should be collected in a common module, e.g.
5 'rules/common.smk'. This makes the workflow steps more readable.
6 Also see:
7 https://snakemake.readthedocs.io/en/latest/snakefiles/modularization.html#includes
8
9Lints for rule download_tryptrypdb_fasta (line 22, /tmp/tmpdnafr6_8/workflow/Snakefile):
10 * No log directive defined:
11 Without a log directive, all output will be printed to the terminal. In
12 distributed environments, this means that errors are harder to discover.
13 In local environments, output of concurrent jobs will be mixed and become
14 unreadable.
15 Also see:
16 https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
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 download_sra (line 42, /tmp/tmpdnafr6_8/workflow/Snakefile):
25 * No log directive defined:
26 Without a log directive, all output will be printed to the terminal. In
27 distributed environments, this means that errors are harder to discover.
28 In local environments, output of concurrent jobs will be mixed and become
29 unreadable.
30 Also see:
31 https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
32
33Lints for rule uncompress (line 85, /tmp/tmpdnafr6_8/workflow/Snakefile):
34 * No log directive defined:
35 Without a log directive, all output will be printed to the terminal. In
36 distributed environments, this means that errors are harder to discover.
37 In local environments, output of concurrent jobs will be mixed and become
38 unreadable.
39 Also see:
40 https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
41 * Specify a conda environment or container for each rule.:
42 This way, the used software for each specific step is documented, and the
43 workflow can be executed on any machine without prerequisites.
44 Also see:
45 https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#integrated-package-management
46 https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#running-jobs-in-containers
47
48Lints for rule rcorrector (line 118, /tmp/tmpdnafr6_8/workflow/Snakefile):
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 filter_rcorrector_reads (line 153, /tmp/tmpdnafr6_8/workflow/Snakefile):
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 * Migrate long run directives into scripts or notebooks:
66 Long run directives hamper workflow readability. Use the script or
67 notebook directive instead. Note that the script or notebook directive
68 does not involve boilerplate. Similar to run, you will have direct access
69 to params, input, output, and wildcards.Only use the run directive for a
70 handful of lines.
71 Also see:
72 https://snakemake.readthedocs.io/en/latest/snakefiles/rules.html#external-scripts
73 https://snakemake.readthedocs.io/en/latest/snakefiles/rules.html#jupyter-notebook-integration
74
75Lints for rule trim_galore (line 223, /tmp/tmpdnafr6_8/workflow/Snakefile):
76 * No log directive defined:
77 Without a log directive, all output will be printed to the terminal. In
78 distributed environments, this means that errors are harder to discover.
79 In local environments, output of concurrent jobs will be mixed and become
80 unreadable.
81 Also see:
82 https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
83
84Lints for rule pilon_polish (line 366, /tmp/tmpdnafr6_8/workflow/Snakefile):
85 * No log directive defined:
86 Without a log directive, all output will be printed to the terminal. In
87 distributed environments, this means that errors are harder to discover.
88 In local environments, output of concurrent jobs will be mixed and become
89 unreadable.
90 Also see:
91 https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
92
93Lints for rule fasta_remove_pilon_suffix (line 402, /tmp/tmpdnafr6_8/workflow/Snakefile):
94 * No log directive defined:
95 Without a log directive, all output will be printed to the terminal. In
96 distributed environments, this means that errors are harder to discover.
97 In local environments, output of concurrent jobs will be mixed and become
98 unreadable.
99 Also see:
100 https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
101 * Specify a conda environment or container for each rule.:
102 This way, the used software for each specific step is documented, and the
103 workflow can be executed on any machine without prerequisites.
104 Also see:
105 https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#integrated-package-management
106 https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#running-jobs-in-containers
107
108Lints for rule coordinate_shifts (line 421, /tmp/tmpdnafr6_8/workflow/Snakefile):
109 * No log directive defined:
110 Without a log directive, all output will be printed to the terminal. In
111 distributed environments, this means that errors are harder to discover.
112 In local environments, output of concurrent jobs will be mixed and become
113 unreadable.
114 Also see:
115 https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
Formatting results
1[DEBUG]
2[DEBUG] In file "/tmp/tmpdnafr6_8/workflow/Snakefile": Formatted content is different from original
3[INFO] 1 file(s) would be changed 😬
4
5snakefmt version: 0.8.4