Dear all,
we do have a large number of VCF files , I am attempting to merge all of them by using VCF tools, in the following way :
for f in *.vcf do bgzip -c "$f" > "$f.gz" tabix -p vcf "$f.gz" done
and :
vcf-merge *vcf.gz.
However, during the vcf-merge step, I am getting an error :
Use of uninitialized value in hash element at /usr/local/share/perl/5.18.2/Vcf.pm line 1720, <__ANONIO__> line 1158. Use of uninitialized value in hash element at /usr/local/share/perl/5.18.2/Vcf.pm line 1720, <__ANONIO__> line 1158.
any advice on why we do get this error ? many thanks !
-- bogdan
you could try vcflib's merger.
Thank you Ram for your suggestion, a simple question though : as echo prints the command; how do I execute the java command that echo will print :
"echo -n "java -jar GenomeAnalysisTK.jar -T CombineVariants -R reference.fasta -o combined_output.vcf -genotypemergeOptions UNIQUIFY " && for vcf_file in $(ls folderWith100VcfFiles/*.vcf); do echo -n "--variant ${vcf_file}"; done"
Please do not add your comment as an answer. Move this to a reply to this comment: C: about merging VCF files
To do that, copy the contents of your comment above, click on "Add Reply" on my comment and paste what you copied. Then, hit
Add comment. Once you do that, I will answer your question.