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.
CatVariants mis-sorting input VCFs
When using CatVariants on my data, I noticed that it was consistently mis-sorting the output (when not using --assumeSorted; in my case, using the --assumeSorted is not feasible as the input VCFs are not ordered). Looking at the code, it appears that CatVariants is sorting the output files based on the position of the first variant in the VCF file, which can potentially lead to strange behavior. As an example, assume we have the following 3 VCF files to concatenate:
#CHROM POS 1 10
#CHROM POS 1 30
#CHROM POS 2 20
Without the --assumeSorted option, CatVariants would output
#CHROM POS 1 10 2 20 1 30
I've attempted a fix for the issue by using the VariantContext of the first variant instead of the position (null VariantContext in the case of assumeSorted) here: https://github.com/broadgsa/gatk-protected/pull/13.