I'm using gatk CombineGVCFs, and am supplying the paths of the GVCFs to combine using an arguments file, but I'm getting an error when there are spaces in the file path in the arguments file.
Here's an example of the content of the arguments file:
--variant /mnt/gpfs/live/rd01__/ritd-ag-project-rd018o-mdflo13/data/Illumina_amplicon_sequencing/2021.10.13 Emma MSH3 KO Illumina amplicon sequencing/2021.12.14 results/sample/results/variants/FAN1-1B5_g.vcf.gz
--variant /mnt/gpfs/live/rd01__/ritd-ag-project-rd018o-mdflo13/refs/1000G/cram/ROI/1000G_sample_ROI.g.vcf
I've tried putting the file path in inverted commas (e.g. --variant "/mnt/gpfs/live/rd01__/ritd-ag-project-rd018o-mdflo13/data/Illumina_amplicon_sequencing/2021.10.13 Emma MSH3 KO Illumina amplicon sequencing/2021.12.14 results/sample/results/variants/FAN1-1B5_g.vcf.gz"
), and also tried escaping the spaces (e.g. /mnt/gpfs/live/rd01__/ritd-ag-project-rd018o-mdflo13/data/Illumina_amplicon_sequencing/2021.10.13\ Emma\ MSH3\ KO\ Illumina\ amplicon\ sequencing/2021.12.14\ results/sample/results/variants/FAN1-1B5_g.vcf.gz
), but can't get it to work.
And here's the gatk call:
gatk CombineGVCFs \
--java-options '-DGATK_STACKTRACE_ON_USER_EXCEPTION=true' \
-R "${GKREF}/Homo_sapiens_assembly38.fasta" \
--arguments_file "${OUT}/results/variants/input.list" \
-O "${OUT}/results/variants/cohort.g.vcf"
And here's the error:
***********************************************************************
A USER ERROR has occurred: Illegal argument value: Positional arguments were provided ',Emma\{MSH3\{KO\{Illumina\{amplicon\{sequencing/2021.12.14\{results/sample/results/variants/FAN1-1B5_g.vcf.gz}' but no positional argument is defined for this tool.
***********************************************************************
Try using single quotes instead of double quotes. Sometimes these crazy hacks work.
I'm afraid it still errors. I tried this in the arguments file
And got this error:
FYI it works fine if I remove spaces from the file paths, e.g.