How to give multiple input files to the gatk ?
Hi all,
I want to use gatk-package-4.2.0.0 for updating my VCF dictionary. I use the script below for just one VCF file, and it has worked so far.
java -jar gatk-package-4.2.0.0-local.jar UpdateVCFSequenceDictionary
-V /PATH _TO_INPUT_FILE.vcf --sequence-dictionary /PATH_TO_DICTIONARY.dict -O /PATH_TO_OUTPUT_FILE.vcf
Now I have multiple input files with different names. How should I change my script to update the dictionary of all files?
Thanks for any help
• 1,693 views
•
link
0 answers
No answers yet.
Log in to answer this question.
Use a
forloop? Something like:This would just run the command on each of your vcf files individually. If what you want is to run one command on multiple input files together, you can either use the -V parameter multiple times (like -V one.vcf -V two.vcf -V three.vcf ) or use a text file listing all your inputs (one file path per line). I’m a little fuzzy on the exact syntax for that option but it may be as simple as -V my_inputs.txt
This should be documented in the -V parameter paragraph in the tool doc, or you can always ask in the GATK forum, they are super helpful (disclaimer: I used to run the GATK forum)