From 4b074d8d628b91354c6a3425903bd16691ba1220 Mon Sep 17 00:00:00 2001 From: Daniel Park Date: Thu, 19 Sep 2024 16:10:42 -0400 Subject: [PATCH] handle empty output scenario better --- pipes/WDL/workflows/scaffold_and_refine_multitaxa.wdl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pipes/WDL/workflows/scaffold_and_refine_multitaxa.wdl b/pipes/WDL/workflows/scaffold_and_refine_multitaxa.wdl index 0d8f1231a..89540d9c9 100644 --- a/pipes/WDL/workflows/scaffold_and_refine_multitaxa.wdl +++ b/pipes/WDL/workflows/scaffold_and_refine_multitaxa.wdl @@ -158,9 +158,12 @@ workflow scaffold_and_refine_multitaxa { } ### summary stats + if len(select_all(stats_by_taxon)) > 0 { + File assembly_stats_body = write_tsv(select_all(stats_by_taxon)) + } call utils.concatenate { input: - infiles = [write_tsv([assembly_header]), write_tsv(select_all(stat_by_taxon))], + infiles = select_all([write_tsv([assembly_header]), assembly_stats_body]), output_name = "assembly_metadata-~{sample_id}.tsv" }