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 on November 11th and 13th 2019, due to the U.S. holiday(Veteran's day) and due to a team event(Nov 13th). We will return to monitoring the GATK forum on November 12th and 14th respectively. Thank you for your patience.
Use VariantsToTable to extract alternate allele count
I'm using the following VariantsToTable command options to extract fields from a VCF file:
/usr/lib/jvm/jre-1.8.0-openjdk/bin/java -Xmx8g -jar /home/1GenomeRef/GATK/GATK_3.5/GenomeAnalysisTK.jar \ -T VariantsToTable \ -R ref.fa \ -V file1.vcf \ -F POS -F ID -F REF -F ALT -F QUAL -F FILTER -F AC -F AN -GF GT \ --showFiltered \ --out outputfile \
This extracts the correct information, but my original VCF file reports each sample genotype (GT field) as an alternate allele count (0/0, 0/1 or 1/1) and the new output file reports the genotype as the base (C/T, for example.) So the GT for sample1 in my original file might be "0/1" but in the new file it's recoded as "C/T."
I prefer to retain the original genotype format but do not see an option that allows me to request this. Is there an option I can use for this? Or another tool I can apply that will quickly recode the new VCF?
Thanks so much. (And I am following the Best Practices Guidelines - although we are using GATK version 3.5, this is a choice we made for the purpose of ensuring the highest possible consistency with older data called using version 3.5)