gatk CombineGVCFs using argument file with spaces in the path
0
1
Entering edit mode
2.4 years ago

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.

***********************************************************************
CombineGVCFs spaces gatk • 1.0k views
ADD COMMENT
0
Entering edit mode

Try using single quotes instead of double quotes. Sometimes these crazy hacks work.

ADD REPLY
0
Entering edit mode

I'm afraid it still errors. I tried this in 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'

And got this 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.

***********************************************************************

FYI it works fine if I remove spaces from the file paths, 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
--variant /mnt/gpfs/live/rd01__/ritd-ag-project-rd018o-mdflo13/refs/1000G/cram/ROI/1000G_sample_ROI.g.vcf
ADD REPLY

Login before adding your answer.

Traffic: 2885 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6