From cf71148b952e8f6ed087e56a413c44c61b3c4768 Mon Sep 17 00:00:00 2001 From: Stephen Fleming Date: Tue, 31 Oct 2023 10:46:16 -0400 Subject: [PATCH] Bug fix for WDL using MTX input (#246) --- wdl/cellbender_remove_background.wdl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/wdl/cellbender_remove_background.wdl b/wdl/cellbender_remove_background.wdl index 6f97463..f7507ec 100644 --- a/wdl/cellbender_remove_background.wdl +++ b/wdl/cellbender_remove_background.wdl @@ -125,8 +125,15 @@ task run_cellbender_remove_background_gpu { [ -f $dir/$name ] || mv ~{genes_file} $dir/$name fi + # use the directory as the input in the case of an MTX file + if [[ "~{input_file_unfiltered}" == *.mtx* ]]; then + input=$(dirname ~{input_file_unfiltered}) + else + input=~{input_file_unfiltered} + fi + cellbender remove-background \ - --input "~{input_file_unfiltered}" \ + --input $input \ --output "~{sample_name}_out.h5" \ --cuda \ ~{"--checkpoint " + checkpoint_file} \