Generating a PoN with GATK CombineVariants using wildcards
Is there a way to pass a wildcard to the -V parameter to GATK CombineVariants? Like this:
<GATK3> -T CombineVariants -R <reference> -V <loc>/*${mask}*.vcf -o <output> ...
I want to be able to give various masks (in the bash variable $mask) to dice up my list of vcfs to generate several different panels from vcfs derived from 1000G data, split by the region code.
• 1,386 views
•
link
1 answer
For those that need to know, a potential solution is here: https://unix.stackexchange.com/questions/375568/bash-wilcard-expansion-with-command-line-switch:
for f in <loc>/*${mask}*.vcf
do
args+=(-V "$f")
done
<GATK3> -T CombineVariants -R <reference> ${args[@]} -o <output> ...
Building a bash array like this works with Unix/Linux and with MacOS terminal. The other answer on this page (using lconv) might not work, depending on what shell you use.
• 0 views
•
link
Log in to answer this question.