--tmp-dir option user error
AnsweredWhen changing from version 4.1.7.0 to 4.1.8.1 I get the following user error. I use the exact same command for 4.1.7.0 but there is no error. It's as if GATK doesn't recognize the option --tmp-dir anymore and thinks tmp-dir is part of the argument.
A USER ERROR has occurred: Can't parse option name containing an embedded '=' (tmp-dir=/tmp/tmp.SzxBuR)
(REQUIRED) Please provide:
a) GATK version used:
4.1.8.1
b) Exact command used:
/nfs/fs1/bioinfo/apps-x86_64/GATK/gatk-4.1.8.1/gatk --java-options "-Djava.io.tmpdir=/tmp/tmp.SzxBuR -Xmx51200M -Xms51200M" GenotypeGVCFs -R /odinn/data/extdata/1000genomes/2019-06-21_GRCh38/GRCh38_full_analysis_set_plus_decoy_hla.fa -V gendb:///tmp/tmp.SzxBuR/GDB --tmp-dir=/tmp/tmp.SzxBuR --interval-padding 1000 --only-output-calls-starting-in-intervals -L chr13:111091671-111100000 -O /tmp/tmp.SzxBuR/splitdir/reg_6.padded.vcf.gz
c) Entire error log:
***********************************************************************
A USER ERROR has occurred: Can't parse option name containing an embedded '=' (tmp-dir=/tmp/tmp.SzxBuR)
***********************************************************************
Set the system property GATK_STACKTRACE_ON_USER_EXCEPTION (--java-options '-DGATK_STACKTRACE_ON_USER_EXCEPTION=true') to print the stack trace.
parallel: This job failed:
/nfs/fs1/bioinfo/apps-x86_64/GATK/gatk-4.1.8.1/gatk --java-options "-Djava.io.tmpdir=/tmp/tmp.SzxBuR -Xmx51200M -Xms51200M" GenotypeGVCFs -R /odinn/data/extdata/1000genomes/2019-06-21_GRCh38/GRCh38_full_analysis_set_plus_decoy_hla.fa -V gendb:///tmp/tmp.SzxBuR/GDB --tmp-dir=/tmp/tmp.SzxBuR --interval-padding 1000 --only-output-calls-starting-in-intervals -L chr13:111091671-111100000 -O /tmp/tmp.SzxBuR/splitdir/reg_6.padded.vcf.gz
-
Hi Brynjar Sigurðsson, is this the entire stack trace?
-
It prints the entire help for GenotypeGVCFs but other than that yes.
-
I see in the help message the format of the option has changed to
--tmp-dir:GATKPath
So colon instead of equals, I guess this was my problem.
-
The example used in the docs still uses '=' and there is no mention of this command line syntax change, if this is how it works now.
https://gatk.broadinstitute.org/hc/en-us/articles/360047218551-GenotypeGVCFs
-
Brynjar Sigurðsson, great, glad you fixed the issue! I'll make a note to update the documentation.
-
I too ran into this issue.
--tmp-dir:GATKPath did not work for me and is indeed what is present in the help message. Got error "No argument value found for tagged argument:"
The following syntax works:
--tmp-dir /path/to/dir
Additionally, the issue is also present with the GenotypeGVCFs command and its documentation: https://gatk.broadinstitute.org/hc/en-us/articles/360047218551-GenotypeGVCFs
-
Hi Brynjar Sigurðsson and Christopher Fiscus, thanks for bringing this to our attention. The correct syntax for the temp directory is the same as all of the other GATK arguments.
--tmp-dir /path/to/dir
We will be updating the GenotypeGVCF and GenomicsDBImport articles to correctly reflect this. Regarding the help message, --tmp-dir:GATKPath does not work as written with a colon. All arguments are written this way in our help message with the argument type after the colon. However, this is definitely confusing, and we are looking at changing how it is written.
Sorry for the confusion that this has caused, thanks for writing in and bringing this to our attention!
-
Yes, I ended up using a whitespace. I think however it is more important for you to keep backwards compatibility with the "=" syntax. It is highly questionable to change this in a minor version update.
-
Brynjar Sigurðsson unfortunately the "=" syntax should have previously thrown an error, it has never been the correct syntax with GATK4. (It is the correct syntax while using Picard tools). We are sorry for the confusion with this. Going forward the syntax will continue to be a space.
-
Dear colleagues
I'm trying to run MergeBamAlignment and got this same error message mentioned in this thread.
...
Can't parse option name containing an embedded '=' (ALIGNED_BAM=/scratch/job.207362/output/inter/AC01.aligned.bam)
Tool returned:
1
Using GATK jar /gatk/gatk-package-4.2.4.1-local.jar
Running:
java -Dsamjdk.use_async_io_read_samtools=false -Dsamjdk.use_async_io_write_samtools=true -Dsamjdk.use_async_io_write_tribble=false -Dsamjdk.compression_level=2 -Xmx16G -jar /gatk/gatk-package-4.2.4.1-local.jar MergeBamAlignment --ALIGNED_BAM=/scratch/job.207362/output/inter/AC01.aligned.bam --UNMAPPED_BAM=/scratch/job.207362/output/inter/AC01.unmapped.marked.bam
srun: error: c13: task 0: Exited with exit code 4
...I'm running gatk 4.2.4.1 in a docker container (singularity pull docker://broadinstitute/gatk:latest), in a cluster on Linux 3.10.0-1160.el7.x86_64 amd64; OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08; Deflater: Intel; Inflater: Intel; Provider GCS is available; Picard version: Version:4.2.4.1
Part of my script:
____________
local_job="/scratch/job.${SLURM_JOB_ID}"
local_in="${local_job}/input"
local_in1="${local_in}/rawreads"
local_in2="${local_in}/ref"
local_out="${local_job}/output"
local_out1="${local_out}/vcf"
local_out2="${local_out}/inter"files="AC01
PA13
BA01"echo "Merge BAM Alignment"
for file in $files
do
gatk --java-options "-Xmx16G" MergeBamAlignment --ALIGNED_BAM="${local_out2}/${file}.aligned.bam" \
--UNMAPPED_BAM="${local_out2}/${file}.unmapped.marked.bam" \
-O="${local_out2}/${file}.mergebamalignment.bam" \
-R="${local_in2}/ref.fasta" --CREATE_INDEX=true --ADD_MATE_CIGAR=true \
--CLIP_ADAPTERS=true --CLIP_OVERLAPPING_READS=true \
--INCLUDE_SECONDARY_ALIGNMENTS=true --MAX_INSERTIONS_OR_DELETIONS=-1 \
--PRIMARY_ALIGNMENT_STRATEGY=MostDistant --ATTRIBUTES_TO_RETAIN=XS \
--TMPDIR="${local_job}"
done____
FastqToSam, MarkIlluminaAdapters and BWASpark worked very well. This is a test script, but the final one will be with more than 300 samples. That's why I'm using a for loop.
Thanks!
-
Karina Martins try submitting your arguments like this:
gatk --java-options "-Xmx16G" MergeBamAlignment \
--ALIGNED_BAM "${local_out2}/${file}.aligned.bam" \
--UNMAPPED_BAM "${local_out2}/${file}.unmapped.marked.bam" \
-O "${local_out2}/${file}.mergebamalignment.bam" \
-R "${local_in2}/ref.fasta" \
--CREATE_INDEX true --ADD_MATE_CIGAR true \
--CLIP_ADAPTERS true --CLIP_OVERLAPPING_READS true \
--INCLUDE_SECONDARY_ALIGNMENTS true --MAX_INSERTIONS_OR_DELETIONS -1 \
--PRIMARY_ALIGNMENT_STRATEGY MostDistant --ATTRIBUTES_TO_RETAIN XS \
--TMPDIR "${local_job}"Let me know if that fixes the issue.
Best,
Genevieve
-
Hi Genevieve
Thank you! I had to change --TMPDIR "${local_job}" to --TMP_DIR "${local_job}". After this, it worked.
I tried this syntax before (several times...), but never worked. Maybe I was commiting an error or typo I didn't identified. The error message was:
________
Illegal argument value: Positional arguments were provided ', }' but no positional argument is defined for this tool.
Tool returned:
1
Using GATK jar /gatk/gatk-package-4.2.4.1-local.jar
Running:
java -Dsamjdk.use_async_io_read_samtools=false -Dsamjdk.use_async_io_write_samtools=true -Dsamjdk.use_async_io_write_tribble=false -Dsamjdk.compression_level=2 -Xmx16G -jar /gatk/gatk-package-4.2.4.1-local.jar MergeBamAlignment --ALIGNED_BAM /scratch/job.207243/output/inter/AC01.aligned.bam --UNMAPPED_BAM /scratch/job.207243/output/inter/AC01.unmapped.marked.bam
srun: error: c16: task 0: Exited with exit code 4_____
I then found in another thread of this forum that the syntax was wrong. I then followed the correct syntax informed in the help message of this GATK version, as pasted below:
USAGE: MergeBamAlignment [arguments]
...
<h3>Usage example:</h3>java -jar picard.jar MergeBamAlignment \
ALIGNED=aligned.bam \
UNMAPPED=unmapped.bam \
O=merge_alignments.bam \
R=reference_sequence.fasta________
Maybe, updating the help message of MergeBam Aligment for this GATK version would be nice.
Thank you again for helping me.
Karina
-
Thanks Karina for the update! That makes sense regarding the temp dir, I should have caught that. Glad you have it working!
Please sign in to leave a comment.
13 comments