Syntax for MergeGVCFs function resulting in "no positional argument is defined"
I am trying to run MergeGVCF's obtained from the HaplotypeCaller example posted by GATK, however upon reaching the first VCF file when merging, the program errors out and says "Illegal argument value: Positional arguments were provided ',ERR194159-30x.hg38.g.vcf.gz}' but no positional argument is defined for this tool."
I understand this error is typically because of syntax errors and spacing - however, I am not sure what in my code is wrong syntactically as it matches exactly the code posted in the public code of the workflow I'm basing it on. I am essentially just converting mapped BAM files to VCF's.
The official GATK example workflow I am referring to is on line 265 found through this open source link:
Also important: I am using multiple interval list files as part of the argument that are .BED files I obtained from the manufacturer.
REQUIRED for all errors and issues:
a) GATK version used: 4.2.6.1
b) Exact command used:
I am calling GATK through AWS Healthomics using the WDL command,
command {
echo MergeGVCFs
set -euxo pipefail
~{gatk_path} --java-options "-Xmx~{command_mem_gb}G" \
MergeVcfs \
--INPUT ~{sep=' --INPUT ' input_vcfs} \
--OUTPUT ~{output_filename}
# determine final scratch size used
~{disk_usage_cmd}
}
I obtained this directly from the official examples posted by GATK best practices on github for the AWS Healthomics examples.
c) Entire program log:
Task started |
+ echo Task started |
+ cd /mnt/workflow/3316253/20240610_171352_HaplotypeCallerGvcf_GATK4/call-MergeGVCFs/work |
+ bash ../command |
++ tee -a ../stdout.txt |
++ tee -a ../stderr.txt |
MergeGVCFs |
+ /gatk/gatk --java-options -Xmx6G MergeVcfs --INPUT --OUTPUT ERR194159-30x.hg38.g.vcf.gz |
USAGE: MergeVcfs [arguments] |
<p>Combines multiple variant files into a single variant file.</p><h3>Inputs</h3><ul> <li>One or more input file in |
VCF format (can be gzipped, i.e. ending in ".vcf.gz", or binary compressed, i.e. ending in ".bcf").</li> |
<li>Optionally a sequence dictionary file (typically name ending in .dict) if the input VCF does not contain a |
complete contig list and if the output index is to be created (true by default).</li> </ul> <p> The input variant |
data must adhere to the following rules:</p> <ul> <li>If there are samples, those must be the same across |
all input files.</li> <li>Input file headers must be contain compatible declarations for common annotations |
(INFO, FORMAT fields) and filters.</li> <li>Input files variant records must be sorted by their contig and |
position following the sequence dictionary provided or the header contig list.</li> </ul> <p>You can either |
directly specify the list of files by specifying <code>INPUT</code> multiple times, or provide a list in a file with |
name ending in ".list" to <code>INPUT</code>.</p> <h3>Outputs</h3> <p>A VCF sorted (i) according to the dictionary and |
(ii) by coordinate.</p> <h3>Usage examples</h3> <h4>Example 1:</h4> <p>We combine several variant files in different |
formats, where at least one of them contains the contig list in its header.</p> <pre>java -jar picard.jar MergeVcfs \ |
I=input_variants.01.vcf \ |
I=input_variants.02.vcf.gz \ |
O=output_variants.vcf.gz</pre> <h4>Example 2:</h4> <p>Similar to example 1 but we use an input list file to specify the |
input files:</p> <pre>java -jar picard.jar MergeVcfs \ |
I=input_variant_files.list \ |
O=output_variants.vcf.gz</pre><hr/> |
Version:4.2.6.1 |
Required Arguments: |
--INPUT,-I <PicardHtsPath> VCF or BCF input files (File format is determined by file extension), or a file having a |
'.list' suffix containing the path to the files, one per line. This argument must be |
specified at least once. Required. |
--OUTPUT,-O <File> The merged VCF or BCF file. File format is determined by file extension. Required. |
Optional Arguments: |
--arguments_file <File> read one or more arguments files and add them to the command line This argument may be |
specified 0 or more times. Default value: null. |
--COMMENT,-CO <String> Comment(s) to include in the merged output file's header. This argument may be specified |
0 or more times. Default value: null. |
--COMPRESSION_LEVEL <Integer> Compression level for all compressed files created (e.g. BAM and VCF). Default value: 2. |
--CREATE_INDEX <Boolean> Whether to create an index when writing VCF or coordinate sorted BAM output. Default |
value: true. Possible values: {true, false} |
--CREATE_MD5_FILE <Boolean> Whether to create an MD5 digest for any BAM or FASTQ files created. Default value: |
false. Possible values: {true, false} |
--GA4GH_CLIENT_SECRETS <String> |
Google Genomics API client_secrets.json file path. Default value: client_secrets.json. |
--help,-h <Boolean> display the help message Default value: false. Possible values: {true, false} |
--MAX_RECORDS_IN_RAM <Integer>When writing files that need to be sorted, this will specify the number of records stored |
in RAM before spilling to disk. Increasing this number reduces the number of file handles |
needed to sort the file, and increases the amount of RAM needed. Default value: 500000. |
--QUIET <Boolean> Whether to suppress job-summary info on System.err. Default value: false. Possible |
values: {true, false} |
--REFERENCE_SEQUENCE,-R <File>Reference sequence file. Default value: null. |
--SEQUENCE_DICTIONARY,-D <PicardHtsPath> |
The index sequence dictionary to use instead of the sequence dictionary in the input files |
Default value: null. |
--TMP_DIR <File> One or more directories with space available to be used by this program for temporary |
storage of working files This argument may be specified 0 or more times. Default value: |
null. |
--USE_JDK_DEFLATER,-use_jdk_deflater <Boolean> |
Use the JDK Deflater instead of the Intel Deflater for writing compressed output Default |
value: false. Possible values: {true, false} |
--USE_JDK_INFLATER,-use_jdk_inflater <Boolean> |
Use the JDK Inflater instead of the Intel Inflater for reading compressed input Default |
value: false. Possible values: {true, false} |
--VALIDATION_STRINGENCY <ValidationStringency> |
Validation stringency for all SAM files read by this program. Setting stringency to |
SILENT can improve performance when processing a BAM file in which variable-length data |
(read, qualities, tags) do not otherwise need to be decoded. Default value: STRICT. |
Possible values: {STRICT, LENIENT, SILENT} |
--VERBOSITY <LogLevel> Control verbosity of logging. Default value: INFO. Possible values: {ERROR, WARNING, |
INFO, DEBUG} |
--version <Boolean> display the version number for this tool Default value: false. Possible values: {true, |
false} |
Advanced Arguments: |
--showHidden <Boolean> display hidden arguments Default value: false. Possible values: {true, false} |
Illegal argument value: Positional arguments were provided ',ERR194159-30x.hg38.g.vcf.gz}' but no positional argument is defined for this tool. |
Tool returned: |
1 |
Using GATK jar /gatk/gatk-package-4.2.6.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 -Xmx6G -jar /gatk/gatk-package-4.2.6.1-local.jar MergeVcfs --INPUT --OUTPUT ERR194159-30x.hg38.g.vcf.gz |
+ EXIT_CODE=4 |
+ '[' 4 -eq 0 ']' |
+ echo Task failed |
Task failed |
+ exit 4 |
-
Hi R O
Your command line seems to be incomplete
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 -Xmx6G -jar /gatk/gatk-package-4.2.6.1-local.jar MergeVcfs --INPUT --OUTPUT ERR194159-30x.hg38.g.vcf.gz
There is no INPUT defined in the --INPUT section in the final executed command.
-
Thanks for that catch! I supposed that there is something wrong with looping over beforehand that populates the list of VCfs so that there's nothing that gets merged in the end? Right now the example workflow intakes BAM's which I have checked are valid - and then iterates over a set of interval files - which is a zipped folder of one .BED file that I obtained
Please sign in to leave a comment.
2 comments