mdondrup/admixture_simulation

None

Overview

Topics:

Latest release: None, Last update: 2025-05-31

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/mdondrup/admixture_simulation . --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 setup (line 36, /tmp/tmpmdqlwdmv/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
 10Lints for rule build_model (line 48, /tmp/tmpmdqlwdmv/workflow/Snakefile):
 11    * No log directive defined:
 12      Without a log directive, all output will be printed to the terminal. In
 13      distributed environments, this means that errors are harder to discover.
 14      In local environments, output of concurrent jobs will be mixed and become
 15      unreadable.
 16      Also see:
 17      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
 18
 19Lints for rule subsample_recode (line 62, /tmp/tmpmdqlwdmv/workflow/Snakefile):
 20    * No log directive defined:
 21      Without a log directive, all output will be printed to the terminal. In
 22      distributed environments, this means that errors are harder to discover.
 23      In local environments, output of concurrent jobs will be mixed and become
 24      unreadable.
 25      Also see:
 26      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
 27    * Shell command directly uses variable rule from outside of the rule:
 28      It is recommended to pass all files as input and output, and non-file
 29      parameters via the params directive. Otherwise, provenance tracking is
 30      less accurate.
 31      Also see:
 32      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
 33
 34Lints for rule make_new_clusterfile (line 92, /tmp/tmpmdqlwdmv/workflow/Snakefile):
 35    * No log directive defined:
 36      Without a log directive, all output will be printed to the terminal. In
 37      distributed environments, this means that errors are harder to discover.
 38      In local environments, output of concurrent jobs will be mixed and become
 39      unreadable.
 40      Also see:
 41      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
 42
 43Lints for rule treemix_input (line 115, /tmp/tmpmdqlwdmv/workflow/Snakefile):
 44    * No log directive defined:
 45      Without a log directive, all output will be printed to the terminal. In
 46      distributed environments, this means that errors are harder to discover.
 47      In local environments, output of concurrent jobs will be mixed and become
 48      unreadable.
 49      Also see:
 50      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
 51
 52Lints for rule TreeMix_bootstrap_{wildcards.model}_{wildcards.migrations}_{wildcards.replicate} (line 129, /tmp/tmpmdqlwdmv/workflow/Snakefile):
 53    * Param prefix is a prefix of input or output file but hardcoded:
 54      If this is meant to represent a file path prefix, it will fail when
 55      running workflow in environments without a shared filesystem. Instead,
 56      provide a function that infers the appropriate prefix from the input or
 57      output file, e.g.: lambda w, input: os.path.splitext(input[0])[0]
 58      Also see:
 59      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
 60      https://snakemake.readthedocs.io/en/stable/tutorial/advanced.html#tutorial-input-functions
 61
 62Lints for rule merge_replicates_{wildcards.model}_{wildcards.migrations} (line 165, /tmp/tmpmdqlwdmv/workflow/Snakefile):
 63    * No log directive defined:
 64      Without a log directive, all output will be printed to the terminal. In
 65      distributed environments, this means that errors are harder to discover.
 66      In local environments, output of concurrent jobs will be mixed and become
 67      unreadable.
 68      Also see:
 69      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
 70    * Specify a conda environment or container for each rule.:
 71      This way, the used software for each specific step is documented, and the
 72      workflow can be executed on any machine without prerequisites.
 73      Also see:
 74      https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#integrated-package-management
 75      https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#running-jobs-in-containers
 76
 77Lints for rule OptM (line 181, /tmp/tmpmdqlwdmv/workflow/Snakefile):
 78    * No log directive defined:
 79      Without a log directive, all output will be printed to the terminal. In
 80      distributed environments, this means that errors are harder to discover.
 81      In local environments, output of concurrent jobs will be mixed and become
 82      unreadable.
 83      Also see:
 84      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
 85    * Param folder is a prefix of input or output file but hardcoded:
 86      If this is meant to represent a file path prefix, it will fail when
 87      running workflow in environments without a shared filesystem. Instead,
 88      provide a function that infers the appropriate prefix from the input or
 89      output file, e.g.: lambda w, input: os.path.splitext(input[0])[0]
 90      Also see:
 91      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
 92      https://snakemake.readthedocs.io/en/stable/tutorial/advanced.html#tutorial-input-functions
 93
 94Lints for rule plot_trees (line 206, /tmp/tmpmdqlwdmv/workflow/Snakefile):
 95    * No log directive defined:
 96      Without a log directive, all output will be printed to the terminal. In
 97      distributed environments, this means that errors are harder to discover.
 98      In local environments, output of concurrent jobs will be mixed and become
 99      unreadable.
100      Also see:
101      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
102    * Shell command directly uses variable rule from outside of the rule:
103      It is recommended to pass all files as input and output, and non-file
104      parameters via the params directive. Otherwise, provenance tracking is
105      less accurate.
106      Also see:
107      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
108    * Shell command directly uses variable rule from outside of the rule:
109      It is recommended to pass all files as input and output, and non-file
110      parameters via the params directive. Otherwise, provenance tracking is
111      less accurate.
112      Also see:
113      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
114    * Shell command directly uses variable rule from outside of the rule:
115      It is recommended to pass all files as input and output, and non-file
116      parameters via the params directive. Otherwise, provenance tracking is
117      less accurate.
118      Also see:
119      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
120    * Param prefix is a prefix of input or output file but hardcoded:
121      If this is meant to represent a file path prefix, it will fail when
122      running workflow in environments without a shared filesystem. Instead,
123      provide a function that infers the appropriate prefix from the input or
124      output file, e.g.: lambda w, input: os.path.splitext(input[0])[0]
125      Also see:
126      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
127      https://snakemake.readthedocs.io/en/stable/tutorial/advanced.html#tutorial-input-functions
128
129Lints for rule consensus (line 246, /tmp/tmpmdqlwdmv/workflow/Snakefile):
130    * No log directive defined:
131      Without a log directive, all output will be printed to the terminal. In
132      distributed environments, this means that errors are harder to discover.
133      In local environments, output of concurrent jobs will be mixed and become
134      unreadable.
135      Also see:
136      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
137
138Lints for rule final_tree_from_consensus (line 275, /tmp/tmpmdqlwdmv/workflow/Snakefile):
139    * Param prefix is a prefix of input or output file but hardcoded:
140      If this is meant to represent a file path prefix, it will fail when
141      running workflow in environments without a shared filesystem. Instead,
142      provide a function that infers the appropriate prefix from the input or
143      output file, e.g.: lambda w, input: os.path.splitext(input[0])[0]
144      Also see:
145      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
146      https://snakemake.readthedocs.io/en/stable/tutorial/advanced.html#tutorial-input-functions

Formatting results

 1[DEBUG] 
 2[WARNING] In file "/tmp/tmpmdqlwdmv/workflow/Snakefile":  Keyword "output" at line 137 has comments under a value.
 3	PEP8 recommends block comments appear before what they describe
 4(see https://www.python.org/dev/peps/pep-0008/#id30)
 5[WARNING] In file "/tmp/tmpmdqlwdmv/workflow/Snakefile":  Keyword "shell" at line 151 has comments under a value.
 6	PEP8 recommends block comments appear before what they describe
 7(see https://www.python.org/dev/peps/pep-0008/#id30)
 8[DEBUG] In file "/tmp/tmpmdqlwdmv/workflow/Snakefile":  Formatted content is different from original
 9[INFO] 1 file(s) would be changed 😬
10
11snakefmt version: 0.11.0