r1cheu/imputation

imputation pipeline for low-coverage sequencing in hybrid rice

Overview

Latest release: None, Last update: 2026-07-21

Share link: https://snakemake.github.io/snakemake-workflow-catalog?wf=r1cheu/imputation

Quality control: linting: failed formatting: failed

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

sample_sheet

TSV listing samples (see below)

reference.fasta

Reference genome FASTA (e.g. IRGSP-1.0). Indices are built by the workflow.

panel.vcf

Whole-genome phased reference panel VCF, bgzipped. Will be split per chromosome.

chromosomes

List of chromosome names. Must match both reference and panel.

genetic_map.template

Per-chromosome genetic map path template, e.g. resources/maps/{chrom}.gmap. Format expected by GLIMPSE2: pos chr cM.

glimpse2_chunk.window_mb

GLIMPSE2_chunk --window-mb (default 4.0)

glimpse2_chunk.buffer_mb

GLIMPSE2_chunk --buffer-mb (default 0.5)

glimpse2_chunk.extra

Extra flags passed verbatim to GLIMPSE2_chunk

fastp.extra

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

sample

yes

unique sample id (used as RG ID/SM)

platform

yes

sequencing platform string (RG PL), e.g. ILLUMINA

fq1

yes

path to read 1 fastq.gz

fq2

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 full-GT panel BCF template, e.g. “reference/panel_{chrom}.bcf”

yes

. sites_tsv_template

string

per-chrom sites TSV (CHROM\tPOS\tREF,ALT) bgzipped with .tbi alongside

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

merge_gl

. batch_size

integer

maximum number of sample GL BCFs merged in one bcftools merge job

400

glimpse_chunk

yes

. window_size

integer

yes

2000000

. buffer_size

integer

yes

200000

. extra

string

fastp

. extra

string

Linting and formatting

Linting results
 1Workflow defines that rule bwa_mem2_index is eligible for caching between workflows (use the --cache argument to enable this).
 2Workflow defines that rule samtools_faidx is eligible for caching between workflows (use the --cache argument to enable this).
 3Lints for rule bwa_align_dedup (line 1, /tmp/tmpoukskoq3/workflow/rules/align.smk):
 4    * Param idx_prefix is a prefix of input or output file but hardcoded:
 5      If this is meant to represent a file path prefix, it will fail when
 6      running workflow in environments without a shared filesystem. Instead,
 7      provide a function that infers the appropriate prefix from the input or
 8      output file, e.g.: lambda w, input: os.path.splitext(input[0])[0]
 9      Also see:
10      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
11      https://snakemake.readthedocs.io/en/stable/tutorial/advanced.html#tutorial-input-functions
12
13Lints for rule glimpse_chunk (line 92, /tmp/tmpoukskoq3/workflow/rules/imputation.smk):
14    * Specify a conda environment or container for each rule.:
15      This way, the used software for each specific step is documented, and the
16      workflow can be executed on any machine without prerequisites.
17      Also see:
18      https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#integrated-package-management
19      https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#running-jobs-in-containers
20
21Lints for rule glimpse_phase (line 113, /tmp/tmpoukskoq3/workflow/rules/imputation.smk):
22    * Specify a conda environment or container for each rule.:
23      This way, the used software for each specific step is documented, and the
24      workflow can be executed on any machine without prerequisites.
25      Also see:
26      https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#integrated-package-management
27      https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#running-jobs-in-containers
28
29Lints for rule glimpse_ligate (line 137, /tmp/tmpoukskoq3/workflow/rules/imputation.smk):
30    * Specify a conda environment or container for each rule.:
31      This way, the used software for each specific step is documented, and the
32      workflow can be executed on any machine without prerequisites.
33      Also see:
34      https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#integrated-package-management
35      https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#running-jobs-in-containers
Formatting results
 1[DEBUG] 
 2[DEBUG] 
 3[DEBUG] 
 4[DEBUG] In file "/tmp/tmpoukskoq3/workflow/rules/common.smk":  Formatted content is different from original
 5[DEBUG] 
 6[DEBUG] 
 7[DEBUG] In file "/tmp/tmpoukskoq3/workflow/rules/imputation.smk":  Formatted content is different from original
 8[DEBUG] 
 9[INFO] 2 file(s) would be changed 😬
10[INFO] 4 file(s) would be left unchanged 🎉
11
12snakefmt version: 0.11.5