usnistgov/defrabb

Genome In A Bottle Development Framework for Assembly Based Benchmarks

Overview

Latest release: None, Last update: 2026-06-16

Share link: https://snakemake.github.io/snakemake-workflow-catalog?wf=usnistgov/defrabb

Quality control: linting: failed formatting: passed

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

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/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
  1/tmp/tmpuml030q5/rules/bench_vcf_normalize.smk:76: SyntaxWarning: invalid escape sequence '\.'
  2  shell:
  3/tmp/tmpuml030q5/rules/bench_vcf_normalize.smk:89: SyntaxWarning: invalid escape sequence '\.'
  4  vcf="results/asm_varcalls/{vc_id}/annotations/{prefix}.vcf.gz",
  5Lints for snakefile /tmp/tmpuml030q5/rules/helpers_bench.smk:
  6    * Mixed rules and functions in same snakefile.:
  7      Small one-liner functions used only once should be defined as lambda
  8      expressions. Other functions should be collected in a common module, e.g.
  9      'rules/common.smk'. This makes the workflow steps more readable.
 10      Also see:
 11      https://snakemake.readthedocs.io/en/latest/snakefiles/modularization.html#includes
 12
 13Lints for snakefile /tmp/tmpuml030q5/rules/stratifications_genome_specific.smk:
 14    * Absolute path "/{ref_id}_{asm_id}_{bench_type}_{vc_cmd}-{vc_param_id}." in line 33:
 15      Do not define absolute paths inside of the workflow, since this renders
 16      your workflow irreproducible on other machines. Use path relative to the
 17      working directory instead, or make the path configurable via a config
 18      file.
 19      Also see:
 20      https://snakemake.readthedocs.io/en/latest/snakefiles/configuration.html#configuration
 21    * Path composition with '+' in line 33:
 22      This becomes quickly unreadable. Usually, it is better to endure some
 23      redundancy against having a more readable workflow. Hence, just repeat
 24      common prefixes. If path composition is unavoidable, use pathlib or
 25      (python >= 3.6) string formatting with f"...".
 26    * Path composition with '+' in line 45:
 27      This becomes quickly unreadable. Usually, it is better to endure some
 28      redundancy against having a more readable workflow. Hence, just repeat
 29      common prefixes. If path composition is unavoidable, use pathlib or
 30      (python >= 3.6) string formatting with f"...".
 31    * Path composition with '+' in line 64:
 32      This becomes quickly unreadable. Usually, it is better to endure some
 33      redundancy against having a more readable workflow. Hence, just repeat
 34      common prefixes. If path composition is unavoidable, use pathlib or
 35      (python >= 3.6) string formatting with f"...".
 36    * Path composition with '+' in line 106:
 37      This becomes quickly unreadable. Usually, it is better to endure some
 38      redundancy against having a more readable workflow. Hence, just repeat
 39      common prefixes. If path composition is unavoidable, use pathlib or
 40      (python >= 3.6) string formatting with f"...".
 41
 42Lints for rule pav_config (line 102, /tmp/tmpuml030q5/rules/asm-varcall.smk):
 43    * Specify a conda environment or container for each rule.:
 44      This way, the used software for each specific step is documented, and the
 45      workflow can be executed on any machine without prerequisites.
 46      Also see:
 47      https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#integrated-package-management
 48      https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#running-jobs-in-containers
 49
 50Lints for rule run_pav (line 131, /tmp/tmpuml030q5/rules/asm-varcall.smk):
 51    * Param outdir is a prefix of input or output file but hardcoded:
 52      If this is meant to represent a file path prefix, it will fail when
 53      running workflow in environments without a shared filesystem. Instead,
 54      provide a function that infers the appropriate prefix from the input or
 55      output file, e.g.: lambda w, input: os.path.splitext(input[0])[0]
 56      Also see:
 57      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
 58      https://snakemake.readthedocs.io/en/stable/tutorial/advanced.html#tutorial-input-functions
 59
 60Lints for rule standardize_vcasm_output (line 196, /tmp/tmpuml030q5/rules/asm-varcall.smk):
 61    * No log directive defined:
 62      Without a log directive, all output will be printed to the terminal. In
 63      distributed environments, this means that errors are harder to discover.
 64      In local environments, output of concurrent jobs will be mixed and become
 65      unreadable.
 66      Also see:
 67      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
 68    * Specify a conda environment or container for each rule.:
 69      This way, the used software for each specific step is documented, and the
 70      workflow can be executed on any machine without prerequisites.
 71      Also see:
 72      https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#integrated-package-management
 73      https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#running-jobs-in-containers
 74
 75Lints for rule self_discrep_happy (line 24, /tmp/tmpuml030q5/rules/exclusions_self_discrep.smk):
 76    * Param prefix is a prefix of input or output file but hardcoded:
 77      If this is meant to represent a file path prefix, it will fail when
 78      running workflow in environments without a shared filesystem. Instead,
 79      provide a function that infers the appropriate prefix from the input or
 80      output file, e.g.: lambda w, input: os.path.splitext(input[0])[0]
 81      Also see:
 82      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
 83      https://snakemake.readthedocs.io/en/stable/tutorial/advanced.html#tutorial-input-functions
 84
 85Lints for rule write_report_params (line 96, /tmp/tmpuml030q5/rules/report.smk):
 86    * Specify a conda environment or container for each rule.:
 87      This way, the used software for each specific step is documented, and the
 88      workflow can be executed on any machine without prerequisites.
 89      Also see:
 90      https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#integrated-package-management
 91      https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#running-jobs-in-containers
 92
 93Lints for rule install_dfam_hmm (line 93, /tmp/tmpuml030q5/rules/bench_vcf_anno.smk):
 94    * No log directive defined:
 95      Without a log directive, all output will be printed to the terminal. In
 96      distributed environments, this means that errors are harder to discover.
 97      In local environments, output of concurrent jobs will be mixed and become
 98      unreadable.
 99      Also see:
100      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
Formatting results
All tests passed!