Notice:
If you happen to see a question you know the answer to, please do chime in and help your fellow community members. We appreciate your help!
If you happen to see a question you know the answer to, please do chime in and help your fellow community members. We appreciate your help!
Testdrive 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 userfriendly interface!) without having to install anything.
VariantsToTable question
estif74
Saint Paul, MN, USAMember ✭
Hi there,
When using the VariantsToTable function, is there a way to force the genotypes to be numeric, i.e. 0/1 or 0/0 rather than the actual bases like G/T, G/G, etc.? I can't seem to find anything in the tool documentation, but maybe there's another way.
Thanks,
Steve
Tagged:
Best Answer

Sheila Broad Institute admin
@estif74
Hi Steve,Unfortunately, there is no option to do that. Please have a look at this thread: http://gatkforums.broadinstitute.org/discussion/4801/genotypesandvariantstotablewalker
Sheila
Answers
@estif74
Hi Steve,
Unfortunately, there is no option to do that. Please have a look at this thread: http://gatkforums.broadinstitute.org/discussion/4801/genotypesandvariantstotablewalker
Sheila
If you are working with only biallelic sites you can use
F HET F HOMVAR
to get the GT information in a more usable form, then use (dirty) tricks like the following:Thanks! That's helpful :) I was able to use some potentially less dirty tricks in Excel to get this working given that my (current) dataset is somewhat manageable in size.
To get a genotypes table with 0, 1 and 2 representing genotypes, I used Plink to generate a binary dosage format. https://www.coggenomics.org/plink2/data
Abracadabra ...
Hi,
I can't figure out why the FT field is being represented as NA instead of PASS or lowGQ. Can someone explain this? thanks.
T VariantsToTable \
R /work/lianglab/bin/GATK/resources/hg19/ucsc.hg19.fasta \
V /work/lianglab/wgs/ASD/VCF/GATK/GATK.chr1.recalibratedVariants.filtered.vcf \
SMA \
F CHROM \
F POS \
F ID \
F REF \
F ALT \
GF GT \
GF FT \
o /work/lianglab/wgs/ASD/VCF/GATK/GATK_chr1_C1_results.table \
RESULTS:
chr1 10146 rs375931351 AC A AC/AC NA ./. NA AC/AC NA AC/AC NA AC/AC NA AC/AC NA AC/AC NA AC/AC NA ./. NA AC/AC NA ./. NA ./. NA AC/AC NA ./. NA ./. NA ./. NA ./. NA AC/AC NA ./. NA ./. NA AC/AC NA AC/AC NA ./. NA AC/AC NA ./. NA ./. NA AC/AC NA AC/AC NA AC/AC NA ./. NA ./. NA ./. NA ./. NA ./. NA AC/AC NA ./. NA AC/AC NA AC/AC NA ./. NA AC/AC NA ./. NA AC/AC NA AC/AC NA AC/AC NA AC/AC NA ./. NA AC/AC NA ./. NA AC/AC NA AC/AC NA ./. NA ./. NA AC/AC NA ./. NA AC/AC NA ./. NA ./. NA ./. NA AC/AC NA AC/AC NA ./. NA ./. NA ./. NA ./. NA ./. NA AC/AC NA ./. NA ./. NA ./. NA AC/AC NA ./. NA AC/AC NA AC/AC NA AC/AC NA ./. NA ./. NA ./. NA AC/AC NA ./. NA AC/AC NA AC/AC NA AC/AC NA ./. NA AC/AC NA ./. NA AC/AC NA ./. NA AC/AC NA AC/AC NA AC/AC NA ./. NA AC/AC NA ./. NA AC/AC NA AC/AC NA ./. NA ./. NA