text: user16067: I want to filter my VCF file to include only the relevant information I need but I have some questions about the results I got.
  This is what the first 10 lines of my VCF file looks like:
  #CHROM  POS ID  REF ALT QUAL    FILTER  INFO    FORMAT  DATA_VARIANT
  chrI    826 .   T   C   255 .   CNV=1   GT:PL:GQ:DP:BSDP:ACN    1/1:344,30,0:57:10:0,10,0,0:0,5
  chrI    831 .   C   T   71  .   CNV=1   GT:PL:GQ:DP:BSDP:ACN    0/1:139,36,274:71:12:0,8,0,4:3,2
  chrI    836 .   G   T   59  .   CNV=1   GT:PL:GQ:DP:BSDP:ACN    0/1:140,49,373:59:16:0,0,12,4:4,1
  chrI    848 .   C   T   255 .   CNV=1   GT:PL:GQ:DP:BSDP:ACN    1/1:556,48,0:75:16:0,0,0,16:0,5
  chrI    855 .   G   A   255 .   CNV=1   GT:PL:GQ:DP:BSDP:ACN    0/1:399,48,139:59:16:12,0,4,0:1,4
  chrI    858 .   ATT AT  255 .   CNV=1;TYPE=INDEL    GT:PL:GQ:DP:ADP:ACN 0/1:480,48,160:85:16:4,12:1,4
  chrI    876 .   T   C   255 .   CNV=1   GT:PL:GQ:DP:BSDP:ACN    1/1:865,75,0:102:25:0,25,0,0:0,5
  chrI    904 .   G   A   255 .   CNV=1   GT:PL:GQ:DP:BSDP:ACN    1/1:1261,112,0:138:37:37,0,0,0:0,5
  chrI    920 .   A   T   67  .   CNV=1   GT:PL:GQ:DP:BSDP:ACN    0/1:244,145,1426:67:48:41,0,0,7:4,1
  chrI    925 .   T   C   255 .   CNV=1   GT:PL:GQ:DP:BSDP:ACN    1/1:1786,157,1:255:52:0,52,0,0:0,5
  
  QUAL:
  As I understand it, the QUAL is based off of Phred quality scores, which would mean that a QUAL value of anything greater than 20 would be fairly sufficient in terms of quality for that genotype. However, most of my QUAL scores are 255 and from what I've read that means there is no mapping quality available?
  
  What does this mean for my data? I used the same tool (NGSEP) to map and call the variants on this strain so it should have mapping quality scores.
  Do I need to filter out all the 255 scores? Or can they still be used?
  
  PL: From what I've read about PL scores, they indicate the likelihood of the presence of a genotype (0/0, 0/1, 1/1). Based on the results, there should be a clear least likely genotype, "almost" likely genotype, and a most likely genotype indicated by a value of 0.
  
  Some of my PL values do not include a 0 (i.e., the second variant call = 139,36,274). What does this mean for my data?
  
  Any help would be great! Thank you!
  Note: I used NGSEP as my variant caller
  
  user475: The VCF specification provides the definition for the QUAL field.
  However, QUAL values are often capped by variant callers to a given value. I have seen 100 being used and according to this documentation on NGSEP it seems 255 has been chosen for this caller as the maximum value. So you are all good keeping these high QUAL variant sites and filtering only those below a certain value (e.g. 20)
  PL is also defined in the VCF specification: phred-scaled genotype likelihoods rounded to the closest integer (and otherwise defined precisely as
  the GL field).
  Again, different variant callers may have different implementations for the specification. GATK for example normalizes the values so that the most likely genotype has a PL of 0. But this might not be followed in other callers. It seems that NGSEP simply does not apply this normalization or does it differently. I think this is a detail you can ask directly the authors here by opening an "issue".
  My suggestion is that you rather use GQ (genotype quality) if you want to hard-filter your variants. This is more standard to do, as opposed to filtering using PLs. These values are also in phred-scale.
  
