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

fix: fixed include flag KeyError #452

Merged
merged 3 commits into from
Jan 20, 2022
Merged
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
19 changes: 15 additions & 4 deletions workflow/rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -1272,10 +1272,21 @@ def get_include_flag(sample):


def get_include_flag_for_date(wildcards):
return [
get_include_flag(sample)
for sample in get_assemblies_for_submission(wildcards, "accepted samples")
]
if len(get_samples_for_date(wildcards.date)) == len(
get_assemblies_for_submission(wildcards, "accepted samples")
):
return [
get_include_flag(sample) for sample in get_samples_for_date(wildcards.date)
]
else:
allsamplelist = []
for sample in get_samples_for_date(wildcards.date):
for sample_path in get_assemblies_for_submission(
wildcards, "accepted samples"
):
if sample in sample_path:
allsamplelist.append(sample)
return [get_include_flag(sample) for sample in allsamplelist]


def get_artic_primer(wildcards):
Expand Down