simonmoulds/uk-decadal-flood-prediction-lstm

None

Overview

Topics:

Latest release: None, Last update: 2022-09-01

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/simonmoulds/uk-decadal-flood-prediction-lstm . --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.

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

  1Lints for rule obs_input (line 31, /tmp/tmp8k5x7agg/workflow/Snakefile):
  2    * No log directive defined:
  3      Without a log directive, all output will be printed to the terminal. In
  4      distributed environments, this means that errors are harder to discover.
  5      In local environments, output of concurrent jobs will be mixed and become
  6      unreadable.
  7      Also see:
  8      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
  9    * Param outputdir is a prefix of input or output file but hardcoded:
 10      If this is meant to represent a file path prefix, it will fail when
 11      running workflow in environments without a shared filesystem. Instead,
 12      provide a function that infers the appropriate prefix from the input or
 13      output file, e.g.: lambda w, input: os.path.splitext(input[0])[0]
 14      Also see:
 15      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
 16      https://snakemake.readthedocs.io/en/stable/tutorial/advanced.html#tutorial-input-functions
 17
 18Lints for rule mod_input (line 63, /tmp/tmp8k5x7agg/workflow/Snakefile):
 19    * No log directive defined:
 20      Without a log directive, all output will be printed to the terminal. In
 21      distributed environments, this means that errors are harder to discover.
 22      In local environments, output of concurrent jobs will be mixed and become
 23      unreadable.
 24      Also see:
 25      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
 26
 27Lints for rule select_stations (line 93, /tmp/tmp8k5x7agg/workflow/Snakefile):
 28    * No log directive defined:
 29      Without a log directive, all output will be printed to the terminal. In
 30      distributed environments, this means that errors are harder to discover.
 31      In local environments, output of concurrent jobs will be mixed and become
 32      unreadable.
 33      Also see:
 34      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
 35
 36Lints for rule get_discharge_data (line 121, /tmp/tmp8k5x7agg/workflow/Snakefile):
 37    * No log directive defined:
 38      Without a log directive, all output will be printed to the terminal. In
 39      distributed environments, this means that errors are harder to discover.
 40      In local environments, output of concurrent jobs will be mixed and become
 41      unreadable.
 42      Also see:
 43      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
 44    * Param outputdir is a prefix of input or output file but hardcoded:
 45      If this is meant to represent a file path prefix, it will fail when
 46      running workflow in environments without a shared filesystem. Instead,
 47      provide a function that infers the appropriate prefix from the input or
 48      output file, e.g.: lambda w, input: os.path.splitext(input[0])[0]
 49      Also see:
 50      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
 51      https://snakemake.readthedocs.io/en/stable/tutorial/advanced.html#tutorial-input-functions
 52
 53Lints for rule nao_matching (line 154, /tmp/tmp8k5x7agg/workflow/Snakefile):
 54    * No log directive defined:
 55      Without a log directive, all output will be printed to the terminal. In
 56      distributed environments, this means that errors are harder to discover.
 57      In local environments, output of concurrent jobs will be mixed and become
 58      unreadable.
 59      Also see:
 60      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
 61    * Param outputdir is a prefix of input or output file but hardcoded:
 62      If this is meant to represent a file path prefix, it will fail when
 63      running workflow in environments without a shared filesystem. Instead,
 64      provide a function that infers the appropriate prefix from the input or
 65      output file, e.g.: lambda w, input: os.path.splitext(input[0])[0]
 66      Also see:
 67      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
 68      https://snakemake.readthedocs.io/en/stable/tutorial/advanced.html#tutorial-input-functions
 69
 70Lints for rule build_catchment_dataset (line 193, /tmp/tmp8k5x7agg/workflow/Snakefile):
 71    * No log directive defined:
 72      Without a log directive, all output will be printed to the terminal. In
 73      distributed environments, this means that errors are harder to discover.
 74      In local environments, output of concurrent jobs will be mixed and become
 75      unreadable.
 76      Also see:
 77      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
 78    * Param outputdir is a prefix of input or output file but hardcoded:
 79      If this is meant to represent a file path prefix, it will fail when
 80      running workflow in environments without a shared filesystem. Instead,
 81      provide a function that infers the appropriate prefix from the input or
 82      output file, e.g.: lambda w, input: os.path.splitext(input[0])[0]
 83      Also see:
 84      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
 85      https://snakemake.readthedocs.io/en/stable/tutorial/advanced.html#tutorial-input-functions
 86
 87Lints for rule fit_gamlss_models (line 230, /tmp/tmp8k5x7agg/workflow/Snakefile):
 88    * No log directive defined:
 89      Without a log directive, all output will be printed to the terminal. In
 90      distributed environments, this means that errors are harder to discover.
 91      In local environments, output of concurrent jobs will be mixed and become
 92      unreadable.
 93      Also see:
 94      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
 95    * Param outputdir is a prefix of input or output file but hardcoded:
 96      If this is meant to represent a file path prefix, it will fail when
 97      running workflow in environments without a shared filesystem. Instead,
 98      provide a function that infers the appropriate prefix from the input or
 99      output file, e.g.: lambda w, input: os.path.splitext(input[0])[0]
100      Also see:
101      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
102      https://snakemake.readthedocs.io/en/stable/tutorial/advanced.html#tutorial-input-functions
103
104Lints for rule prepare_nh_input (line 263, /tmp/tmp8k5x7agg/workflow/Snakefile):
105    * No log directive defined:
106      Without a log directive, all output will be printed to the terminal. In
107      distributed environments, this means that errors are harder to discover.
108      In local environments, output of concurrent jobs will be mixed and become
109      unreadable.
110      Also see:
111      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
112    * Param outputdir is a prefix of input or output file but hardcoded:
113      If this is meant to represent a file path prefix, it will fail when
114      running workflow in environments without a shared filesystem. Instead,
115      provide a function that infers the appropriate prefix from the input or
116      output file, e.g.: lambda w, input: os.path.splitext(input[0])[0]
117      Also see:
118      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
119      https://snakemake.readthedocs.io/en/stable/tutorial/advanced.html#tutorial-input-functions
120
121Lints for rule run_nh (line 299, /tmp/tmp8k5x7agg/workflow/Snakefile):
122    * No log directive defined:
123      Without a log directive, all output will be printed to the terminal. In
124      distributed environments, this means that errors are harder to discover.
125      In local environments, output of concurrent jobs will be mixed and become
126      unreadable.
127      Also see:
128      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files

Formatting results

1[DEBUG] 
2[DEBUG] In file "/tmp/tmp8k5x7agg/workflow/Snakefile":  Formatted content is different from original
3[INFO] 1 file(s) would be changed 😬
4
5snakefmt version: 0.6.1