US Holiday notice: this Thursday and Friday (Nov 25-26) the forum will be unattended. Normal service will resume Monday Nov 29. Happy Thanksgiving!

CatVariants or CombineVariants

jacobhsujacobhsu Hong KongPosts: 7Member

If I want to merge different VCF files, which I used -L argument for calling variants against to different chromosomes individually with the same list of samples by HaplotypeCaller. I mean the sample are the same, I just used -L to call variants chromosome by chromosome separately. I suppose whether catVariants or CombineVariant will give me the same results, right ?

Comments

  • Geraldine_VdAuweraGeraldine_VdAuwera Posts: 6,682Administrator, GATK Developer admin

    Yes, they will give you the same results; only the headers will be slightly different because CatVariant will just use the header of the first VCF file, while CombineVariants will generate a new header. CatVariants is faster.

    Geraldine Van der Auwera, PhD

  • jacobhsujacobhsu Hong KongPosts: 7Member

    Thanks for quick reply. Here is the original command I tried

    ${java7} -Xmx2g -jar $GATK/GenomeAnalysisTK.jar \ -R $reference_genome \ -T CombineVariants \ --variant $inputdir/chr01.vcf \ --variant $inputdir/chr02.vcf \ --variant $inputdir/chr03.vcf \ --variant $inputdir/chr04.vcf \ -o $vcf_output \ -nt 8 \ -genotypeMergeOptions UNIQUIFY

    Will that be different than this ?

    ${java7} -cp $GATK/GenomeAnalysisTK.jar org.broadinstitute.sting.tools.CatVariants \ -R $reference_genome \ -V $inputdir/chr01.vcf \ -V $inputdir/chr02.vcf \ -V $inputdir/chr03.vcf \ -V $inputdir/chr04.vcf \ -out $vcf_output \ -assumeSorted

    As you mentioned it, the CombineVariants will generate another header and the size is larger than CatVariants very much, but the content is the same. Could you please explain more ?

  • Geraldine_VdAuweraGeraldine_VdAuwera Posts: 6,682Administrator, GATK Developer admin

    The results, in terms of how variant records are combined, should be essentially the same if the files you are merging involve all the same samples, just different chromosomes. What differences are you observing exactly? Can you maybe post the headers?

    Geraldine Van der Auwera, PhD

Sign In or Register to comment.