Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion pipes/WDL/tasks/tasks_reports.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ task tsv_join {
Array[File]+ input_tsvs
String id_col
String out_basename = "merged"
String placeholder_for_missing = ""
}

command <<<
Expand Down Expand Up @@ -431,7 +432,7 @@ task tsv_join {
for h in header:
# prefer non-empty values from earlier files in in_tsvs, populate from subsequent files only if missing
if not row_out.get(h):
row_out[h] = row.get(h, '')
row_out[h] = row.get(h, '~{placeholder_for_missing}')
out_row_by_id[row_id] = row_out
out_ids.append(row_id)
out_ids = list(collections.OrderedDict(((i,0) for i in out_ids)).keys())
Expand Down
3 changes: 2 additions & 1 deletion pipes/WDL/workflows/sarscov2_nextstrain.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ workflow sarscov2_nextstrain {
input:
input_tsvs = sample_metadata_tsvs,
id_col = 'strain',
out_basename = "metadata-merged"
out_basename = "metadata-merged",
placeholder_for_missing = "?"
}
}
call nextstrain.derived_cols {
Expand Down