Answers.Body: <p>The <a href="https://samtools.github.io/hts-specs/VCFv4.2.pdf" rel="nofollow noreferrer">VCF spec</a> clearly states that these are indeed log likelihood values:</p>
  
  <blockquote>
    <p>• GL : genotype likelihoods comprised of comma separated floating point log10-scaled likelihoods for all possible
    genotypes given the set of alleles defined in the REF and ALT fields. In presence of the GT field the same
    ploidy is expected and the canonical order is used; without GT field, diploidy is assumed. If A is the allele in
    REF and B,C,... are the alleles as ordered in ALT, the ordering of genotypes for the likelihoods is given by:
    F(j/k) = (k*(k+1)/2)+j. In other words, for biallelic sites the ordering is: AA,AB,BB; for triallelic sites the
    ordering is: AA,AB,BB,AC,BC,CC, etc. For example: GT:GL 0/1:-323.03,-99.29,-802.53 (Floats)</p>
  </blockquote>
  
  <p>With log-likelihood values, the higher the number, the better the value. So -2 is better than -3. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-05T11:58:08.110Z
Answers.Text: Dang, sometimes I get stuck in so complicated thoughts, while just the basic premise is wrong!
Answers.UserDisplayName: Kamil S Jaron
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-05T11:58:58.653Z
Answers.Text: @KamilSJaron join the club! That happens to _all_ of us :)
Answers.UserDisplayName: terdon
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-04T15:00:35.483Z
Answers.LastActivityDate: 2019-06-04T15:00:35.483Z
Answers.UserDisplayName: terdon
Body: <p>I have a <code>vcf v4.2</code> file with structural variants, the 8 columns describing the variant are clear, but in the genotype information I got confused by values of <code>GL</code> entries. In the <a href="https://samtools.github.io/hts-specs/VCFv4.2.pdf" rel="nofollow noreferrer">vcf specification</a> they mention that <code>GL</code> are likelihoods of the individual genotypes, but as far as I am concerned, likelihood should be a number between 0 and 1, therefore I am suprised to see negative numbers. Then I thought that it might be log-likelihood, but then it's strange that the higher the number is the better. Here is a sample of 5 variants with various called genotypes</p>
  
  <pre><code>...       GT:GL:GQ:FT:RCL:RC:RCR:CN:DR:DV:RR:RV   0/1:-22.4949,0,-4.49485:45:PASS:20:1:11:0:1:4:0:0
  ...       GT:GL:GQ:FT:RCL:RC:RCR:CN:DR:DV:RR:RV   0/1:-3.1888,0,-43.9892:32:PASS:16:26:13:2:9:2:0:0
  ...       GT:GL:GQ:FT:RCL:RC:RCR:CN:DR:DV:RR:RV   0/1:-0.190635,0,-49.2888:4:LowQual:26:51:31:2:10:1:0:0
  ...       GT:GL:GQ:FT:RCL:RC:RCR:CN:DR:DV:RR:RV   0/0:0,-1.01435,-75.899:10:LowQual:18:54:26:2:14:1:0:0
  ...       GT:GL:GQ:FT:RCL:RC:RCR:CN:DR:DV:RR:RV   1/1:-19.198,-1.5031,0:15:PASS:70:0:58:0:0:5:0:0
  </code></pre>
  
  <p>The <code>vcf</code> file was generated by <a href="https://github.com/dellytools/delly" rel="nofollow noreferrer">delly</a> genotyper. I followed their recommendations for germline SV calling. However, negative likelihoods are even in the <code>vcf</code> specification, therefore it seems that it's not something <code>delly</code> specific.</p>
  
  <p>So, what exactly is <code>GL</code> in <code>vcf</code> files? And how do they relate to other entries <code>GP</code> (genotype posterior probabilities, not in the file by delly) and <code>GQ</code> (conditional genotype quality)?</p>
  
Tags: <vcf><structural-variation>
Title: Quality GL entries in vcf file
ThreadText: # Quality GL entries in vcf file
  
  (Asked by: username_0 on 2019-06-04)
  
  I have a `vcf v4.2` file with structural variants, the 8 columns describing the variant are clear, but in the genotype information I got confused by values of `GL` entries. In the [vcf specification](https://samtools.github.io/hts-specs/VCFv4.2.pdf) they mention that `GL` are likelihoods of the individual genotypes, but as far as I am concerned, likelihood should be a number between 0 and 1, therefore I am suprised to see negative numbers. Then I thought that it might be log-likelihood, but then it's strange that the higher the number is the better. Here is a sample of 5 variants with various called genotypes
  
  ```
  ...       GT:GL:GQ:FT:RCL:RC:RCR:CN:DR:DV:RR:RV   0/1:-22.4949,0,-4.49485:45:PASS:20:1:11:0:1:4:0:0
  ...       GT:GL:GQ:FT:RCL:RC:RCR:CN:DR:DV:RR:RV   0/1:-3.1888,0,-43.9892:32:PASS:16:26:13:2:9:2:0:0
  ...       GT:GL:GQ:FT:RCL:RC:RCR:CN:DR:DV:RR:RV   0/1:-0.190635,0,-49.2888:4:LowQual:26:51:31:2:10:1:0:0
  ...       GT:GL:GQ:FT:RCL:RC:RCR:CN:DR:DV:RR:RV   0/0:0,-1.01435,-75.899:10:LowQual:18:54:26:2:14:1:0:0
  ...       GT:GL:GQ:FT:RCL:RC:RCR:CN:DR:DV:RR:RV   1/1:-19.198,-1.5031,0:15:PASS:70:0:58:0:0:5:0:0
  
  ```
  
  The `vcf` file was generated by [delly](https://github.com/dellytools/delly) genotyper. I followed their recommendations for germline SV calling. However, negative likelihoods are even in the `vcf` specification, therefore it seems that it's not something `delly` specific.
  
  So, what exactly is `GL` in `vcf` files? And how do they relate to other entries `GP` (genotype posterior probabilities, not in the file by delly) and `GQ` (conditional genotype quality)?
  
  **Tags:** vcf, structural-variation
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-06-04. Score: 4 | Accepted answer
  
  The [VCF spec](https://samtools.github.io/hts-specs/VCFv4.2.pdf) clearly states that these are indeed log likelihood values:
  
  > • GL : genotype likelihoods comprised of comma separated floating point log10-scaled likelihoods for all possible
  > genotypes given the set of alleles defined in the REF and ALT fields. In presence of the GT field the same
  > ploidy is expected and the canonical order is used; without GT field, diploidy is assumed. If A is the allele in
  > REF and B,C,... are the alleles as ordered in ALT, the ordering of genotypes for the likelihoods is given by:
  > F(j/k) = (k\*(k+1)/2)+j. In other words, for biallelic sites the ordering is: AA,AB,BB; for triallelic sites the
  > ordering is: AA,AB,BB,AC,BC,CC, etc. For example: GT:GL 0/1:-323.03,-99.29,-802.53 (Floats)
  
  With log-likelihood values, the higher the number, the better the value. So -2 is better than -3.
  
  > **Comments:**
  > **username_0**: Dang, sometimes I get stuck in so complicated thoughts, while just the basic premise is wrong!  
  > **username_1**: @username_0 join the club! That happens to _all_ of us :)  
  
  ---
  
  