Generating a PoN with GATK CombineVariants using wildcards
1
0
Entering edit mode
4.5 years ago
graeme.thorn ▴ 100

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.

vcf gatk • 892 views
ADD COMMENT
1
Entering edit mode
4.5 years ago
graeme.thorn ▴ 100

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.

ADD COMMENT

Login before adding your answer.

Traffic: 1778 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