Skip to content

Commit

Permalink
Don't error if nextclade input sequences empty, necessary because of n…
Browse files Browse the repository at this point in the history
  • Loading branch information
corneliusroemer committed Feb 20, 2024
1 parent d706bbe commit c5553ef
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions workflow/snakemake_rules/nextclade.smk
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,14 @@ rule run_wuhan_nextclade:
],
shell:
"""
# If there are no sequences to run Nextclade on, create empty output files
if [[ ! -s {input.sequences} ]]; then
touch {output.info}
touch {output.alignment}
touch {output.translations}
exit 0
fi
./{input.nextclade_path} run \
{input.sequences}\
--input-dataset={input.dataset} \
Expand All @@ -208,6 +216,12 @@ rule run_21L_nextclade:
info=f"data/{database}/nextclade_21L_new_raw.tsv",
shell:
"""
# If there are no sequences to run Nextclade on, create empty output files
if [[ ! -s {input.sequences} ]]; then
touch {output.info}
exit 0
fi
./{input.nextclade_path} run \
{input.sequences} \
--input-dataset={input.dataset} \
Expand Down

0 comments on commit c5553ef

Please sign in to comment.