Heads up:
We’re moving the GATK website, docs and forum to a new platform. Read the full story and breakdown of key changes on this blog.
If you happen to see a question you know the answer to, please do chime in and help your fellow community members. We encourage our fourm members to be more involved, jump in and help out your fellow researchers with their questions. GATK forum is a community forum and helping each other with using GATK tools and research is the cornerstone of our success as a genomics research community.We appreciate your help!

Test-drive the GATK tools and Best Practices pipelines on Terra

Check out this blog post to learn how you can get started with GATK and try out the pipelines in preconfigured workspaces (with a user-friendly interface!) without having to install anything.
We will be out of the office for a Broad Institute event from Dec 10th to Dec 11th 2019. We will be back to monitor the GATK forum on Dec 12th 2019. In the meantime we encourage you to help out other community members with their queries.
Thank you for your patience!

[GATK4] combining g.vcf files for single sample on different intervals

tcezardtcezard EdinburghMember

I'm working with WGS using GATK 4.1.0 HaplotypeCaller to generate g.vcf file on many different non overlapping intervals.
I'd like to have a single final g.vcf file for the sample.
I'm trying to combine the g.vcf file using CombineGVCF but this seems very slow (>24 hours for 100 g.vcf file).

gatk CombineGVCFs --output out.g.vcf  --reference hg38.fa -V list_g.vcf_file

I tried concatenating the g.vcf with unix tools.

cat <(grep '^#' {first.g.vcf}) <(cat `cat {list_g.vcf_file}` | grep -v '^#' )  > output.g.vcf

That took about a minute and a half.
Considering I know the order of the intervals and the fact that they are non overlapping, is there a fundamental problem with concatenating g.vcf files?


  • tcezardtcezard EdinburghMember

    I wanted to add that I have tried GatherVCF and MergeVCF and both had failed with error:
    Illegal character in fragment at index 1: ##fileformat=VCFv4.2
    I though that this was due to the fact that I'm merging GVCF files instead of VCF files.
    Turns out this is due to the file extension I was using .gvcf instead of .g.vcf.
    I'll be trying this two tools now.

    My original question still stand though would there be any issue with using unix tools to concatenate?

  • tcezardtcezard EdinburghMember

    Both GatherVCF and MergeVCF finished relatively promptly (~ 1 hour) and produced exactly the same g.vcf file as the concatenated file generated with unix tool.

  • bhanuGandhambhanuGandham Cambridge MAMember, Administrator, Broadie, Moderator admin

    Hi @tcezard

    If you are able to produce the exact same files with all three methods (unix, GatherVCF and MergeVCF) and if you are able to concatenate it in the right order then it probably should work for your purposes. Let me know if you find any errors with this in the downstream steps. I am curious to know if it would work.

Sign In or Register to comment.