r1cheu/imputation
imputation pipeline for low-coverage sequencing in hybrid rice
Overview
Latest release: None, Last update: 2026-10-10
Share link: https://snakemake.github.io/snakemake-workflow-catalog?wf=r1cheu/imputation
Quality control: linting: failed formatting: passed
Deployment
Step 1: Install Snakemake and Snakedeploy
Snakemake and Snakedeploy are best installed via the Conda package manager. It is recommended to install conda via Miniforge. Run
conda create -c conda-forge -c bioconda -c nodefaults --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
For other installation methods, refer to the Snakemake and Snakedeploy documentation.
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/r1cheu/imputation . --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 using apptainer/singularity, use
snakemake --cores all --sdm apptainer
To run the workflow using a combination of conda and apptainer/singularity for software deployment, use
snakemake --cores all --sdm conda apptainer
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
config.yaml
Key |
Meaning |
|---|---|
|
TSV listing samples (see below) |
|
Reference genome FASTA (e.g. IRGSP-1.0). Indices are built by the workflow. |
|
Per-chromosome phased reference panel template (VCF.GZ or BCF, with |
|
List of chromosome names. Must match both reference and panel. |
|
Per-chromosome genetic map path template, e.g. |
|
Drop samples whose mapped depth (mapped bases after duplicate removal / reference length) is below this (default 1.0). |
|
Drop samples whose fraction of unmapped reads is above this (default 0.8). |
|
Maximum number of BAMs imputed in one GLIMPSE2_phase job (default 200). |
|
Extra flags passed verbatim to fastp (e.g. quality cutoffs) |
Threads/memory per rule are hard-coded in workflow/rules/*.smk (tuned for ~600 cores / ~5000 samples). Override by editing those resources: blocks.
samples.tsv
Tab-separated, one sample per row.
Column |
Required |
Meaning |
|---|---|---|
|
yes |
unique sample id (used as RG ID/SM) |
|
yes |
sequencing platform string (RG PL), e.g. |
|
yes |
path to read 1 fastq.gz |
|
yes |
path to read 2 fastq.gz |
Workflow parameters
The following table is automatically parsed from the workflow’s config.schema.y(a)ml file.
Parameter |
Type |
Description |
Required |
Default |
|---|---|---|---|---|
sample_sheet |
string |
yes |
config/samples.tsv |
|
reference |
yes |
|||
. fasta |
string |
path to the reference genome FASTA |
yes |
|
panel |
yes |
|||
. full_template |
string |
per-chrom phased panel VCF/BCF template with .csi alongside, e.g. “reference/panel_{chrom}.bcf” |
yes |
|
chromosomes |
array |
chromosome names matching the reference and panel |
yes |
|
genetic_map |
yes |
|||
. template |
string |
per-chromosome genetic map path template, e.g. “maps/{chrom}.gmap” |
yes |
|
bam_filter |
||||
. min_depth |
number |
samples with mapped depth (after dedup) below this are dropped |
1.0 |
|
. max_unmapped_frac |
number |
samples with a fraction of unmapped reads above this are dropped |
0.8 |
|
phase |
||||
. batch_size |
integer |
maximum number of BAMs imputed in one GLIMPSE2_phase job |
200 |
|
fastp |
||||
. extra |
string |
Linting and formatting
Linting results
1/home/runner/work/snakemake-workflow-catalog/snakemake-workflow-catalog/.pixi/envs/default/lib/python3.13/site-packages/google/auth/transport/grpc.py:43: FutureWarning: grpcio < 1.83.0 does not support Post-Quantum Cryptography (PQC). Support for non-PQC environments is deprecated. In April 2027, google-auth will raise its minimum requirements to enforce grpcio >= 1.83.0. For more details on Google Cloud's post-quantum security migration, visit: https://cloud.google.com/security/resources/post-quantum-cryptography
2 warnings.warn(
3Workflow defines that rule minibwa_index is eligible for caching between workflows (use the --cache argument to enable this).
4Workflow defines that rule samtools_faidx is eligible for caching between workflows (use the --cache argument to enable this).
5Lints for snakefile /tmp/tmpr3dxytw2/workflow/rules/imputation.smk:
6 * Path composition with '+' in line 8:
7 This becomes quickly unreadable. Usually, it is better to endure some
8 redundancy against having a more readable workflow. Hence, just repeat
9 common prefixes. If path composition is unavoidable, use pathlib or
10 (python >= 3.6) string formatting with f"...".
11
12Lints for rule minibwa_align_dedup (line 1, /tmp/tmpr3dxytw2/workflow/rules/align.smk):
13 * Param idx_prefix is a prefix of input or output file but hardcoded:
14 If this is meant to represent a file path prefix, it will fail when
15 running workflow in environments without a shared filesystem. Instead,
16 provide a function that infers the appropriate prefix from the input or
17 output file, e.g.: lambda w, input: os.path.splitext(input[0])[0]
18 Also see:
19 https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
20 https://snakemake.readthedocs.io/en/stable/tutorial/advanced.html#tutorial-input-functions
21
22Lints for rule filter_samples (line 21, /tmp/tmpr3dxytw2/workflow/rules/qc.smk):
23 * Migrate long run directives into scripts or notebooks:
24 Long run directives hamper workflow readability. Use the script or
25 notebook directive instead. Note that the script or notebook directive
26 does not involve boilerplate. Similar to run, you will have direct access
27 to params, input, output, and wildcards.Only use the run directive for a
28 handful of lines.
29 Also see:
30 https://snakemake.readthedocs.io/en/latest/snakefiles/rules.html#external-scripts
31 https://snakemake.readthedocs.io/en/latest/snakefiles/rules.html#jupyter-notebook-integration
32
33Lints for rule bam_list (line 32, /tmp/tmpr3dxytw2/workflow/rules/imputation.smk):
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 * Migrate long run directives into scripts or notebooks:
42 Long run directives hamper workflow readability. Use the script or
43 notebook directive instead. Note that the script or notebook directive
44 does not involve boilerplate. Similar to run, you will have direct access
45 to params, input, output, and wildcards.Only use the run directive for a
46 handful of lines.
47 Also see:
48 https://snakemake.readthedocs.io/en/latest/snakefiles/rules.html#external-scripts
49 https://snakemake.readthedocs.io/en/latest/snakefiles/rules.html#jupyter-notebook-integration
Formatting results
All tests passed!