Notice:
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.

Questions about interpreting VCF files

Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin
This discussion was created from comments split from: How should I interpret VCF files produced by the GATK?.

Comments

  • ZaagZaag Member ✭✭

    I have ABHet and ABHom in my vcf file and I can not find information about what they stand for. Could anyone explain or give some pointers. Thanks.

  • ebanksebanks Broad InstituteMember, Broadie, Dev ✭✭✭✭

    If you look at the VCF header it gives the definitions there (e.g. ABHet = Allele Balance for hets (ref/(ref+alt))). Unfortunately, we haven't done a great job documenting non-standard annotations.

  • Hi, I'm a little confused about the QUAL field for multi-sample VCF. When there are multiple samples, how is the single QUAL value calculated? What exactly does that single value represent in this case?

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Hi there,

    In the method article Using the Unified Genotyper, there is a link to a document that explains the math of the EXACT model, i.e. how the QUAL value is calulated.

  • Hi there,

    I am a bit confused about the genotype column described here and in the linked VCF documentation.
    The explanation of the GQ is different.
    Here you say: "The Genotype Quality, or Phred-scaled confidence that the true genotype is the one provided in GT."

    And in the VCF version 4 document it is explained like this:
    "GQ genotype quality, encoded as a phred quality -10log_10p(genotype call is wrong) (Numeric)"

    Which one is right now? From the examples given it seems that the second one is right...
    Or is there a misinterpretation of your explanation from my side?

    Thanks

  • ebanksebanks Broad InstituteMember, Broadie, Dev ✭✭✭✭

    These are the same things. The VCF definition is the mathematically correct one, while ours is written in "layman's terms."

  • mhtmht Member

    Hi, I have vcf files, but I'm unsure how to determine the genotype of each SNP and I can't find any guide to how to use GQ and PL to obtain the correct genotypes (whether a SNP is truly heterozygous or homozygous). Can someone point me to some function or method as to how to do this? Thanks

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin
    edited November 2012

    All that is answered by point 4 of this document.

    How genotypes are represented

  • mhtmht Member

    Oh, I got confused by the example for NA12878 at chr1:899282. I thought from the explanation we still needed to set GQ and PL thresholds to determine exact genotypes. The reason I asked is because I have some really low GQ (some as low as 0) and was wondering if I should filter, and also what threshold to set it at.

    Thks for your help!

  • MattCowpMattCowp Member

    Can you help me understand the first example in section 4 above?

    0/1:173,141:282:99:255,0,255

    Why is there high-confidence (99) in a 0/1 genotype in the GQ field but low confidence (0) in the PL field for 0/1?

    Thanks!

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Hi Matt, you are misunderstanding the PL field. The key sentence is here:

    The most likely genotype (given in the GT field) is scaled so that it's P = 1.0 (0 when Phred-scaled), and the other likelihoods reflect their Phred-scaled likelihoods relative to this most likely genotype.

  • mgymrekmgymrek Member

    Hello,

    In the example above (which is VCF4.0), it is noted that the PL field is only provided when the site is biallelic. In the specification for VCF4.1, the GL and PL fields are defined for multiallelic sites. Can GATK currently handle these?

    If multiallelic sites are supported, is it possible to merge genotypes (using CombineVariants) from different VCF files that have alternate alleles listed in a different order (or even completely different alternate alleles listed). In such cases will the PL field be updated correctly? Or does it require that in each file being merged have exactly the same ALT alleles listed in the same order?

    Thanks,
    ~M

  • ebanksebanks Broad InstituteMember, Broadie, Dev ✭✭✭✭

    Thanks, Melissa. I removed the line about the PLs not being produced for sites that aren't bi-allelic (that was from a long, long time ago).

    So, yes, we generally do support multi-allelic sites. But not in CombineVariants; when combining records that do not have the same exact alt alleles, we strip out the PLs. To regenerate them you really need to go back to the BAMs.

  • newbie16newbie16 Member

    The QUAL definition here describes it as "probability of Probability of REF/ALT polymorphism". Shouldnt it be just "Probability of REF/ALT polymorphism"? Or am I understanding something wrong?

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Yeah, that looks like a copy/paste-induced typo, thanks for pointing it out. Will fix.

  • seb951seb951 Member

    The last part of section 4 is unclear to me because it looks like probabilities are calculated differently for each genotype. Let me explain:

    According to the text, there is a "lack of certainty" in the genotype call because:
    PL(0/1) = 0, from which it is inferred that there is a "lack of certainty" of this genotype being true.
    PL(1/1) = 26 = 10^(-2.6) = 0.25%, from which it is inferred that "there's a serious chance that the subject is hom-var"
    PL(0/0) = 103 = 10^(-10.3) = very small number, from which it is inferred that "the subject is definitely not home-ref".

    But according to me:
    PL(0/1) = 10^(0) = 100% , from which I infer that the heterozygous reference/alternate genotype IS VERY LIKELY.
    PL(1/1) = 26 = 10^(-2.6) = 0.25%, from which I infer that it is highly unlikely that it is the homozygous alternate genotype.
    PL(0/0) = 103 = 10^(-10.3) = very small number, from which I infer that it is highly unlikely that it is the homozygous reference genotype.

    Am I reading this wrong? Can you define genotypes in terms terms of reference / alternate alleles instead of " hom-var", "home-ref" ? and also define a "lack of certainty"?

    Thanks a lot,

    sebastien

    With that out of the way, let's interpret the genotypes for NA12878 at chr1:899282.
    chr1 899282 rs28548431 C T [CLIPPED] GT:AD:DP:GQ:PL 0/1:1,3:4:25.92:103,0,26
    At this site, the called genotype is GT = 0/1, which is C/T. The confidence (GQ=25.92) isn't so good, largely because there were only a total of 4 reads at this site (DP=4), 1 of which was ref (=had the reference base) and 3 of which were alt (=had the alternate base) (AD=1,3). The lack of certainty is evident in the PL field, where PL(0/1) = 0 (the normalized value), whereas there's a serious chance that the subject is hom-var (=homozygous with the variant allele) since PL(1/1) = 26 = 10^(-2.6) = 0.25%. Either way, though, it's clear that the subject is definitely not home-ref (=homozygous with the reference allele) here since PL(0/0) = 103 = 10^(-10.3) which is a very small number.

  • I thought the DP in INFO field means the total coverage. Why in the given example the AD in FORMAT field doesn't add up to the DP in INFO field? Anyone knows? Thank you!!

    chr1 873762 . T G 5231.78 PASS AC=1;AF=0.50;AN=2;DP=315;Dels=0.00;HRun=2;HaplotypeScore=15.11;MQ=91.05;MQ0=15;QD=16.61;SB=-1533.02;VQSLOD=-1.5473 GT:AD:DP:GQ:PL 0/1:173,141:282:99:255,0,255

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    We've explained this again and again in this forum. Look up the meaning of the DP and AD annotations in the Technical Documentation, and the reason should become clear...

  • patidarrpatidarr Member

    Hi Geraldine,

    I got a vcf file from a collaborator from Broad and I am confused on the sample filed:
    for all the Homozygous Variants SNPs the fiels is like ==> 1/1:0,1:127:99:3262,381,0
    and for all the Homozygous Reference SNPS ==> 0/0:1,0:127:99:0,379,2880

    I am wondering why the allelic count is not equal to the total count ? as in the following case:

    0/1:73,78:151:99:1545,0,1003.

    Any Help is highly appreciated.

    Thanks,
    Rajesh

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    DP is filtered, AD is unfiltered.

  • xhzhaoxhzhao Member

    Hello,

    What does it mean when the Alt field has multiple alleles separated by comma?
    For example:

    chr1 201333017 . CT CTT,C 7591.42 . AC=1,1;AF=0.50,0.50;AN=2;BaseQRankSum=4.656;DP=1528;FS=1.583;HaplotypeScore=9115.9044;MQ=56.76;MQ0=2;MQRankSum=-0.362;QD=4.97;ReadPosRankSum=-0.709;SB=-2050.23 GT:AD:DP:GQ:PL 1/2:889,0,10:1522:99:7591,3624,7034,3292,0,11050

    Does it mean that at this locus, both alleles are possible? Would this only happen when there are indels?

    thanks,
    Sharon

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Hi Sharon,

    This means that the program observed two possible alternate alleles in the data. This can happen for any diploid organism; both chromosomes can have different variants that are themselves different from the "normal" reference.

    Please see the VCF specification for more details on how to interpret VCF files.

    http://www.1000genomes.org/wiki/Analysis/Variant Call Format/vcf-variant-call-format-version-41

  • xhzhaoxhzhao Member

    Thanks a lot Geraldine!

    Best regards,
    Sharon

  • SharonCoxSharonCox Member

    Dear Geraldine,
    I'm sorry to ask you a silly question but my vcf files generated by Haplotypecaller and UG don't seem to have called the 0/0 gentotype but only 0/1: and 1/1
    e.g.: 0/119,10:99:191,0,484
    e.g.: 1/1:0,10:63:941,63,0

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Hi Sharon,

    Don't worry, there are no silly questions here. By default the callers only output variant sites, so if you are working on a single sample it is normal to not see any hom-ref (0/0) genotypes. If you were working with multiple samples, then you would be likely to see some hom-ref calls, because when there is at least one of the samples that has a variant allele at a position, the caller will output genotypes for all samples at that position even if some are hom-ref.

    If you want the caller to emit genotypes for all positions, whether or not they are variant, use the EMIT_ALL_SITES genotyping mode option (see documentation for more details). Then you will see the hom-ref calls in the vcf too. But be aware that that will produce a much larger vcf file.

  • mpinellimpinelli Member

    Hi Geraldine,
    I am callind indels in exome data from an Illumina platform.

    In the VCF file many variants has 3 (GT:DP:GQ) instead of 5 (GT:AD:DP:GQ:PL) fields in the result section.

    The VCF file comes from a multisample calling, and variants from a single sample were selected and filtered (-T SelectVariants --excludeNonVariants -ef). They seem to be heterozygotes, so I would expect to see the number of reads with and without the variation. Can you help me to understand the output?

    Example:

    chr1 44451115 rs61096284 A AGG 1476.36 PASS AC=1;AF=0.500;AN=2;BaseQRankSum=0.645;DB;DP=3;FS=5.586;InbreedingCoeff=0.0934;MQ=53.62;MQ0=0;MQRankSum=1.502;QD=7.85;RPA=7,9;RU=G;ReadPosRankSum=-1.554;STR;VQSLOD=1.15;culprit=FS GT:AD:DP:GQ:PL 0/1:1,1:3:12:22,0,12 chr1 46726876 rs71862873 GT GTT 1751.27 PASS AC=1;AF=0.500;AN=2;BaseQRankSum=1.583;DB;DP=19;FS=0.371;InbreedingCoeff=-0.4295;MQ=57.70;MQ0=0;MQRankSum=-0.141;QD=1.59;RPA=13,14,12;RU=T;ReadPosRankSum=0.898;STR;VQSLOD=2.79;culprit=FS GT:DP:GQ 0/1:19:60 chr1 47571943 rs10534549 CTTTT CTTTTT 10614.73 PASS AC=1;AF=0.500;AN=2;BaseQRankSum=12.681;DB;DP=17;FS=0.687;InbreedingCoeff=0.4971;MQ=53.20;MQ0=0;MQRankSum=-2.061;QD=2.17;RPA=16,17,12,13,15;RU=T;ReadPosRankSum=0.257;STR;VQSLOD=3.54;culprit=FS GT:DP:GQ 0/1:17:28 chr1 47691568 rs145295250 GCAGA G 6016.56 PASS AC=1;AF=0.500;AN=2;BaseQRankSum=6.816;DB;DP=4;FS=0.000;InbreedingCoeff=0.0205;MQ=58.05;MQ0=0;MQRankSum=1.173;QD=7.06;RPA=3,2;RU=CAGA;ReadPosRankSum=1.269;STR;VQSLOD=3.83;culprit=FS GT:AD:DP:GQ:PL 0/1:2,2:4:99:118,0,124

    Thanks a lot

    Michele

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Hi Michele,

    Can you tell me if this file was generated directly by one of the callers (UG or HC)? Or is it derived in any way from other files, for example if it results from combining multiple vcf files from separate calling runs?

    Also, what version of gatk are you using?

  • mpinellimpinelli Member

    Hi,

    the results were generated with the UG following the best practices and GATK version was 2.4. It was a multisample calling and then, as I wrote, I selected indels from each single sample and filtered them.
    I hope this might help.

    Thank you

    Michele

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    I'm not sure why some of the variants would be missing the AD and PL annotations, especially if they were all called together. We had a bug that caused bad AD annotation values, which was fixed in version 2.6, but never any missing annotations. You could try running VariantAnnotator on a small interval around these variants to add them post-hoc, see if that restores them.

  • volaviivolavii Member

    i observed something stange in the field FORMAT (GT:AD:DP:GQ:PL):
    here the FORMAT fields of four SNPs:

    0/0:8,0:8:24:0,24,324 0/1:10,6:16:99:189,0,360 0/0:3,0:3:9:0,9,122 1/1:0,2:2:6:67,6,0

    In many cases the GQ of the genotype occures in the PL field... But why? The respective value of the GT in PL is 0. First i thougth that happend just accidently, but i have several of these cases.... :/

  • JackJack Member

    I got a vcf file containing the variant chr1 1007394 . CTG C 144.87 . AC=2;AF=1.00;AN=2;DP=5;FS=0.000;MLEAC=2;MLEAF=1.00;MQ=57.52;MQ0=0;QD=14.49;RPA=3,2;RU=TG;STR GT:AD:DP:GQ:PL 1/1:0,5:5:15:182,15,0 I know the "RPA" means the repeats per allele and the "RU" means repeat unit, does it mean the reference sequence is CTGTGTG and the sample sequence is CTGTG ?

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    @Jack, your interpretation is correct.

  • ebanksebanks Broad InstituteMember, Broadie, Dev ✭✭✭✭

    @volavii: that's not strange, it's just math (unless you think math is strange!).
    The likelihoods are normalized so that the most likely is set to P=1.0 (in real space) and the GQ calculation is just the likelihoods of the most likely minus the second most likely genotype. In other words, all is well here.

  • volaviivolavii Member

    @ebanks: THANKS!! thank explains "everything" :)

  • kmhernankmhernan Chicago, ILMember

    Geraldine I am having an issue with my haploid, multi-sample (n=476) VCF file created from the UnifiedGenotyper. I have some cases where the same chromosome:position is in the file, but have a . for the ALT column (I have also added flanking records if it helps):

    chromosome_1    45627   .   T   .
    chromosome_1    45628   .   A   .
    chromosome_1    45628   .   AG  .
    chromosome_1    45629   .   G   .
    

    The only difference in the metadata columns are seen in FORMAT (same order as above):

    GT:DP:MLPSAC:MLPSAF
    GT:DP:MLPSAC:MLPSAF
    GT:AD:DP:MLPSAC:MLPSAF
    GT:DP:MLPSAC:MLPSAF
    

    I don't understand what case this is indicating? Is this some kind of indel? I did use CatVariants because I split GATK runs by chromosome, but I don't think that would cause any kind of collision here. Thanks!

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Ah, that's because there is one record line for a SNP at that position, and one for an indel starting at that position. This is perfectly normal.

  • kmhernankmhernan Chicago, ILMember

    Ah, I guess I thought there always had to be something in the ALT column, but I see that I am wrong! Thanks.

  • JackJack Member

    I'm a little confused about the variant genotype. How should I interpret this:
    chr1 1887726 rs13825147 GTTTT G 446.73 PASS AC=2;AF=1.00;AN=2;DB;DP=11;FS=0.000;MLEAC=2;MLEAF=1.00;MQ= 50.96;MQ0=0;QD=10.15;RPA=7,3;RU=T;STR GT:AD:DP:GQ:PL 1/1:0,11:11:33:484,33,0
    Does "AC=2" means that the sample has two alleles at this site and the G is the most probably allele ? And if so,how can AF be 1.00,since AC=2?

    One more question about heterozygous indels, can a heterozygous indel be illustrated below?

    GCTA -------strand1

    GC*A -------strand2

    suppose the reference is GCTA, while strand1 and strand2 are positive strand of two homologous chromosomes? Does my interpretation correct?

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Does "AC=2" means that the sample has two alleles at this site and the G is the most probably allele ? And if so,how can AF be 1.00,since AC=2?

    AC=2 means that two alleles were considered for this site (the REF allele + 1 ALT allele) but the sample itself was found to be homozygous-variant (1/1), with AF=1.

    Unfortunately I don't understand your second question, can you please rephrase?

  • pdexheimerpdexheimer Member ✭✭✭✭

    AC=2 means that two alleles were considered for this site

    I don't think that's quite right, @Geraldine_VdAuwera. AC tells you how many of the chromosomes examined (the number in AN) had an alternate allele. If there were two alternate alleles in the record, AC would have two comma-separated values.

    AF is simply AC/AN (the frequency of the alternate allele in the cohort)

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Ack, you're right, @pdexheimer. Thanks for correcting me, I'm not sure what I was thinking of. Let this be a cautionary tale on the perils of dispersing one's attention by responding to forum questions during meetings!

  • JackJack Member

    AC tells you how many of the chromosomes examined (the number in AN) had an alternate allele>

    I'm sorry, I still cannot understand it completely... can you set an example?

    My second question is that I think I have a little difficulty in understanding the concept of homozygous indel and heterozygous indel. When we talk about homozygous and heterozygous genotype, does it always involve two homologous chromosomes? Does a heterzygous indel means one chromosome has the reference allele, while its homologous chromosome has the alternative allele?

    Many thanks!

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Hi Jack,

    I'm sorry but these are very basic questions that are about understanding genetics, not GATK, so I cannot take the time to explain in detail.

    For your first question, please read the VCF format specification, which explains the meaning of all the different fields.

    For your second question, please seek help from a colleague, textbook or one of the many educational resources that you can find online.

  • melilotmelilot Member

    Hi,
    I have a question on how to interpret the QUAL value. On this page it is stated that it is "The Phred scaled probability that a REF/ALT polymorphism exists at this site given sequencing data." but on the other hand in one of the examples it is said that "a relative low confidence (QUAL = 71.77)" whereas to my understanding, a Phred scaled value of this magnitude is usually a very high value or that in fact, Phred scaled values usually don't even go much above 50 (or there is no point for that). So if this value truly is the Phred scaled probability, and if so, what value can be considered of low or high confidence? Or does this have to be determined for each dataset individually as the value seems to depend on the size of the NGS dataset? Also, could you somehow in laymans terms briefly explain how this value is calculated or what is taken into consideration in the calculation? Is this value useful for filtering or are we better off using the GQ values for example?

    I've also heard that for GQ values, a cutoff of 20 is often used (variants with GQ<20 are of bad quality), do you know what this is based on?
    Thank you already!

  • melilotmelilot Member

    Addition to my question: We are wondering about the QUAL values in our data since they go up to hundreds of thousands and just didn't seem logical for us to have Phred scaled values this big.

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Hi @melilot,

    You may be thinking of Phred-scaled base qualities, which do indeed tend to be capped at certain values by convention. The various likelihood metrics emitted by GATK, which are also Phred-scaled, can easily go up into the thousands. The important thing to understand is that they are relative, not absolute values. So it does depend very much on the particular dataset you are working with.

    The QUAL value reflects how confident we are that a site displays some kind of variation considering the amount of data available (=depth of coverage at the site) (because we are more confident when we have more observations to rely on), the quality of the mapping of the reads and alignment of the bases (because if we are not sure the bases observed really belong there, they do not contribute much to our confidence), and the quality of the base calls (because if they look like machine errors, they also do not contribute much to our confidence). Filtering on the QUAL value should be done by adjusting the emit and call thresholds at the calling step.

    GQ is a very different metric; it's not about whether the site displays variation. GQ tells you whether, given a site for which there is variation in the population, each sample has been assigned the correct genotype.

    Regarding filtering, have a look at our Best Practices document; the very last section gives some base recommendations for hard-filtering if you cannot perform variant recalibration (VQSR).

  • ykumarykumar Member
    edited September 2013

    Hi I have question I tried VatiantsToTable command to extract various column in Table. I like to extract AD value for my calculation. Unable to extract correct value. It's printing AD column . I used following command

    java -jar ./home/ykumar/app/GenomeAnalysisTKLite-2.1-8-gbb7f038/GenomeAnalysisTKLite.jar -T VariantsToTable  -R ./home/ykumar/ref/GRCh37_order.fa -V ./home/ykumar/Sample11_SNP.vcf -F CHROM -F POS -F ID -F REF -F ALT -F QUAL -F AF -F DP -F QD -F SB -GF GT -GF AD -o ./data/Sample11_AD_SNP.table
    

    its showing like

    CHROM POS          REF ALT    QUAL      AF     DP      QD        SB              GT           AD
    chr1    157101  .       T       C       5002.01 1.00    175     28.58   -6.519e-03      C/C     [[[email protected]]
    

    but real value of AD is 2,173

    chr1    157101  .       T       C       5002.01 .       AC=2;AF=1.00;AN=2;BaseQRankSum=-1.134;DP=175;Dels=0.00;FS=0.000;HaplotypeScore=113.2554;MLEAC=2;MLEAF=1.00;MQ=27.39;MQ0=20;MQRankSum=-0.484;QD=28.58;ReadPosRankSum=0.515;SB=-6.519e-03 GT:AD:DP:GQ:PL  1/1:2,173:175:99:5002,393,0
    

    I like to know can we extract AD value as separate column in GATK or not??

    Thank you already!!!

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Hi @ykumar,

    This looks like it might be a bug in how the value is extracted and represented. Can you confirm that you are using the latest version of GATK? If not, please run this again with the latest version and let me know if the error is still there.

  • bwubbbwubb Member ✭✭

    Hi,
    How does one interpret ./. instead of being call information? Is it no call?

    Having difficulty finding that answer. Thank you.

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Yes, that means no-call. We don't document it explicitly because it's not specific to gatk, it's in the vcf specification.

  • bwubbbwubb Member ✭✭

    I see thank you. Is there a "most common" reason for a no call? Apologies that is slightly off topic.

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    The only reason gatk issues a no-call is when there is no useable coverage at a site.

  • nreidnreid UC DavisMember

    Hi,

    This has been brought up before, but I find it very confusing. Above, the Genotype Quality is listed as being the:

    ...Phred-scaled confidence that the true genotype is the one provided in GT. In the diploid case, if GT is 0/1, then GQ is really L(0/1) / (L(0/0) + L(0/1) + L(1/1)), where L is the likelihood that the sample is 0/0, 0/1/, or 1/1 under the model built for the NGS dataset.

    After that, @ebanks said:

    The likelihoods are normalized so that the most likely is set to P=1.0 (in real space) and the GQ calculation is just the likelihoods of the most likely minus the second most likely genotype

    These statements are not equivalent using any algebraic contortions I can conjure. I believe something similar to what @ebanks said must be true, that GQ is the likelihood ratio of the second most likely genotype to GT. This is exactly consistent with the observation that the second most likely genotype's phred-scaled likelihood appears as GQ very often. This is not always the case, however, as it seems that when the second most likely genotype has a phred scaled likelihood of greater than 100, GQ is set to 99.

    Furthermore, though I am not a statistical expert, I work with likelihoods in many contexts and I have never heard anyone refer to a likelihood ratio as giving either an error probabililty or the probability that a hypothesis is true as @ebanks did above.

    Can anyone shed light on just what the GQ is, and how it is arrived at? Thanks.

  • ebanksebanks Broad InstituteMember, Broadie, Dev ✭✭✭✭

    Hi @nreid,
    1. Since I personally implemented it I can tell you for sure that the GQ coming out of the GATK is the likelihoods of the most likely genotype minus the likelihoods of the second most likely genotype. The standard has been to cap this value at 99 (and in fact earlier versions of the VCF specification actually put this cap in as a requirement) so that's why you don't see values larger than that.

    1. The official VCF specification defines GQ as the "conditional genotype quality, encoded as a phred quality -10log_10p(genotype call is wrong, conditioned on the site's being variant)". That's what is meant by error (i.e. that the genotype call is wrong).

    Hope this helps.

  • miaoxumiaoxu Member
    edited October 2013

    Hi Geraldine, thank you and your collegue so much for developing GATK and sharing information on this platform. You really helps a lot. I'm a newcomer to process sequencing data with GATK. I'm confused with hard filtering variant with INFO field information considering the ultra-high coverage (above 1000X) since I noticed some INFO fields, e.g. FS, change with depth and ploidy. The parameters of hard-filter "best pracitce" suggested may not suitable for filtering variant with ultra-high coverage. I set the -dcov parameter of UG to 1000 and -ploidy to 10 when calling variant. Could you pls help me with the three questions below:

    1. how would QD, MQ, FS, HaplotypeScore, MQRankSum, ReadPosRankSum change with depth?
    2. does ploidy have any affects on these INFO fields?
    3. what threshold of these fields do you suggest I should test with my data? I used the parameters listed below

    For SNP:

    --filterExpression "MQ0 >= 4 && ((MQ0 / (1.0 * DP)) > 0.1)" --filterName "HARD_TO_VALIDATE" --filterExpression "QUAL < 50.0" --filterName "VeryLowQual" --filterExpression "QD < 2" --filterName "LowQD" --filterExpression "MQ < 40.0" --filterName "LowMQ" --filterExpression "FS > 200.0" --filterName "StrandBias"

    For INDEL

    --filterExpression "MQ0 >= 4 && ((MQ0 / (1.0 * DP)) > 0.1)" --filterName "HARD_TO_VALIDATE" --filterExpression "QUAL < 30.0" --filterName "VeryLowQual" --filterExpression "QD < 2" --filterName "LowQD" --filterExpression "FS > 200.0" --filterName "StrandBias".

    Although I have read the detailed illustrations many times I still cannot completely understand some of the INFO fields. Pls excuse me if these are simple and naive questions.

    Thank you so much.

    Post edited by Geraldine_VdAuwera on
  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Hi @miaoxu,

    This is a complicated topic and there are no easy answers, unfortunately. Especially if you are dealing with levels of ploidy that are very different than what we have experience with. You will need to do a lot of experimenting to find the right settings for your data.

    1. The answer to your first question depends a lot on what kind of depth we are talking about. There is a good kind of depth (good quality sequence and/or appropriately mapped) which will increase your confidence in results. Then there is a bad kind of depth (poor quality sequence and/or poorly mapped) which is not useful and will actually dilute your confidence. The annotations will change accordingly; think about it and it should make logical sense. If not, try to read more about what these annotations represent.

    2. Many annotations have restrictions in how applicable they are. Some annotations require the presence of heterozygous data, and some can only be calculated for the diploid case. These restrictions are listed in the technical documentation, which you can find here: http://www.broadinstitute.org/gatk/gatkdocs/org_broadinstitute_sting_gatk_walkers_annotator_HaplotypeScore.html

    3. We provide some recommendations here, but they are all based on the assumption of diploidy, so you will need to experiment with them to find what is appropriate for your data.

    Good luck!

  • JackJack Member

    Hi there. I used UG to call SNPs, and then I used SNP chip to validate the callset. It turns out that a lot of my SNPs have different genotypes from chip results. One of the results is as follows:
    chr21 1621024 rs15181140 G C 253.96 PASS AC=2;AF=1.00;AN=2;BaseQRankSum=1.423;DB;DP=11;Dels=0.00;FS=0.000;HaplotypeScore=0.0000;MLEAC=2;MLEAF=1.00;MQ=57.87;MQ0=0;MQRankSum=0.474;QD=23.09;ReadPosRankSum=0.474 GT:AD:DP:GQ:PL 1/1:1,10:11:5:281,5,0 which gives an genotype of CC, while the result from chip result is CG. And there are many similar results, I wonder how should I modify the command argument to make the results concordant to chip results?

    From the PL field, there is a quite high probability that the genotype is CG(0/1 ),isn't it ?

  • ebanksebanks Broad InstituteMember, Broadie, Dev ✭✭✭✭

    Exactly. The caller has extremely high confidence in the site being non-reference (hence the poor 281 for the GG genotype) but no confidence to distinguish whether the correct genotype is GC or CC; note that the GQ (Genotype Quality or confidence) is Q5 which is extremely small. If you want concordance to chip results you will want to filter out genotypes with GQ < 30.
    Note that we are actively working on a post-processing step to improve genotypes based on population frequencies, but this won't be ready for a little while.

  • chenyu600chenyu600 Member ✭✭
    edited November 2013

    [email protected]_VdAuwera

    Seems the different GATK version with different INFO fields, how to set the INFO field with GATK?

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Hi @chenyu600,

    I'm sorry but I don't understand your question. Can you please rephrase?

  • chenyu600chenyu600 Member ✭✭
    edited November 2013

    Hi @Geraldine_VdAuweraoh, I mean I want to know how to define the GATK output vcf file's INFO fields

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Hi @chenyu600,

    If you mean you want to use specific INFO annotations that are not applied by default, the way to do it is to specify -an <desired annotation> in your command line at the calling step, or you can add them afterwards using VariantAnnotator. Have a look at the tool documentation for usage details.

  • Hello,

    I was looking over this documentation and I have a question about one of the examples above. The VCF line is this:

    chr1 877664 rs3828047 A G 3931.66 PASS [ANNOTATIONS] GT:AD:DP:GQ:PL 1/1:0,105:94:99:255,255,0

    but the interpretation is this:

    chr1:877664 is a known A/G SNP (named rs3828047), found with very high confidence (QUAL = 3931.66)

    Is this correct? It seems from the VCF line that the SNP call is G/G, not A/G. Am I missing something?

    • Nik.
  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Hi Nik, sorry for the delay.

    The SNP itself is A -> G, and the sample shown here is homozygous variant (G/G) for that SNP. Make sense?

  • cyriaccyriac Member

    In the VCF header, AD is described as ##FORMAT=<ID=AD,Number=.,Type=Integer,... where Number=. indicates that the number of possible values varies, is unknown, or is unbounded. But isn't the number of values equal to the number of genotypes? And per VCF specs, the header should say Number=G instead.

  • pdexheimerpdexheimer Member ✭✭✭✭

    No, the number of values is equal to the total number of alleles, including reference. It should probably be a Number=R, but that's new to VCF v4.2, and I think the GATK output files are still v4.1. In 4.1, the only possibilities were A (number of alternate alleles) and G. Since it's neither of those, and isn't a fixed number, it had to be 'unknown'

  • flowflow Member

    Hello,

    I have incorporated SnpEff predictions into my VCF using VariantAnnotator. I have the following indel record:

    Chr1 89203 . ATCT A,ATCTTCT 10285.80 . AC=18,15;AF=0.155,0.129;AN=116;BaseQRankSum=0.163;DP=1128;FS=3.274;InbreedingCoeff=0.9781;MLEAC=17,15;MLEAF=0.147,0.129;MQ=58.32;MQ0=0;MQRankSum=-4.942;QD=13.50;RPA=5,4,6;RU=TCT;ReadPosRankSum=-0.067;SNPEFF_EFFECT=FRAME_SHIFT;SNPEFF_EXON_ID=LOC_Os01g01180.1:exon_1;SNPEFF_FUNCTIONAL_CLASS=NONE;SNPEFF_GENE_BIOTYPE=mRNA;SNPEFF_GENE_NAME=LOC_Os01g01180;SNPEFF_IMPACT=HIGH;SNPEFF_TRANSCRIPT_ID=LOC_Os01g01180.1;STR GT:AD:DP:GQ:PL 0/0:15,0,0:18:45:0,45,815,45,807,801 ... 2/2:0,0,6:7:18:319,337,504,18,18,0

    As you can see the RPA and RU tags are present indicating a repeat and that SnpEff is predicting a frame shift. This is a single exon gene on the minus strand. The CDS record in the gff is:

    Chr1 MSU_osa1r7 CDS 88986 89204 . - . ID=LOC_Os01g01180.1:cds_1;Parent=LOC_Os01g01180.1

    So, looking at the GFF, the AT at positions 89203-89204 of the reference allele are the first two bases of an ATG codon on the minus strand. Since all three alleles have alleles have an AT (1: A TCT TCT TCT TCT TCT, 2: A TCT TCT TCT TCT and 3: A TCT TCT TCT TCT TCT TCT) I'm not sure why SnpEff is predicting a frameshift. Is this a bug (where, perhaps, the RPA tag is being ignored by snpEff) or is there another explanation?

    Jonathan

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Hi @flow, that is a question for the authors of SnpEff, since it's not our tool.

  • flowflow Member

    Hi Geraldine,

    True, I understand that, but wondered if other users might be aware of the issue. I know that the GATK team at one point extensively evaluated snpEff and wondered if this was discovered and if GATK developers were aware of it.

    Jonathan

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Fair enough. No, we're not aware of any particular issue on this point. To be honest, to say we "extensively evaluated" SnpEff would be an exaggeration. We looked into several programs and found that SnpEff gave useful results in a format that we could easily work with. We haven't done real in-depth testing, so we can't guarantee it is bug-free. In our experience, no program ever is...

  • flowflow Member

    Thanks Geraldine, I will contact the snpEff developer.

  • flowflow Member

    I clarified with the snpEff developer that snpEff does not presently consider the RPA/RU tags. I suspect this will be problematic for users who incorporate snpEff predictions into Unified Genotyper indel calls that use these tags.

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Ah, good to know -- thanks for reporting back with this info. You may want to consider an alternate program then. One of the reasons we chose SnpEff at the time was that few annotation programs produced VCF files, but now that is more common, so others may be just as easy to work with.

  • samshensamshen tampaMember

    Because the Phred scale is -10 * log(1-p),?
    What is the p?
    Should it be Phred scale is -10 * log(p),?
    Thanks!

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    @samshen, I'm sorry but I don't understand your question. Can you please clarify? What do you want to know?

  • Greg_OwensGreg_Owens Member

    A small fraction of my genotypes are strange. Here is an example

    ./. ./. 0/0:17,0:18:45:0,45,353 ./.:.:1 0/0:25,0:25:75:0,75,592 ./.

    I've bolded the genotype that I don't understand what it means. It would suggest that there are no reads for that sample, but I don't know what the one at the end means. At other sites the number is different.
    This is from a raw vcf file output by GATK.

    Thanks for your help!

  • pdexheimerpdexheimer Member ✭✭✭✭

    @Greg_Owens‌ - This is how a VCF handles fields with no data. It's confusing, and we've actually addressed it a few times on the forum (here and here, for instance). In the particular case you posted, there's a single low quality read at that site, so nothing is reported in the AD annotation and no genotype is called

Sign In or Register to comment.