Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion workflow/rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def get_repo_version(base_dir: str, default: str, warn=False) -> str:
"""
try:
last_tag_description = subprocess.check_output(
f"git --git-dir={base_dir}/.git describe --always",
f"git --git-dir={base_dir}/.git describe --tags --always",
shell=True,
stderr=subprocess.DEVNULL
).strip().decode("utf-8")
Expand Down
1 change: 1 addition & 0 deletions workflow/rules/context.smk
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ rule download_context:
duplicate_accids = OUTDIR/"context"/"duplicate_accession_ids.txt"
log:
LOGDIR / "download_context" / "log.txt"
retries: 2
script:
"../scripts/download_context.R"

Expand Down
3 changes: 3 additions & 0 deletions workflow/scripts/format_vcf_fields_longer.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ read_tsv(
# Rename "...[*]..." columns using the provided lookup via Snakemake config
rename(all_of(unlist(snakemake@params$colnames_mapping))) %>%

# Ensure missing values are properly encoded
mutate(across(where(is.character), ~ na_if(.x, "NA"))) %>%

# Separate &-delimited error column (more than one error/warning/info message per row is possible)
mutate(split_errors = strsplit(ERRORS, "&")) %>%
# Keep rows with none of the excluded ERRORS terms, if any
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ date_order <- read_csv(snakemake@input[["metadata"]]) %>%

log_info("Formatting variants")
all_variants_wider <- variants %>%
select(SAMPLE, VARIANT_NAME, ALT_FREQ) %>%
distinct(SAMPLE, VARIANT_NAME, ALT_FREQ) %>%
pivot_wider(
names_from = VARIANT_NAME,
values_from = ALT_FREQ
Expand Down
Loading