Dear All,
I have to call genotype for multiple samples using joint genotyping methedology of GATK best practices, So I made a shell script which take list of samples in a text file as an input, and script through all commands on each sample one by one up to GVCF step. After generating GVCF for each sample, I want to call joint genotype using following command:
java -jar GenomeAnalysisTK.jar -T GenotypeGVCFs -R hg19.fa -V sample1.g.vcf -V sample2.g.vcf [.. -V sampleN.g.vcf] -o rawVariants.vcf
So I pass "-V sample1.g.vcf -V sample2.g.vcf -V sampleN.g.vcf" as a variable like below:
V="-V sample1.g.vcf -V sample2.g.vcf .. -V sampleN.g.vcf"
java -jar GenomeAnalysisTK.jar -T GenotypeGVCFs -R hg19.fa `echo $V` -o rawVariants.vcf
OR
java -jar GenomeAnalysisTK.jar -T GenotypeGVCFs -R hg19.fa $V -o rawVariants.vcf
I got "ERROR MESSAGE: Invalid argument value '-V sample1.g.vcf -V sample2.g.vcf .. -V sampleN.g.vcf'.
Please provide me some way to pass '-V sample1.g.vcf -V sample2.g.vcf .. -V sampleN.g.vcf' to the GATK command in shell script.
Thanks in advance!