original_text: 16067: <p>I want to filter my VCF file to include only the relevant information I need but I have some questions about the results I got.</p>
  <p>This is what the first 10 lines of my VCF file looks like:</p>
  <pre><code>#CHROM  POS ID  REF ALT QUAL    FILTER  INFO    FORMAT  DATA_VARIANT
  chrI    826 .   T   C   255 .   CNV=1   GT:PL:GQ:DP:BSDP:ACN    1/1:344,30,0:57:10:0,10,0,0:0,5
  chrI    831 .   C   T   71  .   CNV=1   GT:PL:GQ:DP:BSDP:ACN    0/1:139,36,274:71:12:0,8,0,4:3,2
  chrI    836 .   G   T   59  .   CNV=1   GT:PL:GQ:DP:BSDP:ACN    0/1:140,49,373:59:16:0,0,12,4:4,1
  chrI    848 .   C   T   255 .   CNV=1   GT:PL:GQ:DP:BSDP:ACN    1/1:556,48,0:75:16:0,0,0,16:0,5
  chrI    855 .   G   A   255 .   CNV=1   GT:PL:GQ:DP:BSDP:ACN    0/1:399,48,139:59:16:12,0,4,0:1,4
  chrI    858 .   ATT AT  255 .   CNV=1;TYPE=INDEL    GT:PL:GQ:DP:ADP:ACN 0/1:480,48,160:85:16:4,12:1,4
  chrI    876 .   T   C   255 .   CNV=1   GT:PL:GQ:DP:BSDP:ACN    1/1:865,75,0:102:25:0,25,0,0:0,5
  chrI    904 .   G   A   255 .   CNV=1   GT:PL:GQ:DP:BSDP:ACN    1/1:1261,112,0:138:37:37,0,0,0:0,5
  chrI    920 .   A   T   67  .   CNV=1   GT:PL:GQ:DP:BSDP:ACN    0/1:244,145,1426:67:48:41,0,0,7:4,1
  chrI    925 .   T   C   255 .   CNV=1   GT:PL:GQ:DP:BSDP:ACN    1/1:1786,157,1:255:52:0,52,0,0:0,5
  </code></pre>
  <p><strong>QUAL:</strong>
  As I understand it, the QUAL is based off of Phred quality scores, which would mean that a QUAL value of anything greater than 20 would be fairly sufficient in terms of quality for that genotype. However, most of my QUAL scores are 255 and from what I've read that means there is no mapping quality available?</p>
  <ul>
  <li>What does this mean for my data? I used the same tool (NGSEP) to map and call the variants on this strain so it should have mapping quality scores.</li>
  <li>Do I need to filter out all the 255 scores? Or can they still be used?</li>
  </ul>
  <p><strong>PL:</strong> From what I've read about PL scores, they indicate the likelihood of the presence of a genotype (0/0, 0/1, 1/1). Based on the results, there should be a clear least likely genotype, &quot;almost&quot; likely genotype, and a most likely genotype indicated by a value of 0.</p>
  <ul>
  <li>Some of my PL values do not include a 0 (i.e., the second variant call = 139,36,274). What does this mean for my data?</li>
  </ul>
  <p>Any help would be great! Thank you!</p>
  <p><strong>Note:</strong> I used NGSEP as my variant caller</p>
   475: <p>The <a href="https://samtools.github.io/hts-specs/VCFv4.2.pdf" rel="noreferrer">VCF specification</a> provides the definition for the QUAL field.</p>
  <p>However, QUAL values are often capped by variant callers to a given value. I have seen 100 being used and according to <a href="https://www.google.com/url?q=https://cgspace.cgiar.org/bitstream/handle/10568/68332/UserManualNGSEP.pdf%3Fsequence%3D1%26isAllowed%3Dy&amp;sa=U&amp;ved=2ahUKEwjpiZKorvD6AhV2QfEDHfHDAhcQFnoECAIQAg&amp;usg=AOvVaw36qKssVh0QwBsvE47IafmQ" rel="noreferrer">this documentation</a> on NGSEP it seems 255 has been chosen for this caller as the maximum value. So you are all good keeping these high QUAL variant sites and filtering only those below a certain value (e.g. 20)</p>
  <p>PL is also defined in the VCF specification: phred-scaled genotype likelihoods rounded to the closest integer (and otherwise defined precisely as
  the GL field).</p>
  <p>Again, different variant callers may have different implementations for the specification. <a href="https://gatk.broadinstitute.org/hc/en-us/articles/360035890451-Calculation-of-PL-and-GQ-by-HaplotypeCaller-and-GenotypeGVCFs" rel="noreferrer">GATK for example</a> normalizes the values so that the most likely genotype has a PL of 0. But this might not be followed in other callers. It seems that NGSEP simply does not apply this normalization or does it differently. I think this is a detail you can ask directly the authors <a href="https://github.com/NGSEP/NGSEPcore" rel="noreferrer">here</a> by opening an &quot;issue&quot;.</p>
  <p>My suggestion is that you rather use GQ (genotype quality) if you want to hard-filter your variants. This is more standard to do, as opposed to filtering using PLs. These values are also in phred-scale.</p>
  