Skip to content

Commit

Permalink
refactor: work around bug in snakefmt that adds two lines after each …
Browse files Browse the repository at this point in the history
…include by moving an if statement into common.smk (#578)

* refactor: work around bug in snakefmt that adds two lines after each include by moving an if statement into common.smk

* more refactoring
  • Loading branch information
johanneskoester authored Jan 26, 2023
1 parent c11ee96 commit 444f89c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
12 changes: 2 additions & 10 deletions workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ container: "docker://condaforge/mambaforge"
containerized: "quay.io/uncovar/uncovar#0.15.1"


if config["strain-calling"]["use-gisaid"]:

envvars:
"GISAID_API_TOKEN",


include: "rules/common.smk"
include: "rules/benchmarking_common.smk"
include: "rules/utils.smk"
Expand All @@ -47,17 +41,15 @@ include: "rules/variant_filtration.smk"
include: "rules/variant_report.smk"
include: "rules/generate_output.smk"
include: "rules/benchmarking.smk"
include: "rules/long_read.smk"
include: "rules/lineage_variant_calling.smk"


if config["data-handling"]["use-data-handling"]:

include: "rules/preprocessing.smk"


include: "rules/long_read.smk"
include: "rules/lineage_variant_calling.smk"


if config["data-handling"]["archive-data"]:

rule save_latest_run:
Expand Down
10 changes: 10 additions & 0 deletions workflow/rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,18 @@ import urllib.request
from snakemake.utils import validate


if config["strain-calling"]["use-gisaid"]:

envvars:
"GISAID_API_TOKEN",


VARTYPES = ["SNV", "MNV", "INS", "DEL", "REP", "INV", "DUP"]


ILLUMINA_VARRANGE = ["small", "structural"]


ONT_VARRANGE = ["homopolymer-medaka", "homopolymer-longshot"]
ION_VARRANGE = ["small", "structural"]

Expand Down

0 comments on commit 444f89c

Please sign in to comment.