Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add patient or environmental mode flag #420

Merged
merged 12 commits into from
Jan 3, 2022
Prev Previous commit
Next Next commit
Merge branch 'master' into feat-add-mode-flag
thomasbtf authored Dec 19, 2021
commit 7a3d5945240402149aefd6cdbbe6a93c88690105
22 changes: 22 additions & 0 deletions workflow/rules/common.smk
Original file line number Diff line number Diff line change
@@ -1544,6 +1544,7 @@ def get_aggregated_pangolin_calls(wildcards, return_list="paths"):
return expanded_patterns



def get_checked_mode():
mode = config["mode"]
if mode == "patient" or mode == "environment":
@@ -1586,6 +1587,27 @@ def get_input_by_mode(wildcard):
return sum(paths, [])


def get_pangolin_for_report(wildcards):
paths = []

path = "results/{date}/tables/strain-calls/{sample}.{stage}.strains.pangolin.csv"

for entry in get_assemblies_for_submission(wildcards, "all samples"):
sample, assembly = entry.split(",")
if assembly == "normal":
pango_stage = "polished"
elif assembly == "pseudo":
pango_stage = "pseudo"
elif assembly == "consensus":
pango_stage = "consensus"
elif assembly == "not-accepted":
pango_stage = "polished"

paths.append(path.format(sample=sample, date=wildcards.date, stage=pango_stage))

return paths


wildcard_constraints:
sample="[^/.]+",
vartype="|".join(VARTYPES),
You are viewing a condensed version of this merge commit. You can view the full changes here.