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} \