usnistgov/defrabb

Genome In A Bottle Development Framework for Assembly Based Benchmarks

Overview

Latest release: None, Last update: 2025-08-12

Linting: linting: failed, Formatting: formatting: failed

Wrappers: bio/assembly-stats bio/bcftools/index bio/bcftools/sort bio/bedtools/intersect bio/bwa/index bio/samtools/faidx bio/samtools/index

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/usnistgov/defrabb . --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 options

defrabb uses two configuration files

See schema/analyses-schema.yml and schema/resources-schema.yml for detailed descriptions and field formats requirements.

resource.yaml

used to define:

  • parameters, threads, and memory for compute intensive steps

  • urls for remote files: diploid assemblies, genome reference files, stratifications, and callsets used to evaluate draft benchmark

  • exclusion sets and how they are applied

Analyses Tables

Provides run specific configurations

  • input diploid assembly

  • version of reference genome

  • assembly-based variant caller and parameters

  • vcf and bed processing including what exclusions to use

  • benchmarking method and comparison callset used for initial evaluation

Linting and formatting

Linting results

 1No validator found for JSON Schema version identifier 'http://json-schema.org/draft-07/schema#'
 2Defaulting to validator for JSON Schema version 'https://json-schema.org/draft/2020-12/schema'
 3Note that schema file may not be validated correctly.
 4No validator found for JSON Schema version identifier 'http://json-schema.org/draft-07/schema#'
 5Defaulting to validator for JSON Schema version 'https://json-schema.org/draft/2020-12/schema'
 6Note that schema file may not be validated correctly.
 7/tmp/tmpac0kg1ch/rules/bench_vcf_processing.smk:74: SyntaxWarning: invalid escape sequence '\.'
 8  log:
 9/tmp/tmpac0kg1ch/rules/bench_vcf_processing.smk:87: SyntaxWarning: invalid escape sequence '\.'
10  rule normalize_vars:
11Lints for rule run_pav (line 91, /tmp/tmpac0kg1ch/rules/asm-varcall.smk):
12    * No log directive defined:
13      Without a log directive, all output will be printed to the terminal. In
14      distributed environments, this means that errors are harder to discover.
15      In local environments, output of concurrent jobs will be mixed and become
16      unreadable.
17      Also see:
18      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
19
20Lints for rule standardize_vcasm_output (line 140, /tmp/tmpac0kg1ch/rules/asm-varcall.smk):
21    * No log directive defined:
22      Without a log directive, all output will be printed to the terminal. In
23      distributed environments, this means that errors are harder to discover.
24      In local environments, output of concurrent jobs will be mixed and become
25      unreadable.
26      Also see:
27      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
28    * Specify a conda environment or container for each rule.:
29      This way, the used software for each specific step is documented, and the
30      workflow can be executed on any machine without prerequisites.
31      Also see:
32      https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#integrated-package-management
33      https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#running-jobs-in-containers
34
35Lints for rule write_report_params (line 95, /tmp/tmpac0kg1ch/rules/report.smk):
36    * Migrate long run directives into scripts or notebooks:
37      Long run directives hamper workflow readability. Use the script or
38      notebook directive instead. Note that the script or notebook directive
39      does not involve boilerplate. Similar to run, you will have direct access
40      to params, input, output, and wildcards.Only use the run directive for a
41      handful of lines.
42      Also see:
43      https://snakemake.readthedocs.io/en/latest/snakefiles/rules.html#external-scripts
44      https://snakemake.readthedocs.io/en/latest/snakefiles/rules.html#jupyter-notebook-integration
45
46Lints for rule install_dfam_hmm (line 212, /tmp/tmpac0kg1ch/rules/bench_vcf_processing.smk):
47    * No log directive defined:
48      Without a log directive, all output will be printed to the terminal. In
49      distributed environments, this means that errors are harder to discover.
50      In local environments, output of concurrent jobs will be mixed and become
51      unreadable.
52      Also see:
53      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files

Formatting results

 1[DEBUG] 
 2[DEBUG] 
 3[DEBUG] 
 4[DEBUG] In file "/tmp/tmpac0kg1ch/rules/exclusions.smk":  Formatted content is different from original
 5[DEBUG] 
 6<unknown>:1: SyntaxWarning: invalid escape sequence '\.'
 7[DEBUG] In file "/tmp/tmpac0kg1ch/rules/bench_vcf_processing.smk":  Formatted content is different from original
 8[DEBUG] 
 9[DEBUG] In file "/tmp/tmpac0kg1ch/rules/common.smk":  Formatted content is different from original
10[DEBUG] 
11[DEBUG] 
12[DEBUG] 
13[DEBUG] 
14[INFO] 3 file(s) would be changed 😬
15[INFO] 6 file(s) would be left unchanged 🎉
16
17snakefmt version: 0.11.0